diff --git a/content/.metadata.json b/content/.metadata.json index 35a918760b..956c48868f 100644 --- a/content/.metadata.json +++ b/content/.metadata.json @@ -1,7 +1,7 @@ { "metadata": { "version": "2.0", - "fetch_date": "2026-08-20T16:20:13.847408Z", + "fetch_date": "2026-08-21T02:15:56.539056Z", "section": "all" }, "items": [ @@ -30,7 +30,7 @@ "url": "https://platform.claude.com/docs/en/get-started", "status": "success", "path": "en/get-started.md", - "sha256": "2d859a15fb6bc35c745f5377f93483b3d830acff9e8d1c90ab1280fb4f65e6b6", + "sha256": "8e53422fb58087acf7c94867772cb4cf79ab84f00ff7a4a3773d9efd4d867efa", "size": 19471 }, { @@ -44,15 +44,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/overview", "status": "success", "path": "en/build-with-claude/overview.md", - "sha256": "8bdcd9479b45f6ae0769be3c208e6f1cc7423d3bf1e87b866eb2eeda520ccaff", - "size": 29394 + "sha256": "68a4954eefd71f8d7c257d5f7ff9470460c92c35beb846df6e7dd4be4cd473d5", + "size": 29746 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/working-with-messages", "status": "success", "path": "en/build-with-claude/working-with-messages.md", - "sha256": "d30bb0fe2ed51f20afcd4222d23f4d392c69562675b64933c62321cc3e33ba14", - "size": 32529 + "sha256": "078cbd282c4482bee0bfd014ecb4144c6cbcbe587aced5699378d8dd8b017df9", + "size": 32755 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons", @@ -107,8 +107,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/citations", "status": "success", "path": "en/build-with-claude/citations.md", - "sha256": "5ca531361a269863338524c7b30a6e266af2aad8b0be0c597b7bd5998dcbf6ae", - "size": 76454 + "sha256": "1a3457a9a454f82889a907a132cc656a0bfb6f1a0e56912d32a73d7f60627229", + "size": 75144 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/streaming", @@ -128,8 +128,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/search-results", "status": "success", "path": "en/build-with-claude/search-results.md", - "sha256": "17708a29c2e793fa30f5d9c6cae4177032acb8cb517ec2d88196a01b2e6bfecf", - "size": 83837 + "sha256": "481d74932296b2da17ba8d5e067c580fbc1ed972f20489f2ce8318bb02c28df6", + "size": 83846 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals", @@ -191,15 +191,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview", "status": "success", "path": "en/agents-and-tools/tool-use/overview.md", - "sha256": "e87553fe1012fd440357fc28a5c4b995f18b59a7a96375967527f85d4da071af", - "size": 38100 + "sha256": "11918c55b653bd3d7ea2fa3315ed462881b7ece20c8bb3fbc050b7cbf10cb5b8", + "size": 38197 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/how-tool-use-works", "status": "success", "path": "en/agents-and-tools/tool-use/how-tool-use-works.md", - "sha256": "257a075b044875755b110fe75cc56d83c46f3807ac7d2cafdc45bc8b6b9cd714", - "size": 11197 + "sha256": "e30dd4b1ca07f0dad0a4bb3ced56a31fb673cbfdb5d3fc68d4d7fcc8ad234193", + "size": 11363 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/build-a-tool-using-agent", @@ -212,22 +212,22 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools", "status": "success", "path": "en/agents-and-tools/tool-use/define-tools.md", - "sha256": "6bc6bdc9a87e048e7b80ef64fb71895f4446441ed21a495d5758b480755e48cf", - "size": 35014 + "sha256": "db7afc366f050f58fa3acef15ecda656ec2a8816e640feca36c2f43b10404ae9", + "size": 35985 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls", "status": "success", "path": "en/agents-and-tools/tool-use/handle-tool-calls.md", - "sha256": "0005c7dde32777920d34c46b3fa307646cf43e238817af9c559cb0b315c10ae1", - "size": 12397 + "sha256": "28a334dc4e4fa27152df79d99353e7d8812a583a2d7664699054a97b1d73149f", + "size": 13434 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/parallel-tool-use.md", - "sha256": "5bf1ac6e266015591811e440efbf650e4e04a200b1ff2783dc474fa746cb69b9", - "size": 53267 + "sha256": "9ac1bf66907e431fc9286b37f33afa8dab1f3117d8f7a0f3641ba29314753df9", + "size": 54011 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-runner", @@ -240,15 +240,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/strict-tool-use.md", - "sha256": "b19341949dc0359ede329de0343d2289eb9f4f47c17638fe27e4bfa88d400341", - "size": 39825 + "sha256": "96c6f3246a419d99bad3266755ca942160e56cbbc24fb4c84c0a6bc86eaaed9a", + "size": 40202 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools", "status": "success", "path": "en/agents-and-tools/tool-use/server-tools.md", - "sha256": "48e7218e23e2cd0d0ea697537d871368e6a39078d1e227c4df298730e1c17f5a", - "size": 44507 + "sha256": "d84a8971b33100f6ea46ccf7db494179eba5f34a0c2fad7ab37fe1fd07f6542f", + "size": 44401 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool", @@ -261,15 +261,15 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool", "status": "success", "path": "en/agents-and-tools/tool-use/web-fetch-tool.md", - "sha256": "bb90affb43f445b98d5f957740f1fece84b50552f27d3b2ca27e1cec6c38f7a5", - "size": 34431 + "sha256": "a7a468b3c3c953377f61b6ea2d9e626732dad65fbd8024875770baa69a2a486f", + "size": 34781 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool", "status": "success", "path": "en/agents-and-tools/tool-use/code-execution-tool.md", - "sha256": "0713a10fa23dc51b4ba4313cb32c37aebaac9a295f5d1144c28506f0eecaf731", - "size": 61241 + "sha256": "c58c3b15f573310380ef9fdd1dcc5a624c8e73cb385416081f025c9c8037bdb1", + "size": 60020 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool", @@ -282,8 +282,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool", "status": "success", "path": "en/agents-and-tools/tool-use/tool-search-tool.md", - "sha256": "a4e31cace4b9e613b605532039081972eeed13f474f31a4c434fd4e0b46cbbc1", - "size": 34970 + "sha256": "0c4ec7a7f8dc5412c243fd63c590bcd8db7c7576a2091b93a9835a4cb89dcca3", + "size": 35590 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool", @@ -296,8 +296,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool", "status": "success", "path": "en/agents-and-tools/tool-use/bash-tool.md", - "sha256": "cc8cf5977f198b48a79dbb7003bef7c75a65c5c02cae89e5114bba04353b424b", - "size": 71331 + "sha256": "4f169dcc458ddaef2ddb1d709537349e67e265f077e3df5b39d89596071c04f4", + "size": 71273 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool", @@ -310,22 +310,29 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool", "status": "success", "path": "en/agents-and-tools/tool-use/computer-use-tool.md", - "sha256": "07a95b7f2092a6edf0f9784d034e080e47412bb1eb120cf0f6bdb1cb64c01149", - "size": 84771 + "sha256": "d261dfdaa78ec74d23a7b886c2e4d9505f38d8def5d0d04073d5ce11801694b4", + "size": 114895 + }, + { + "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool", + "status": "success", + "path": "en/agents-and-tools/tool-use/browser-use-tool.md", + "sha256": "6fa3a9cf8d60178f6796846b13e1a113a47bf6da89549a6eabfb34d81eba2711", + "size": 105641 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/troubleshooting-tool-use", "status": "success", "path": "en/agents-and-tools/tool-use/troubleshooting-tool-use.md", - "sha256": "326dfcf629426663032511547883380ccd6c222d2751aa87dd80cbe3b81eb47d", - "size": 15343 + "sha256": "cbd8744cd1b7b943a5d203a78e4aadfdb4f75c551c378e168e6186b2339e5174", + "size": 15261 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference", "status": "success", "path": "en/agents-and-tools/tool-use/tool-reference.md", - "sha256": "1c79bf081933cb8b6100e0a032e273e64fd9b219368414c71c2289eedb3bf882", - "size": 12251 + "sha256": "02d005efe7ebaaf11e3d1efd35a5e313b0d8df0b177e23dca9475c26cee6d747", + "size": 19035 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/manage-tool-context", @@ -338,29 +345,29 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-combinations", "status": "success", "path": "en/agents-and-tools/tool-use/tool-combinations.md", - "sha256": "c34e7a2970dca8205bcd0c808dff2b22a19b1f6d6d74e70d90cfc7d0d1a69df8", - "size": 5148 + "sha256": "19af85f13fbc207a03784d4dbd31083f2335b97882d7b6831a86a94fd8a064dd", + "size": 6170 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching", "status": "success", "path": "en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md", - "sha256": "b8d52a59ccd562a33c19dbf4e8e5e8c82029b2a607c6dc939a87406e8487eda0", - "size": 8736 + "sha256": "a0bb0d71af45051398a1e63c7379fe0ec5af0dd91ea9351cba2d9b5c474161f6", + "size": 11881 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling", "status": "success", "path": "en/agents-and-tools/tool-use/programmatic-tool-calling.md", - "sha256": "2c5f85045d8a7cb1eb6b38bcd34f7c839957e9a2ab66deb124aefa4b20d99389", - "size": 61915 + "sha256": "fa8bb4a7e4403a7fe6d5e986c15cdfbff4af9e80769a2430b1beb1d21d37d110", + "size": 62263 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming", "status": "success", "path": "en/agents-and-tools/tool-use/fine-grained-tool-streaming.md", - "sha256": "6e75fe69c9484d07de93224c87a74664373d630e9cf0e35333853a211fe806a0", - "size": 35162 + "sha256": "06fa30221f1e345ef77a0a834f082fd8c005575e9524c86a209a36470a3bd6df", + "size": 35550 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/context-windows", @@ -422,43 +429,43 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/files", "status": "success", "path": "en/build-with-claude/files.md", - "sha256": "be5c90313c3c6f485527d040d8839998cd21cdc9badc3c11c61bcc0661bb414d", - "size": 36658 + "sha256": "0342d84f513d198a6d00b97ceddfd6c0a3f75e8600acb3ea29d2272d35da6953", + "size": 34453 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/pdf-support", "status": "success", "path": "en/build-with-claude/pdf-support.md", - "sha256": "9ed41f58d45b90d6ee6e2db8243bd52d38ff4c2c375f87b92e821d98ee34a186", - "size": 62918 + "sha256": "016c1ac7721438a6e2460a4469a109d04d76f97544034f43a1ddf9b6afc45b95", + "size": 62255 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/vision", "status": "success", "path": "en/build-with-claude/vision.md", - "sha256": "a7ec458bd897341ac6fc6dcd9601108665a8ea1e4825155060b2e0202c7fe523", - "size": 46300 + "sha256": "bd6b4f823fa9be774202d16e0f11db19e68eac10994b04f1bbd5ff53acf7bd0e", + "size": 47420 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/vision-coordinates", "status": "success", "path": "en/build-with-claude/vision-coordinates.md", - "sha256": "353199d346065edad97ed0e2f99fc92f5bc00d0dfb0f8272104e1638a44b3c9c", - "size": 30671 + "sha256": "ccb90b21bf1e39c53fe969515fb8cef472eccaeb77f0dd62c8ad1118def36f57", + "size": 31296 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview", "status": "success", "path": "en/agents-and-tools/agent-skills/overview.md", - "sha256": "c161721ff90020eb3e9ba8755f70371f1c70a1b1aeba3c0b1545087479a6949c", - "size": 21536 + "sha256": "a3efd2985aa5d1e706f195cf817aebbd8144e95698cf120497fc5a93622ea8f1", + "size": 21366 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/quickstart", "status": "success", "path": "en/agents-and-tools/agent-skills/quickstart.md", - "sha256": "b00c029bb325e47977bd8f4a50845c19e7707533f0371fb6660923b7b4501e38", - "size": 40130 + "sha256": "7d7ce6e1a14c7ccee3043665b0f806eb11ade70b3af1e155b215d85921756fef", + "size": 37784 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices", @@ -478,8 +485,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/skills-guide", "status": "success", "path": "en/build-with-claude/skills-guide.md", - "sha256": "c8f32577cd749adfd92db848db1f84c5b8f4a97fe654ff8bfa9405a033376846", - "size": 153654 + "sha256": "b19c922acd72252f0c992d2943b71565fddea43e869208658fc4a212228c9027", + "size": 144057 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/remote-mcp-servers", @@ -492,8 +499,8 @@ "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-connector", "status": "success", "path": "en/agents-and-tools/mcp-connector.md", - "sha256": "f1520621389a46970bd2fac6ce21c27a1b1e1b8a0b99456b591faa397155e2ed", - "size": 49800 + "sha256": "1e21ae953ad5085dc9073514671723ce7d250f16461a8e36bd1f88e1fa034f7e", + "size": 49869 }, { "url": "https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/overview", @@ -562,36 +569,36 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock", "status": "success", "path": "en/build-with-claude/claude-in-amazon-bedrock.md", - "sha256": "b4ee6ec571081227daeb777c47a0eaa4fc580de9ab1ba86128f463ae07b3a024", - "size": 19627 + "sha256": "c50244aa0b1d2ae6c8744cc68a386b96c120b1c4c62ab74ad7a69363a06c369e", + "size": 19993 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy", "status": "success", "path": "en/build-with-claude/claude-on-amazon-bedrock-legacy.md", - "sha256": "97fe1f5290b04c1cf955472a41ca7187277ec10bc0ed6691f24ecfc4fe99f81c", - "size": 39786 + "sha256": "5fa2ee7e7cdfc7af6002747a6cb7ca8de121103041fe076d3962f8aef0a23730", + "size": 40152 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws", "status": "success", "path": "en/build-with-claude/claude-platform-on-aws.md", - "sha256": "252db9103da4eb12ec50244200ad7c5d2ff7e003748389a26424c8fbf646c965", - "size": 83116 + "sha256": "f1d705d8fd3017cd3e7f33f9d8bdbf9bed8bf5c9506847eac510374861651410", + "size": 84561 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai", "status": "success", "path": "en/build-with-claude/claude-on-vertex-ai.md", - "sha256": "3aa045689d886fb40218f6a211bcb10c120de299be91bb89b98bbbbdaa7672a1", - "size": 32454 + "sha256": "3ee5c842437170b9450cddeb9bacd6157a759aed1fc27848f89816eabf9ffe24", + "size": 32818 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry", "status": "success", "path": "en/build-with-claude/claude-in-microsoft-foundry.md", - "sha256": "48b2f4a286b0095b0302756feb8006080cf56ad75bb49587b47823882c330d23", - "size": 36137 + "sha256": "8f71636f39fdbfb44266f9bf7a78559591c8ed739e4be264bbb7b3824881007d", + "size": 36506 }, { "url": "https://platform.claude.com/docs/en/managed-agents/overview", @@ -604,8 +611,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/quickstart", "status": "success", "path": "en/managed-agents/quickstart.md", - "sha256": "0e16bb5919f38c928a03566ba965c29e82c6670b2f7500eb6961334412a95031", - "size": 30131 + "sha256": "1e9c64464daf6bb06fe951a4d587c087b3beb43642b7d50a5fdf38ef22ecbd0b", + "size": 30587 }, { "url": "https://platform.claude.com/docs/en/managed-agents/onboarding", @@ -618,50 +625,50 @@ "url": "https://platform.claude.com/docs/en/managed-agents/migration", "status": "success", "path": "en/managed-agents/migration.md", - "sha256": "868e92c60b617b2367ab7d91b072481ecd5ffb5ec9ccc2fd3d487b149571e873", - "size": 51181 + "sha256": "948b7ac50dcac1f63ba9284f102f54fd99feb9ec6f624e2bea634e4064fabebc", + "size": 51684 }, { "url": "https://platform.claude.com/docs/en/managed-agents/agent-setup", "status": "success", "path": "en/managed-agents/agent-setup.md", - "sha256": "8b1c057e508460e075ab26c5ba33e262e3cc46a3214565cea4bd279fbc6f80d8", - "size": 31066 + "sha256": "e3c04dda6121710fbfc71ac0b60c671312b21a8b2b3a6173942e731620423525", + "size": 31661 }, { "url": "https://platform.claude.com/docs/en/managed-agents/tools", "status": "success", "path": "en/managed-agents/tools.md", - "sha256": "489ca39bad3cf9490a8a1dda01dcab13fcda5c129ae28d8ed53cecadfcaa1f45", - "size": 40323 + "sha256": "794cd5ab1e708eb14f4d3d6945dc731c4a9c974f805268ebf5d5f16f267fbc18", + "size": 40432 }, { "url": "https://platform.claude.com/docs/en/managed-agents/mcp-connector", "status": "success", "path": "en/managed-agents/mcp-connector.md", - "sha256": "d44a05e80424670445065299acf7c2fe2ba27db6caacc6e10f389a41d2695a27", - "size": 16617 + "sha256": "d08d7f7fa255770a41e60a1e2de9b47508a29a9a328a6122ff761c2938622eda", + "size": 16834 }, { "url": "https://platform.claude.com/docs/en/managed-agents/permission-policies", "status": "success", "path": "en/managed-agents/permission-policies.md", - "sha256": "87c2a652878388d7d398d71a95b42db0f47f7cd077dc23ed41468e0ed3846d2a", - "size": 31706 + "sha256": "f14b9e2f1f3a338fa31728e74d0adc824cc318c924a2d869d88ae199124a926f", + "size": 32039 }, { "url": "https://platform.claude.com/docs/en/managed-agents/skills", "status": "success", "path": "en/managed-agents/skills.md", - "sha256": "6b4bda14fa7c55cce495394c3ab8244a03bbeaf15bd7964f5a44ac8ad090ef42", - "size": 22799 + "sha256": "2da85e9987534c8e765038da402c657d946a9ed9d32b50d934610600f01d4eda", + "size": 22818 }, { "url": "https://platform.claude.com/docs/en/managed-agents/environments", "status": "success", "path": "en/managed-agents/environments.md", - "sha256": "9fc1ba4fbb6f40b805a3aa164b25702e592c0fb0b380b87fe78ddc4461fb7a9a", - "size": 22417 + "sha256": "02ad36b92b97980934b99c274e26f452587df8cabfc7ea30b5180e541c6d37f6", + "size": 23019 }, { "url": "https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference", @@ -674,8 +681,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes", "status": "success", "path": "en/managed-agents/self-hosted-sandboxes.md", - "sha256": "7b345fbd35b258c04bffda0ce75de06d16bb70245812c11727bd84eea969320a", - "size": 110982 + "sha256": "a5e72010ce5f0b89c2fda6859ca1d449388cfc6eb8cb59ad39e2fcdc27f5bc90", + "size": 111204 }, { "url": "https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-security", @@ -723,36 +730,36 @@ "url": "https://platform.claude.com/docs/en/managed-agents/define-outcomes", "status": "success", "path": "en/managed-agents/define-outcomes.md", - "sha256": "4bbd8ea7ba556d167c23bc36477769e74eb908bf60ca9b5d270aeef32935d03c", - "size": 32594 + "sha256": "bc06582b6888d004e127916297d8bdac0aa7c372ec92d5a0ecbc1c6616abc00a", + "size": 32453 }, { "url": "https://platform.claude.com/docs/en/managed-agents/vaults", "status": "success", "path": "en/managed-agents/vaults.md", - "sha256": "f74b7dc7ebd038ecc0e272baec9116b748b9670df22b74b25f1cd98be26a7a24", - "size": 46273 + "sha256": "1c652494ba286bb59083107a9d4b422ee2625f9cb244dd0e979801815ff7b9ea", + "size": 46440 }, { "url": "https://platform.claude.com/docs/en/managed-agents/github", "status": "success", "path": "en/managed-agents/github.md", - "sha256": "ab3d4dafb157927459b850d76bbb78c8f30cdea0d81928d492055c8e4e5565de", - "size": 26405 + "sha256": "c3c637893d4d865e14a491ee260f5713e29b0a1ed3fa007d4ed63f44a2221f44", + "size": 26615 }, { "url": "https://platform.claude.com/docs/en/managed-agents/files", "status": "success", "path": "en/managed-agents/files.md", - "sha256": "fa93cae0dea57e36a82a3fbacf2be0fffd9b2af57a4f755dd1ed76edc5e274fa", - "size": 20368 + "sha256": "8b147f057d087e19607096893a97000ec409c9d325a784c0d45519539a1dec4d", + "size": 20707 }, { "url": "https://platform.claude.com/docs/en/managed-agents/memory", "status": "success", "path": "en/managed-agents/memory.md", - "sha256": "9f2b4d1b678eff2eccfde12b67e2eaa6267fe75d0255dc2b861e8128538fa8d1", - "size": 46588 + "sha256": "88a5072c87d53c7e05afc023848d519caed70099e7e593e1a3cf5a18657858b9", + "size": 46464 }, { "url": "https://platform.claude.com/docs/en/managed-agents/dreams", @@ -765,8 +772,8 @@ "url": "https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration", "status": "success", "path": "en/managed-agents/multiagent-orchestration.md", - "sha256": "9cbb93a026c4d84fac22aa9d730dd15e139ccf19328253a4119736919952db67", - "size": 59262 + "sha256": "0086131670b4d61ab4cf4eaa2f8bc3a6d1f53de077f51a0b343c128ffb0ca9f0", + "size": 59960 }, { "url": "https://platform.claude.com/docs/en/managed-agents/scheduled-deployments", @@ -793,8 +800,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/user-management", "status": "success", "path": "en/manage-claude/user-management.md", - "sha256": "23d4ab4bfa7a8e09dcee5052e96e5e4042a35fcc5fde9e1e0733befd8330062f", - "size": 36772 + "sha256": "ab293c98d47b245abb946d61bfd8b28519b19a2c6aac44711ba2edbae21ba4b9", + "size": 36071 }, { "url": "https://platform.claude.com/docs/en/manage-claude/workspaces", @@ -933,8 +940,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/api-and-data-retention", "status": "success", "path": "en/manage-claude/api-and-data-retention.md", - "sha256": "f28771f6605286a50dc1cdc7a0b5696795b2481ae983bca5e308589e87318e81", - "size": 55704 + "sha256": "3f877d3fb2cfcaf996464093df16054a3bc3bbbda4c4b05afcf0ee1beecf2a01", + "size": 57303 }, { "url": "https://platform.claude.com/docs/en/manage-claude/access-transparency", @@ -947,8 +954,8 @@ "url": "https://platform.claude.com/docs/en/manage-claude/cmek", "status": "success", "path": "en/manage-claude/cmek.md", - "sha256": "cbcfd2c05b5cdb02c859584f1ea9ac12c4cabe25477ec5ffb01fcbb511aee3e4", - "size": 14599 + "sha256": "a3b9f67afd6ddcedcad65bcbbb01f3f5f07081fa7b674ae8f070dd06ab567367", + "size": 14727 }, { "url": "https://platform.claude.com/docs/en/manage-claude/cmek-aws-kms", @@ -1101,8 +1108,8 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices", "status": "success", "path": "en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md", - "sha256": "b0474bd421fa76ea027a60ce4f62a9c8d155ae74b7902229856b79ea0e3100ca", - "size": 60350 + "sha256": "9d20eb0ff0330b71cd4e090132f87f2c12b545f2da54ecb7ab8312a59567d70e", + "size": 60563 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5", @@ -1122,15 +1129,15 @@ "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md", - "sha256": "6bd3332a21d6e1293d254f2783aaa5c4b3ffb3d623a18f14346691653022e19e", - "size": 16230 + "sha256": "aa91b441e21a600365661a791ed5dcb0d8f672da3e9eb64be5bf7e6cf0d1dbf7", + "size": 16554 }, { "url": "https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5", "status": "success", "path": "en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md", - "sha256": "eb473374d7f194fb85ff272d0378a85e6e3ad5c94697982693a3290b9e4144f3", - "size": 16177 + "sha256": "ca6369e9fc527603e57ec6809d491f9133c427f64ba299ed85440d30c6885199", + "size": 16438 }, { "url": "https://platform.claude.com/docs/en/test-and-evaluate/develop-tests", @@ -1213,8 +1220,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence", "status": "success", "path": "en/about-claude/models/optimizing-for-cost-and-intelligence.md", - "sha256": "6544352825c60655c04ac0a7141c4d6fe8c69659943f2336894f31f450a1b57c", - "size": 77109 + "sha256": "08241834a7ee2863128209801d2d6261e49f5c35998d0957fb8928245552a179", + "size": 77670 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5", @@ -1227,8 +1234,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/whats-new-sonnet-5", "status": "success", "path": "en/about-claude/models/whats-new-sonnet-5.md", - "sha256": "4725151b28f3f459f8afc1992dd100ce46afbc831f9b252239eeb96df9fbc7f4", - "size": 12479 + "sha256": "66c374f15ce31ef36d7e8fcf9f020e6cda609b6b1ff86af5d2d954d0528b767c", + "size": 13244 }, { "url": "https://platform.claude.com/docs/en/about-claude/models/whats-new-opus-5", @@ -1241,8 +1248,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/models/migration-guide", "status": "success", "path": "en/about-claude/models/migration-guide.md", - "sha256": "70bfc31a2d442f38ed00224bff89ebbd88e7fbee2b61ab0dc3d0b533644f2b8a", - "size": 155362 + "sha256": "b81ebd536b83d233fca12365fd38094ab5caa24092b11910c545e792ecf82e7c", + "size": 157737 }, { "url": "https://platform.claude.com/docs/en/about-claude/model-deprecations", @@ -1269,8 +1276,8 @@ "url": "https://platform.claude.com/docs/en/about-claude/pricing", "status": "success", "path": "en/about-claude/pricing.md", - "sha256": "f5f156f59fa140cca57fd65ba6f6de5df38605d718d36e9562963dabda09e1da", - "size": 41569 + "sha256": "c3ea88b25e2906d72bc7b26693bb752bfb97d31952e5b814cf7f62d4087b2f8b", + "size": 43663 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/overview", @@ -1283,7 +1290,7 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart", "status": "success", "path": "en/cli-sdks-libraries/cli/quickstart.md", - "sha256": "02b99dff8d0b2c68181be06b245a431a69ccabc6fdeedf93257276015265d03c", + "sha256": "a857575b334097b4d83005a9a7bb7c83f9e4f53a1dac2aac2e3734986071b232", "size": 5120 }, { @@ -1297,8 +1304,8 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/using", "status": "success", "path": "en/cli-sdks-libraries/cli/using.md", - "sha256": "fda7f620c7c9d41b06b551feb938c964d6d3bc289e2bf736ad9023f1d3091e5c", - "size": 10593 + "sha256": "b20a5c22b2adb69508ee3e6a5b5987dba31dc32e64e892fde7cb5fadedbec8be", + "size": 10580 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/cli/scripting", @@ -1318,36 +1325,36 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python", "status": "success", "path": "en/cli-sdks-libraries/sdks/python.md", - "sha256": "822607cf9d05fc6ad35517e73dec58f2b39e9090a3518d26479be2ecc9017c3f", - "size": 25692 + "sha256": "5a643774883b7d53b80263b01de96be221f259fda5ff0b587c365e19a8b54988", + "size": 25350 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/typescript", "status": "success", "path": "en/cli-sdks-libraries/sdks/typescript.md", - "sha256": "952ebc34d91bbcca1519d8e04588c5b08a32ef73371ef696ea878bb0f187be3e", - "size": 29301 + "sha256": "1b8d5bf00ad725b133808eb2430da96d909f43d9598e4feb55806abe76fa8bdc", + "size": 29062 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/csharp", "status": "success", "path": "en/cli-sdks-libraries/sdks/csharp.md", - "sha256": "657972edfa15e2a5d8ab9a8828ad540a7854403ef2f66fdaa037ec5ad9bed1c5", - "size": 16069 + "sha256": "244dcd65b8275d9a9390b638e0fd356fb587ad9c858281a4b5d1f85263e47a4c", + "size": 16054 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/go", "status": "success", "path": "en/cli-sdks-libraries/sdks/go.md", - "sha256": "0a3aaaa11a5b1ca3dcbd0ff108cf6875ffa84b89d3b39df48e6a3f7437af1fed", - "size": 26120 + "sha256": "ce3545fa24f01127ab9034398bbb315765b3327b93f60d90a5fec78e8179e081", + "size": 26112 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/java", "status": "success", "path": "en/cli-sdks-libraries/sdks/java.md", - "sha256": "76360549422e5ec9696a58c58207a24f80f9b9ea0183c12cf4c56f9a1184e38b", - "size": 47969 + "sha256": "0be9aa48f1ae8323f0fb48f4f8161aa43aacd71a04c33daef263b95d5c40de46", + "size": 47316 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/php", @@ -1360,8 +1367,8 @@ "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/ruby", "status": "success", "path": "en/cli-sdks-libraries/sdks/ruby.md", - "sha256": "7837ea68db9d5c7fd79ec592667953437dda6540893436d05613bfff187a39c7", - "size": 14386 + "sha256": "3660091b35e27e6280cbb83a4443da1ed37b187ccd0ec4daf94df8e56aa59264", + "size": 14371 }, { "url": "https://platform.claude.com/docs/en/cli-sdks-libraries/libraries/apple-foundation-models", @@ -1381,22 +1388,22 @@ "url": "https://platform.claude.com/docs/en/api/overview", "status": "success", "path": "en/api/overview.md", - "sha256": "3185bf3de6f9edbe829303be1bf312dd99943b9b81f93babe3dcd973c22ae8fb", - "size": 19924 + "sha256": "d9c41059c7571ec7ab3ddeec2c71513c10eaa977eee686b2b1679a0e7be090ec", + "size": 19551 }, { "url": "https://platform.claude.com/docs/en/api/beta-headers", "status": "success", "path": "en/api/beta-headers.md", - "sha256": "62c3d3e998f78e7907b35ae7ee1e839d007f13efdfd8e9cd8a2a809c23bd37bb", - "size": 7583 + "sha256": "7c2e1adde91a48b50c677366419c2b57568490170196baf93fb27ad5fca7414b", + "size": 7784 }, { "url": "https://platform.claude.com/docs/en/api/errors", "status": "success", "path": "en/api/errors.md", - "sha256": "87c8bda8220ddcffda9f0d8824f2ab04c543dd57706fc3fad9fd1a8864fbfaf1", - "size": 24837 + "sha256": "6e23969c16ac8b56d1122872d75ea93da367caabc39673e4b442aeff91772a85", + "size": 25559 }, { "url": "https://platform.claude.com/docs/en/api/claude-code/routines-fire", @@ -1409,8 +1416,8 @@ "url": "https://platform.claude.com/docs/en/api/rate-limits", "status": "success", "path": "en/api/rate-limits.md", - "sha256": "e54c5365f0a127593003770d25bbf1cba51ab2fcb7fb887102350f8f49c954be", - "size": 29096 + "sha256": "a682f27ae2f49140970edf67bc142b0952df3a7d1acf1f4d4ad6657f9c2cf242", + "size": 32810 }, { "url": "https://platform.claude.com/docs/en/api/service-tiers", @@ -1458,57 +1465,57 @@ "url": "https://platform.claude.com/docs/en/release-notes/overview", "status": "success", "path": "en/release-notes/overview.md", - "sha256": "a971e0d8b406dbf8dc8d5c2f01c5b7965349c9e47ed004ea1f89c53f12a7409a", - "size": 91125 + "sha256": "475e06b144b6a94cf0a3b137d804e097fee0c69a8f60a24828c3c9ff17297adb", + "size": 92399 }, { "url": "https://platform.claude.com/docs/en/api/completions", "status": "success", "path": "en/api/completions.md", - "sha256": "943d70b4d49c91979ae3b86b706a21bca557bc3bfcf5b5c3d310072360ae9097", - "size": 12408 + "sha256": "5a36ebb10c78ff7a049ee14fbd591e9cac925e6541bd6cba95106cb907305882", + "size": 12444 }, { "url": "https://platform.claude.com/docs/en/api/completions/create", "status": "success", "path": "en/api/completions/create.md", - "sha256": "0b26a889c96343d82f18852b054c18d18b84eac3e5f390eb9c25d07db4458098", - "size": 9800 + "sha256": "26fa8a1eff7656ab54477aea4727e6a5a4b8a1fd281c3e82c007f1001f0cc32b", + "size": 9836 }, { "url": "https://platform.claude.com/docs/en/api/messages", "status": "success", "path": "en/api/messages.md", - "sha256": "740d6dab47889293f412ae5f2afe85897d0e2227935081d372724a6e773bb3ff", - "size": 804811 + "sha256": "82d3d65dd1ebc42ad4bc2bfd12027ba26fadab28a3dcee1f455b4b9119be9547", + "size": 1073102 }, { "url": "https://platform.claude.com/docs/en/api/messages/create", "status": "success", "path": "en/api/messages/create.md", - "sha256": "3b1f17ebe58d1e5db912263602b7fb0f094d5b1d4a3c9d4697bcdd76600f0afd", - "size": 95800 + "sha256": "da0609f007f3fcfe266ec2957f98c19e1efa955eaaa0537c3d7bc1d04290c60e", + "size": 129476 }, { "url": "https://platform.claude.com/docs/en/api/messages/count_tokens", "status": "success", "path": "en/api/messages/count_tokens.md", - "sha256": "d7bfe564d4c5878855b93e228b456c5973823039e85d82fd529a89b7e76e86f5", - "size": 64889 + "sha256": "56897ee3d1d344ec280c5acbc1e4163bbb1229d194345ae60f8b345a23430e96", + "size": 97343 }, { "url": "https://platform.claude.com/docs/en/api/messages/batches", "status": "success", "path": "en/api/messages/batches.md", - "sha256": "7455595f0dc26908437179317d78b606bec67de827d2f3d2c78473a904ef6007", - "size": 219371 + "sha256": "afdbc45e979be9352f4d2c98a27db6ed3960c6b92aa4c1882560b5281befc757", + "size": 256312 }, { "url": "https://platform.claude.com/docs/en/api/messages/batches/create", "status": "success", "path": "en/api/messages/batches/create.md", - "sha256": "47f67b64a06fd9470cf70471a7517d545a308f48f2c58f88179055236a12eb78", - "size": 76472 + "sha256": "6c9ed278e2e91b78a9804c88c4ba5edf34f98f2762f9cdfb93138d79b67f35a6", + "size": 111205 }, { "url": "https://platform.claude.com/docs/en/api/messages/batches/retrieve", @@ -1542,1058 +1549,1170 @@ "url": "https://platform.claude.com/docs/en/api/messages/batches/results", "status": "success", "path": "en/api/messages/batches/results.md", - "sha256": "fe55eb9180f89f04cacb2822b118d9886ef7ef3a82a5c88766000bf48fd19637", - "size": 32824 + "sha256": "1f0c9f7cc1414e35d1ba34dee5b5291ba858a66a0c9a046a87d7f3fe82a2d3b9", + "size": 33394 }, { "url": "https://platform.claude.com/docs/en/api/models", "status": "success", "path": "en/api/models.md", - "sha256": "71018a370bf21bbec67bda306c0d987b70e8a686b7d4c76428fa2a72c2f411bc", - "size": 21967 + "sha256": "5e368825a1b07dcbfb100251ebc4f7d551f223f11a1b5409a8a5c3ae5e0d84dd", + "size": 22031 }, { "url": "https://platform.claude.com/docs/en/api/models/list", "status": "success", "path": "en/api/models/list.md", - "sha256": "5b0b3af2e85f452e1db358849e107d35f5d8f8b0c02f220f8aadf7f0a450f9f9", - "size": 7483 + "sha256": "12e3dda39ed2c5d4717093b7e74bce2b065da8094273066d4353a5e426f2c2a8", + "size": 7515 }, { "url": "https://platform.claude.com/docs/en/api/models/retrieve", "status": "success", "path": "en/api/models/retrieve.md", - "sha256": "c41cae9eecbf93570ae0348623bb340dff5fa191b23356877f979c6137ba6571", - "size": 6448 + "sha256": "7a2c92cc2e77818bf4e6e182519213111473a75ee71329ab82d8fb947106b872", + "size": 6480 + }, + { + "url": "https://platform.claude.com/docs/en/api/files", + "status": "success", + "path": "en/api/files.md", + "sha256": "93d3e371ae59e89d1df453e2a1be8cac1ebc3e42af4540b22c27bd04f3a92103", + "size": 7396 + }, + { + "url": "https://platform.claude.com/docs/en/api/files/upload", + "status": "success", + "path": "en/api/files/upload.md", + "sha256": "f7bcfec51c633809fcb0d1aefaad5c977d5b0dbebed458a29a6593cd143958e3", + "size": 1557 + }, + { + "url": "https://platform.claude.com/docs/en/api/files/list", + "status": "success", + "path": "en/api/files/list.md", + "sha256": "e311a24c7637053edd5d35bec65efcde1476ef8d3839d12f4dd68e5f263b440d", + "size": 2335 + }, + { + "url": "https://platform.claude.com/docs/en/api/files/download", + "status": "success", + "path": "en/api/files/download.md", + "sha256": "2569ebea7900321ac8c7fa63915d8ead7cc124d33aac3003ce9ae6ab4b514718", + "size": 387 + }, + { + "url": "https://platform.claude.com/docs/en/api/files/retrieve_metadata", + "status": "success", + "path": "en/api/files/retrieve_metadata.md", + "sha256": "52bae154fd4121127f969cd6c66a35019c9cb085e7f302ee299d3da082f8e6a4", + "size": 1589 + }, + { + "url": "https://platform.claude.com/docs/en/api/files/delete", + "status": "success", + "path": "en/api/files/delete.md", + "sha256": "8b96e902defab904c1a386271e726b6e41472f1723ed4bb9868b259362119c89", + "size": 721 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills", + "status": "success", + "path": "en/api/skills.md", + "sha256": "95885a04753a985ddc5fe286412f95150dcbefccaa496d068c19ba64c231a575", + "size": 19199 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/create", + "status": "success", + "path": "en/api/skills/create.md", + "sha256": "1ba17dac161aa560fa7f481ea437551459edffa6b62b1898a5bce42d8d432ff9", + "size": 2323 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/list", + "status": "success", + "path": "en/api/skills/list.md", + "sha256": "5917ed2ce1e23f2a4244676f5825cc2cb23128ab0b95b246af626b15dcedf898", + "size": 3085 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/retrieve", + "status": "success", + "path": "en/api/skills/retrieve.md", + "sha256": "09463539d378f81b92f17aed67ed44186613dd1994df0183987878d128da622f", + "size": 2390 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/delete", + "status": "success", + "path": "en/api/skills/delete.md", + "sha256": "9efb7643732e8985e296160f3d17925d827f8066cc21725bf42a4f080824c456", + "size": 858 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/versions", + "status": "success", + "path": "en/api/skills/versions.md", + "sha256": "7fed978cfd16c4e55bdd38f3e2cdf6356b7bf1d2754574294fa4fa9223c1ffef", + "size": 8404 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/versions/create", + "status": "success", + "path": "en/api/skills/versions/create.md", + "sha256": "885d6928a10872063184dfb3aeff6884b63dc3e335ad91253bfd12ca0d3dfd28", + "size": 1794 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/versions/list", + "status": "success", + "path": "en/api/skills/versions/list.md", + "sha256": "f74d0a21ca72486edc95198d3b4ace31b13736106873bf7c4d1165a00dcec8f7", + "size": 2225 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/versions/retrieve", + "status": "success", + "path": "en/api/skills/versions/retrieve.md", + "sha256": "9bd12fab43a9416dae371e604a4fec95cc38083b2499547ee5d917183c064ba9", + "size": 2033 + }, + { + "url": "https://platform.claude.com/docs/en/api/skills/versions/delete", + "status": "success", + "path": "en/api/skills/versions/delete.md", + "sha256": "99bdadeee037aaa40a620489a0fb8ddacc01e49ee714fe6e83b2d9c7b1ea967d", + "size": 1274 }, { "url": "https://platform.claude.com/docs/en/api/beta", "status": "success", "path": "en/api/beta.md", - "sha256": "9ea3b267f652c146d25fd51c7c8b8e817a23a8cfe3142d9d9b04d31c0cb39686", - "size": 3135005 + "sha256": "06853585a495232ad4a6e3cedbcdc369cc682da405d065ff90863a483f98ea59", + "size": 3380778 }, { "url": "https://platform.claude.com/docs/en/api/beta/models", "status": "success", "path": "en/api/beta/models.md", - "sha256": "265127f78c8fa79ca529c13be0a67443e39cc73d7913418c7ceb1ec54101c9fc", - "size": 23238 + "sha256": "bb4e87e9e7c382ff37452e262ce99e38c638bea6c51aa8555af02c187cce1f06", + "size": 23302 }, { "url": "https://platform.claude.com/docs/en/api/beta/models/list", "status": "success", "path": "en/api/beta/models/list.md", - "sha256": "a39b537aca5147b1c96e174d1c957729b16403fa1eb450c7034df8b57a21d2e2", - "size": 7862 + "sha256": "bfc2c3d0d8ee99ebccc3927af53deb5c644a75cbe71095a9f9484d8651a9437c", + "size": 7894 }, { "url": "https://platform.claude.com/docs/en/api/beta/models/retrieve", "status": "success", "path": "en/api/beta/models/retrieve.md", - "sha256": "bd372cffede2902c400ea04863443bb2c8943517a1d99627fb965d9c42f1406e", - "size": 6828 + "sha256": "39a1cf26c8f0f4f47c8ca9368c33555df6b1c1559efae9afbff79065fd39d8ad", + "size": 6860 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages", "status": "success", "path": "en/api/beta/messages.md", - "sha256": "4d8d8c6d22eff11a3bd649e92ee7fba4b327010e7869b7afad64d85e9e3987a4", - "size": 1257291 + "sha256": "8d8b15663044af15a0725893ee81cbbe19898484584be6eedb64cc457259bdfa", + "size": 1482293 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/create", "status": "success", "path": "en/api/beta/messages/create.md", - "sha256": "76c777110c49a7cd53b9abcf8ef848df82aa561e538c7d93890359f754d06d3a", - "size": 149609 + "sha256": "5ddf75aaca5d763265a3195c02e0c7324f70317c1edda596e5745b5fa0f5e98e", + "size": 181395 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/count_tokens", "status": "success", "path": "en/api/beta/messages/count_tokens.md", - "sha256": "4e1909913e7052a535b06435915fe81f28204aa4df0dd1ac0aa60580bcd96b2f", - "size": 91897 + "sha256": "1bceedc9a9fd1cfc952d7cbbd9e480939d83c607dc7f419bf0c7493f26bf5528", + "size": 123578 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches", "status": "success", "path": "en/api/beta/messages/batches.md", - "sha256": "7599dddeabc101474b7e105564e724b63d4627d1bd5a9f81a22c57875ba3c5ac", - "size": 350912 + "sha256": "53cbda53efb4b520477f99e3d863b2a3ec84eced479eff6e5863c633232ae1ea", + "size": 384805 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/create", "status": "success", "path": "en/api/beta/messages/batches/create.md", - "sha256": "60215892a18d2db0494e85772891e0991f10b69fd9571a3085bb18152f2d8cd7", - "size": 110252 + "sha256": "1f99b21a0c85fdfdae2212c407f6bb98e82af9eabfb0136678e28eaddb54cf5f", + "size": 143493 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/retrieve", "status": "success", "path": "en/api/beta/messages/batches/retrieve.md", - "sha256": "f46fe45ce6e49904df468e8e2b75d09c7888ba3ddb4edff77cc8a2d401bfc363", - "size": 5798 + "sha256": "77ec6633bd900593e6c0e826d3365ee5bdadb37ad66e12adb6dc1bcf21afcd2e", + "size": 5834 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/list", "status": "success", "path": "en/api/beta/messages/batches/list.md", - "sha256": "c37a6d1cfe60a8e389a7524622fb84db0e945edb63d1057cd7dddcff4dadf9af", - "size": 6482 + "sha256": "e4f136d435009e1bfee86fb8e264fbd80af30fe285fee754b766bee7e4dd9658", + "size": 6518 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/cancel", "status": "success", "path": "en/api/beta/messages/batches/cancel.md", - "sha256": "a3eb5bd7b8b81b22bad18a7e3b95ea45d5d35aea05e77cf66584b04b80e5c271", - "size": 6131 + "sha256": "d1a1d192be217f109b837fff0674f4decd58ac24839812b3a76efb551e387b3c", + "size": 6167 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/delete", "status": "success", "path": "en/api/beta/messages/batches/delete.md", - "sha256": "d71fc90aa05527beeaddac3b05d7af2476fcce7d725805c947cec918302e1f8b", - "size": 2708 + "sha256": "3c8014ea0738726d3adcf89588b16a50a090f791c5706e5880734ab3d8217d06", + "size": 2744 }, { "url": "https://platform.claude.com/docs/en/api/beta/messages/batches/results", "status": "success", "path": "en/api/beta/messages/batches/results.md", - "sha256": "72773264730071ee4bdfc06898268909a60cfd1ecd934a1846ea5da49ed87d28", - "size": 57343 + "sha256": "1f40be53c32f386a007201d801009544612e9122225d7e6179e401b2ebecf608", + "size": 57500 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents", "status": "success", "path": "en/api/beta/agents.md", - "sha256": "890f89cfe149e6afacae2597d15466f1fd44960daecea31f033b5e1e1d9d3a4e", - "size": 157265 + "sha256": "1e99b06bef6e5e6acc5d9bf2e2fc71a1f575fe9cb239f65c6bd7aa9caad90786", + "size": 157449 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/create", "status": "success", "path": "en/api/beta/agents/create.md", - "sha256": "7d08f1aa881217f998fe552a42bd713e496a2a929bc799fa87205f0a1b320715", - "size": 26256 + "sha256": "1d44b3d8509c31a38ee60d98ec623f1220b8b5d2f34ad74122eedacc9b488ce1", + "size": 26282 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/list", "status": "success", "path": "en/api/beta/agents/list.md", - "sha256": "74e61f7be468fc61123bb074e0341660492de46afcd0fca01dde5be0891a2e8b", - "size": 13402 + "sha256": "d538c58b03a70154207f9bfbbb16201d061f55b0c24cc3d01e454f5b7e712fc9", + "size": 13434 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/retrieve", "status": "success", "path": "en/api/beta/agents/retrieve.md", - "sha256": "ff368cbd33bf83b77714fd27151e4312c24f50611bc020c9daac8ed70c747566", - "size": 12725 + "sha256": "1b4218c6b99e6e14cfddaef699f6b7c7632a76ed83a1eb0df63d33f8bc155592", + "size": 12757 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/update", "status": "success", "path": "en/api/beta/agents/update.md", - "sha256": "10a1f8ba74ecc007e2385d9e537649ce1e96db5987b1a099ebe249c80edb7100", - "size": 26861 + "sha256": "43065489191e38de746156a328bd21bd05bfec45b45bdef1f200e643e863a402", + "size": 26891 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/archive", "status": "success", "path": "en/api/beta/agents/archive.md", - "sha256": "7ace85a6dfdb18f3b46f18daa2b49946be62aee8a0074b01db312b78c3380932", - "size": 12630 + "sha256": "0e257b8af5594e1e9848f4caa87443307404420e02a1a0e8903dc68dc095d09f", + "size": 12662 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/versions", "status": "success", "path": "en/api/beta/agents/versions.md", - "sha256": "4b32b386be46a613e603da69bcdd32b6466958f49edb8fbb5c448bb4bf1d4c2b", - "size": 13189 + "sha256": "2887ea77efe2e3902a07047e1d2b0d1fe649f1f6292bda282f74a2904ee3c65e", + "size": 13221 }, { "url": "https://platform.claude.com/docs/en/api/beta/agents/versions/list", "status": "success", "path": "en/api/beta/agents/versions/list.md", - "sha256": "5d4b93e60623d44b6f3a28f48ae1214a3b6d51e8681157d06c3bfc03004961cb", - "size": 13193 + "sha256": "00904a65c6e6c5b9d4d6993435171e3afb1a8918a6c00072347039171b678027", + "size": 13225 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments", "status": "success", "path": "en/api/beta/environments.md", - "sha256": "3d9d2b4c3fc3a9b1b0c966e577d0ed3638b88b64c2aa3155aaded625f08462aa", - "size": 92063 + "sha256": "d0e9ea06b54fd29b77fd999301a9d73bf3fe5d4b87e9e1eacef9b58f3eea2076", + "size": 92803 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/create", "status": "success", "path": "en/api/beta/environments/create.md", - "sha256": "1d1557d8bf2cefd418c46e9d59a0e05ded7c2ba46fafc3305fa69a461d8807d7", - "size": 9920 + "sha256": "4c57c6df4f9740c622da855d4c5c2c4195627bad701a932477a3695318f9ecdf", + "size": 9981 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/list", "status": "success", "path": "en/api/beta/environments/list.md", - "sha256": "df73298cae9b5a76dbd47402906c32b2eeefcce81e034febcb330ec2cd102c32", - "size": 6601 + "sha256": "7a52c8c9db31250e3bf80f3134453d976358ca4ccd8e1f771cfcfebab0cf26e0", + "size": 6662 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/retrieve", "status": "success", "path": "en/api/beta/environments/retrieve.md", - "sha256": "23979aced5e274b8eac3c0cb22c745de2b09bbabafda3238d99de6aecc29b489", - "size": 6002 + "sha256": "1f64f89f71f3b3aae01d7cfe9496e6a56267559bf77e807dfcca19510525455b", + "size": 6063 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/update", "status": "success", "path": "en/api/beta/environments/update.md", - "sha256": "3d74e936ddfe32e85e0d9d5609ccdbbc8763158dbe1e9fe00bef0c454b7a840c", - "size": 9523 + "sha256": "701a943e3455ca09c599b94e7ea4c6188ab7f7222e59d782375504e7b688bef4", + "size": 9670 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/delete", "status": "success", "path": "en/api/beta/environments/delete.md", - "sha256": "e36b27b075e0feda60db9d9f05996378f8c621e17729966ae10e8ca73a3d52d1", - "size": 2389 + "sha256": "944c317c9443dd60831ce6ac1e73c97590857e88fdf1747a7a85a4a59c473675", + "size": 2425 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/archive", "status": "success", "path": "en/api/beta/environments/archive.md", - "sha256": "00ffbd78176871bd4b3bd223f4b9c762742b832ac19a2a3c4e99584e3b73156c", - "size": 6092 + "sha256": "84c37da5ae8d9906bc770081f7ef4af5150d3d116a0a1b0e490168494d43ccfb", + "size": 6153 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work", "status": "success", "path": "en/api/beta/environments/work.md", - "sha256": "63706539f877363c4f0a532be4a2c39ff7e8bee3ac4f1e6fcebba5414267c62e", - "size": 41067 + "sha256": "c282e6d28e2059c52ba20fa2377808be4ac4129d921635e2bd471b63d4f8ecaf", + "size": 41355 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/retrieve", "status": "success", "path": "en/api/beta/environments/work/retrieve.md", - "sha256": "d3e537c03420fe8d21369549b6360d026c32fc1004621f56f339e1a717a4b38d", - "size": 4608 + "sha256": "74651ed11ce1241705b0fbb07cf6771957aea3b2781332bde45341179b9c00fd", + "size": 4644 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/poll", "status": "success", "path": "en/api/beta/environments/work/poll.md", - "sha256": "371b93dbc8743eac6f90ce0623c2a8f147d42fe6a0439c3afbd417c5a376224e", - "size": 5088 + "sha256": "777e0dfc75ec80856aa23c8e5130bce2ed49ceb45484c93c4d6324afdfca5743", + "size": 5124 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/ack", "status": "success", "path": "en/api/beta/environments/work/ack.md", - "sha256": "b3a6a1ce573cc073a5b6b9e644889f8a10a359b85eae121f208b8566fec273e2", - "size": 4687 + "sha256": "3437299423c19095f91b8f2a96ac73f86f0ea83ab57a3f77f14cd36e1402390d", + "size": 4723 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/heartbeat", "status": "success", "path": "en/api/beta/environments/work/heartbeat.md", - "sha256": "c7f16a593343f00a25e917b1ba13745f7f6973937a6c95cb078a85dc4bad3cb1", - "size": 3666 + "sha256": "8c100fac8f14b1a7500414b5d19b72258c65c670f351a28b31799e3b1fb5a80b", + "size": 3702 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/stop", "status": "success", "path": "en/api/beta/environments/work/stop.md", - "sha256": "45530037afd8931a7b3700ac87ede4ed5fecea690b3e3d7ee4e310ad4b2f309c", - "size": 4773 + "sha256": "d6732abbe47a4aead772f102b857534b19672cacec9a7c36e7439c3206b7b781", + "size": 4809 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/list", "status": "success", "path": "en/api/beta/environments/work/list.md", - "sha256": "1e9abe15936e79f9792b3c20e40532f3be7c7c14b71d6df96e21f3d9b670ecb2", - "size": 4872 + "sha256": "cbb66b6703dbecb74b592c1a12054560e80ead9bc7f6e359a8cda0e1becfc934", + "size": 4908 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/update", "status": "success", "path": "en/api/beta/environments/work/update.md", - "sha256": "7c1dff220e566141b9dbba950f08a399b732c49f5dd1882c30b88625d8633a13", - "size": 4906 + "sha256": "c7268118472991227c9e6bdfe9d17dd2cd771f4a595d86720c66472aae712a05", + "size": 4942 }, { "url": "https://platform.claude.com/docs/en/api/beta/environments/work/stats", "status": "success", "path": "en/api/beta/environments/work/stats.md", - "sha256": "9552f1d45ac19d0d6eedf91b2f2c6bc74578e6fc0280e18cb5767372cf0e74d2", - "size": 3006 + "sha256": "6fee8cfefe29b5c3eaf214fb01cca6e931bee6ba3de25d4d74a2a7ddea883228", + "size": 3042 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions", "status": "success", "path": "en/api/beta/sessions.md", - "sha256": "1a299f892c271ddd295708fa9798d783361f7a4c0187f59567b4c9542c2f4a2f", - "size": 951557 + "sha256": "011726b60532f9e9aa9096b1c6a3ad87ff1539c575c06431380bb109a56b1c57", + "size": 952185 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/create", "status": "success", "path": "en/api/beta/sessions/create.md", - "sha256": "8b52beb085a67d85a29c0346e2b74249a8028b075c5868c5ee3d6d9e447d3a67", - "size": 47127 + "sha256": "baedf1f6c5005e2f50178788c12b611c3837a32d459606c6835895678d6fa859", + "size": 47153 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/list", "status": "success", "path": "en/api/beta/sessions/list.md", - "sha256": "b7f6f600bc57901a6d180442e1eb8e3d585e7d6c6702018192ab62379e71a55a", - "size": 27503 + "sha256": "95dfcad5d92543ee25f275b2a0692aca2ed050f0ee37e641e367f202504ef58c", + "size": 27531 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/retrieve", "status": "success", "path": "en/api/beta/sessions/retrieve.md", - "sha256": "5ed04648b8fc4a10bb03cf758e3c1779c6b034389eacc9e34d256807cd4509b4", - "size": 24994 + "sha256": "5482a8c0c9aa828dc27a6135252e53b51ccacca5a4e9f853ff580776ed3b7a97", + "size": 25022 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/update", "status": "success", "path": "en/api/beta/sessions/update.md", - "sha256": "f3d10ed768babb1a090891be30748e03c453eef9b217dd472f130f52ea05b078", - "size": 32298 + "sha256": "23f67e34cfd59c2a77a7a099d6277006a1d4ea08580b634682e84c740518f9f4", + "size": 32326 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/delete", "status": "success", "path": "en/api/beta/sessions/delete.md", - "sha256": "f23f4242bc0f31569f54f53fb98057f07f2a5e734a10499d6cdae3fdbb099908", - "size": 2260 + "sha256": "8126c4e21faebc06e417c444b161f76b40ea397048c6157f030685c79fe87928", + "size": 2296 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/archive", "status": "success", "path": "en/api/beta/sessions/archive.md", - "sha256": "d5127940588dc6611e0023b2851f98a48ef43f1e90cb5b69c7af33c933474be8", - "size": 25036 + "sha256": "ff37bd6e86e9c0c76ec42e5c634ae17e393b4a60fe97fced79e38b3cdf8830f1", + "size": 25064 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events", "status": "success", "path": "en/api/beta/sessions/events.md", - "sha256": "2351aecb0f961844b981d1f830eb22e3e22fc5cd63acae11f8975c55f30660b1", - "size": 407637 + "sha256": "1409953ebd73cb68cc5d09bd0bef96dc50cdd267fbbd2874ca126f102341316f", + "size": 407745 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/list", "status": "success", "path": "en/api/beta/sessions/events/list.md", - "sha256": "eaf066874b7d906331e20016a7f43f606f3e3d0b005ff648fa777689d8e736ed", - "size": 64578 + "sha256": "e9f071c01c15c924f48dd9a19b9ea12117005f6e0667969a2acd17e17d73541e", + "size": 64614 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/send", "status": "success", "path": "en/api/beta/sessions/events/send.md", - "sha256": "affed6417e85d85bf5e4ced97208b52e2967bc9a4ff7753987edffe521bbaaea", - "size": 26738 + "sha256": "50edd905d06e954564091542f86ae2ae913adb4c928f7b7f8234c5865c6461d0", + "size": 26774 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/events/stream", "status": "success", "path": "en/api/beta/sessions/events/stream.md", - "sha256": "6896f719f64da29b1378dd3ca76323af3a10c24fe25a3736fa875eea59d1cf0b", - "size": 66764 + "sha256": "243751f9d6f8469c32e9dff4fcedacbafe061f4861da4f12c24db873d4dec50c", + "size": 66800 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources", "status": "success", "path": "en/api/beta/sessions/resources.md", - "sha256": "d7bff3a1726f4aa20a3e9cb90e1a68f4e25a8cb8662913a5ff8cb9be64fd063b", - "size": 30718 + "sha256": "d31478f001455066a64fb6d133c9963dab9cf412d0c3f669ad3bc737de2eb3a8", + "size": 30898 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/add", "status": "success", "path": "en/api/beta/sessions/resources/add.md", - "sha256": "a949190bd490eb8144e45ca1fd486ffa383d28058ed477152aa65642885a0b4d", - "size": 2975 + "sha256": "e89e9ccb03fdb3272d030ae4ba19cce70eb55394c602ce35f540144babe8f4af", + "size": 3011 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/list", "status": "success", "path": "en/api/beta/sessions/resources/list.md", - "sha256": "750f6ac686c23f520253f65c3dbd84347a4746aa38aabc395e26a7d941c4883b", - "size": 5571 + "sha256": "37508e274cb1c9d342e6d5f1b9086dbb58a18efef6341679c4ef9002e5287616", + "size": 5607 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/retrieve", "status": "success", "path": "en/api/beta/sessions/resources/retrieve.md", - "sha256": "ae9be5edc951ae1355ac141d4f5a152e245ab3d5461bcfd5bdaf139643978592", - "size": 4694 + "sha256": "50f9fe2f1efeb8dc4ec62aed4ee3284eddafa1e7638af5451e73fa67eb7809db", + "size": 4730 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/update", "status": "success", "path": "en/api/beta/sessions/resources/update.md", - "sha256": "efaef832afbdb0ff45fba05dbcc1843b94f6a86e46998b94ae5d795d06a4635a", - "size": 4987 + "sha256": "d9c0c43f40a479acf9188980d396bcb4ec6bbd214c4a7593592972c9fbd2501b", + "size": 5023 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/resources/delete", "status": "success", "path": "en/api/beta/sessions/resources/delete.md", - "sha256": "c845f9ac95aa3fe71afdf5743fb581e76f9025a435c3b31f2a4b1fd00edd8fa0", - "size": 2380 + "sha256": "6cfad0f186e6cdd829b9dd1c486c96a7093fb7688328e191aacd134fbefad8db", + "size": 2416 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads", "status": "success", "path": "en/api/beta/sessions/threads.md", - "sha256": "51b9bafa2794f029b5978ff90b6ac358a5e8c675e24ca122dbacf7638ec02887", - "size": 258823 + "sha256": "d2f056c6146f66752f71545fea0fde3f3a0938300dd2c22a717a5a75034560f9", + "size": 258991 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/list", "status": "success", "path": "en/api/beta/sessions/threads/list.md", - "sha256": "298b8db78c8f176585801104bc4d97de8064c75371b2b60ee13bf43f93ffbc75", - "size": 17002 + "sha256": "159e7cb599918cf1c9fa13d16cfd7bbc4c25076b1030733a6ed9306d2e06122b", + "size": 17034 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/retrieve", "status": "success", "path": "en/api/beta/sessions/threads/retrieve.md", - "sha256": "5edb17148a8d2e6a45f2d08d85d5a68977fd3d3092b18f071a8bb1214828ebf9", - "size": 16421 + "sha256": "8aea8e433592596870ad56004b83420756973e9c1823d21f142a1e05c54ccfc4", + "size": 16453 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/archive", "status": "success", "path": "en/api/beta/sessions/threads/archive.md", - "sha256": "4f392997ad6c702d741bfec1b1649290aebd7146641947f7f8fa6ce6191ed520", - "size": 16463 + "sha256": "cae47ca35861720c296b1ab471aa597114bc7173f8a3e28a75293698f52396a1", + "size": 16495 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events", "status": "success", "path": "en/api/beta/sessions/threads/events.md", - "sha256": "cf43caf6626257d156ed0f49e5c6e1ddfceaa8d8dcbef5130daab10faad76024", - "size": 130149 + "sha256": "6c29cc43fab28f2c3a077f89ba843baedc29daa9adcd2fc3ca1519ae617a548e", + "size": 130221 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events/list", "status": "success", "path": "en/api/beta/sessions/threads/events/list.md", - "sha256": "83898f19e067f55e0cfaea763b7a3d4f5f03df6d45a77ea4dda8df9686fddedc", - "size": 63412 + "sha256": "bc92c33eede6e4f7b0c63ddec2ef416973f6ecb3250612047d492c75529d552a", + "size": 63448 }, { "url": "https://platform.claude.com/docs/en/api/beta/sessions/threads/events/stream", "status": "success", "path": "en/api/beta/sessions/threads/events/stream.md", - "sha256": "40534b166d7f78ee30b42628e2bb9a5e8d3a73600a641407f9d5fca24b1600be", - "size": 66877 + "sha256": "a0714868e27b8ac7cd1cfab0cb9f33906f13cb32f6e7b6b89abe4f897c779f9d", + "size": 66913 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments", "status": "success", "path": "en/api/beta/deployments.md", - "sha256": "b61ada0f3e950d4c50b081237ccafe8ce0576a2a94c5dfdb6cda1b2aa5f7c923", - "size": 224350 + "sha256": "95a3d37e50e4d02c51f21d8daa8e567994dae7766500e2f21e9378c71265a494", + "size": 224638 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/create", "status": "success", "path": "en/api/beta/deployments/create.md", - "sha256": "3a43354aa63f8ae218a81985f419f8c5b5442c1598f797bd66f747c74e1fff50", - "size": 30625 + "sha256": "c42bccf6bf1fc7fb16137280c9f028f15be566cc47c278c2aad4361518730152", + "size": 30661 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/list", "status": "success", "path": "en/api/beta/deployments/list.md", - "sha256": "63e4776bb33125ca84f47a453849b6cb1567b97a1700dca3326f04fbd6e44b81", - "size": 20026 + "sha256": "e76c94abf05fb37315f785013d5473ce4545cdf12ccd4ddd601320d7133aa4e5", + "size": 20062 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/retrieve", "status": "success", "path": "en/api/beta/deployments/retrieve.md", - "sha256": "158e8c30cc76928d231c9e321b4c9a22b8d08f6b589f986ed030e752184e0ed7", - "size": 19098 + "sha256": "d617c0fb858394b62fd6395a016c309977fdad5e0b7b4a98e7d17af741b4afc3", + "size": 19134 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/update", "status": "success", "path": "en/api/beta/deployments/update.md", - "sha256": "fa40297b1b6ceec75015361dd7c80a17558ae85af36d03bac849550984fe7e4e", - "size": 30547 + "sha256": "c5fe2661ba64a7d1ce738f169cfa77e10e08daf86361ff0d6945123a7f07507b", + "size": 30583 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/archive", "status": "success", "path": "en/api/beta/deployments/archive.md", - "sha256": "555a8fb1076646454aae6bf8e88397f2d842d70d957fa8f9c701e5c40603774e", - "size": 19140 + "sha256": "552c9c4c13db33e26762d23f425eac42de75e003b97c80390816238dc9c7dbba", + "size": 19176 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/run", "status": "success", "path": "en/api/beta/deployments/run.md", - "sha256": "bf0274f80680d2bbdc064dd1221db73a0878f424b8929825ed597273756659bf", - "size": 9096 + "sha256": "64b0a80db90e3b0b7ecfcd81d31a289fa5b745ba792a2baae5cb9cecfa6145e7", + "size": 9132 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/pause", "status": "success", "path": "en/api/beta/deployments/pause.md", - "sha256": "a9f45b5a15c8582c2a37f74d7c0f9678ae9f30f53fdd4b46d6e223fea8cacda5", - "size": 19128 + "sha256": "209ae6fb7809d750b17351e8ef6489ed4f605432384d77a9e9ecb71c1794f662", + "size": 19164 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployments/unpause", "status": "success", "path": "en/api/beta/deployments/unpause.md", - "sha256": "7643f1e1781f77b24d3cafe468a0f8cc5373958c70e5ec4a57dae2d27051fac0", - "size": 19140 + "sha256": "935727f1025cf93020d9924436eb0f05014cd76e92f6090eef5c170d9701dd89", + "size": 19176 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs", "status": "success", "path": "en/api/beta/deployment_runs.md", - "sha256": "fa364f42e9d36b70648b16ee12dddd280623cdd127abb5a526cb57fbcaf85971", - "size": 32724 + "sha256": "c0691b284f5aed2cd192ebfe6cecce7358bca2604f2d55680144aa3972c7e189", + "size": 32796 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs/list", "status": "success", "path": "en/api/beta/deployment_runs/list.md", - "sha256": "4cf3ede150d6a2ce9b673e43287a65f9149e3550f15ddbfa0856757ad9cc8516", - "size": 10224 + "sha256": "bae32136177fc20a875b5187d32eda466af2cb08281dfe4e486c8d6af0563f6f", + "size": 10260 }, { "url": "https://platform.claude.com/docs/en/api/beta/deployment_runs/retrieve", "status": "success", "path": "en/api/beta/deployment_runs/retrieve.md", - "sha256": "230624cb5a2c81046a245df269204a629e3c21cdf54fe132d8586538c972feb0", - "size": 9102 + "sha256": "b4b3f6a710bb8981d8e8fb5c4c2b1a30df0bcf7966cfb61adff4aea687c4a16c", + "size": 9138 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults", "status": "success", "path": "en/api/beta/vaults.md", - "sha256": "7a0b4cc8affc857366dd748dddbe007c4aeb95ed5682b44a59da438af50f3489", - "size": 101677 + "sha256": "88e979b21f86197cd2ab2f303250f11c262b74a6fd06ad9bf51ba28e08870c3d", + "size": 102145 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/create", "status": "success", "path": "en/api/beta/vaults/create.md", - "sha256": "9c6dca10a23e464b51765f02d9bf1f7fe2782c920ca1742a82ca334be850a553", - "size": 3174 + "sha256": "26d387fac628b951bafb252122a869f0c97b9d284bbf87d2459bc06747d68153", + "size": 3210 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/list", "status": "success", "path": "en/api/beta/vaults/list.md", - "sha256": "959806d2b21d2842a7b83fb2974dd28c6ee45155ab914656885d694f565ded58", - "size": 3190 + "sha256": "9448e1ecfd89a202965372e9c7b02c4dd4ef1a3485505e50328c51e7401d5a21", + "size": 3226 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/retrieve", "status": "success", "path": "en/api/beta/vaults/retrieve.md", - "sha256": "4106ad44b3fe0175fcbc94e43272e487b872468485499216a543732510aef70a", - "size": 2788 + "sha256": "3ef34725482a3b20c36445c1d1f74fab19ceac41745b3dbc06c6b3363e1df200", + "size": 2824 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/update", "status": "success", "path": "en/api/beta/vaults/update.md", - "sha256": "dc02cb40432d7b25f6e1c3cdc4f6a7982ae39402bba74df51b2f4215a2bba68b", - "size": 3260 + "sha256": "74ea7c3310c8e69716abd6b33a59568d59e2a03524e4f9c7353b9114c5febae4", + "size": 3296 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/delete", "status": "success", "path": "en/api/beta/vaults/delete.md", - "sha256": "4cd78ccb66bd0147ff564bec21902a7edbd56629f0072e7f47abc4d73f3239e9", - "size": 2251 + "sha256": "852eefaeba922f67d4555595ed813f947902dd0376068db2e76373e1e96869ba", + "size": 2287 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/archive", "status": "success", "path": "en/api/beta/vaults/archive.md", - "sha256": "e66fbd9efa05490e8881220b2ee6e296967e9c6158b0db7df21496798e5eb347", - "size": 2830 + "sha256": "094debca00823eddd8679b8497d1e93ce4d5476e1a910d162f4cb1c371def559", + "size": 2866 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials", "status": "success", "path": "en/api/beta/vaults/credentials.md", - "sha256": "6440097a3ebbdbabc85051a15622b51664e576b299fabf6ccecd8ff83c7fa380", - "size": 83858 + "sha256": "e67a7955115e4ba1196d27d1e10082f41987bf2859520f3cb694d16304538b02", + "size": 84110 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/create", "status": "success", "path": "en/api/beta/vaults/credentials/create.md", - "sha256": "9bcdbfd1b0c11dd72b8ee6e28bd90b9a25e7ff39ea24764ca592a50b494dca19", - "size": 12221 + "sha256": "181c361eeba99a1dad84b6a8ff1f0263077df8c8166c72c5af377cdf0ba59463", + "size": 12257 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/list", "status": "success", "path": "en/api/beta/vaults/credentials/list.md", - "sha256": "21e59018cb8513ee730061573f461dad6ee434c36f3158ac525b815193afb2ce", - "size": 7634 + "sha256": "e4eff797561de3b20db336a6ca1340a554ad32133ff6689ae130b75db77b48f7", + "size": 7670 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/retrieve", "status": "success", "path": "en/api/beta/vaults/credentials/retrieve.md", - "sha256": "1e5a93eebb87ebb8453a417ee1ad49780dcf1b9feece378df984bc7e311c0484", - "size": 7195 + "sha256": "e31a0cb6e1b792b69aeb9d24658e2476e6e7af5271d91779efbcc60977a6be72", + "size": 7231 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/update", "status": "success", "path": "en/api/beta/vaults/credentials/update.md", - "sha256": "e266f2815a1471ee574141caee4beab76f41370cd7264aa033704f675ac43af7", - "size": 11540 + "sha256": "e32c381a2990dec8624ce562db92cac393048506d2db221c557fcfcb5be0e0d0", + "size": 11576 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/delete", "status": "success", "path": "en/api/beta/vaults/credentials/delete.md", - "sha256": "ec57cf19c53c42d4330fd783ee262d2e2df59531d09a52c18c02020c540b6ec5", - "size": 2409 + "sha256": "24049d79042977a98a4c12218016e7e1879b0f9b92ef8deb8c612664a7b1ea5d", + "size": 2445 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/archive", "status": "success", "path": "en/api/beta/vaults/credentials/archive.md", - "sha256": "62f35ab85017d11244b5b9e1244ef81730911f851f677e49904c0ce91307b170", - "size": 7237 + "sha256": "2a43fe6159a4219de7abb8816673d0b98bb3ee66cea675b695b8491e57db03fc", + "size": 7273 }, { "url": "https://platform.claude.com/docs/en/api/beta/vaults/credentials/mcp_oauth_validate", "status": "success", "path": "en/api/beta/vaults/credentials/mcp_oauth_validate.md", - "sha256": "99a47b3c5cd77431cfd347d9703e8f808a3344c2a60d21b49d5273459e3472bf", - "size": 4707 + "sha256": "b6ae3e54674fed5eeebadb0f34a33cd3c186b557e4052cf29ec4c931580614eb", + "size": 4743 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores", "status": "success", "path": "en/api/beta/memory_stores.md", - "sha256": "fa711bd4dcaf93f3eeecd1d0debbe90ccdbe03c9c181e583dca01e703d9d8081", - "size": 88969 + "sha256": "bca5447e6132a2c128598208092f65dba7767b2ae97221def4edbe5c2f4bd245", + "size": 92079 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/create", "status": "success", "path": "en/api/beta/memory_stores/create.md", - "sha256": "c866e4b60daec6bb4a183bdec8221c50a0c695be8d580432f2dd535da0428027", - "size": 4404 + "sha256": "0321a3257a69d4e55dfa2cd562ff96b69358e37ac59018eb7ad1cdf544efbe04", + "size": 4440 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/list", "status": "success", "path": "en/api/beta/memory_stores/list.md", - "sha256": "dcedf64f39763466803b0b2d905b3355708db61bc2e4d873e5649a3e6d775376", - "size": 4530 + "sha256": "2d9fcbe05c09efc49927710a44473c466bb239e75b179d4c3c14c2c1be860de4", + "size": 4566 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/retrieve", "status": "success", "path": "en/api/beta/memory_stores/retrieve.md", - "sha256": "0029413cc55d7fad1497ee2759322e3044b4f5fd1939c0f0af6efb50f2d87088", - "size": 3667 + "sha256": "a59e928ca61c651cd468981bb117bfaf59e37c7f98add7ed0d5ce9a9fa05ba3e", + "size": 3703 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/update", "status": "success", "path": "en/api/beta/memory_stores/update.md", - "sha256": "5b8700e8022ee9eea67cafe3a29a1550f653d0823e5cb43b9192e3a55d02a7e4", - "size": 4328 + "sha256": "137d2feafec3cbfceedc968f60727a0199f4c5c538d92302511a667f77b02754", + "size": 4364 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/delete", "status": "success", "path": "en/api/beta/memory_stores/delete.md", - "sha256": "f7e087f361de6487aa609f7d835e3dedc0d874aaae1295eb91c239ad84312bbf", - "size": 2427 + "sha256": "6493fc2efbc9156ea8200dc05ba7be3e98f7a8e7a0e14a1bbf2f902bed529cdd", + "size": 2463 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/archive", "status": "success", "path": "en/api/beta/memory_stores/archive.md", - "sha256": "3dc0fb04d20026a9e4381d8ae55a5a4fc12fc2a9d0d915a8b53ec6eae3d469f5", - "size": 3694 + "sha256": "0a92a606e73018b66b242f21e931fc189fc172b5fef1d8eef5602d871f1d5f96", + "size": 3730 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories", "status": "success", "path": "en/api/beta/memory_stores/memories.md", - "sha256": "8b86615135df037adf74eabaf92090607c919a89a591a0686aa4a1dd4ec49dfc", - "size": 36984 + "sha256": "29a6cc943f2bcfc98868f97c41c894c9e88b82e544bc58088fc088e510a473c8", + "size": 37164 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/create", "status": "success", "path": "en/api/beta/memory_stores/memories/create.md", - "sha256": "08f5ebc286a70998ca5fa100b24baac84636de05da3fb2b0df31799c91bc0426", - "size": 5219 + "sha256": "9987662f268c8529b1adf7e438242cc148140d243606aeffb40ee83134cd59a3", + "size": 5255 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list", "status": "success", "path": "en/api/beta/memory_stores/memories/list.md", - "sha256": "23f1b7f2e78d2c68fe86e9f5a2793f0ba9baac890facf66f23ec95e99ef4ee17", - "size": 6905 + "sha256": "65bf3ead29633c511716ed966afd1b4d22b644a3074685db1db90a74bc0dedad", + "size": 6941 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/retrieve", "status": "success", "path": "en/api/beta/memory_stores/memories/retrieve.md", - "sha256": "c0b5f49a1fdb38b13eace2b5bd9e2cd3bb21c0492dee9b15a024e1034bcd2881", - "size": 4652 + "sha256": "9fc7161e320178b3626604cdf7513c6b9e9aaa9057105775cd277bced0ef1b02", + "size": 4688 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/update", "status": "success", "path": "en/api/beta/memory_stores/memories/update.md", - "sha256": "095a9950921753a97304719766d4302db847aa24b624957eb36a83aff2e09068", - "size": 6146 + "sha256": "325194408ee4985e4c3b9bc4a095d3496733248e253975c5ddbb791f49e15e39", + "size": 6182 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete", "status": "success", "path": "en/api/beta/memory_stores/memories/delete.md", - "sha256": "fbaef1bc1483b6afbffb7e301bc2881807370cd9c714816442e2d1e2c8d3567e", - "size": 2704 + "sha256": "e5b6dcfbb42e34c98ac1167de1d98887546539ad500dd1db391b911f1c89fb61", + "size": 2740 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions", "status": "success", "path": "en/api/beta/memory_stores/memory_versions.md", - "sha256": "a22d9fb9a85ada2355449e3faaea0746b1789e9c9e3ab240498bea670bd5b40c", - "size": 27874 + "sha256": "d35cdcee722d5623f265f74092fa558625aafeab01a9e8761c6db12932bc5dea", + "size": 30588 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/list.md", - "sha256": "d89cf156d1467fff22fd0862f2fdf3bdfce69d1ff57b2e507efb40d52f4469cd", - "size": 7403 + "sha256": "5b3579e1f909b5c5bdc877a2acac6dc2c4ed69956bc20c6f60266368da4f43d1", + "size": 7934 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/retrieve", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/retrieve.md", - "sha256": "1240a330fdd7255027b4bee5fe172b569d67e9669ea4326dae0a95f93131b0d2", - "size": 6848 + "sha256": "68ac0f2f44452a5701f7ef1f5ed555a3c2f0ec2ff1f29a0ea81399a3bbec6b03", + "size": 7296 }, { "url": "https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact", "status": "success", "path": "en/api/beta/memory_stores/memory_versions/redact.md", - "sha256": "f8135174f1b4f8242e622f2c8a5d8a587f8907c9e54bcd54c9e54ac5c73bf483", - "size": 6742 + "sha256": "78e7fb0bef1c92c6951dd6ce30ac20a9ec83c6883f82c25b8a13e4b222f232fe", + "size": 7190 }, { "url": "https://platform.claude.com/docs/en/api/beta/files", "status": "success", "path": "en/api/beta/files.md", - "sha256": "e97fda23390e79022a0d2737784e87f9ed62e784d37d1b993433bda97b3b84b2", - "size": 15749 + "sha256": "1c0826fb4f489ed4beabce783e9eddd060f5f9e9dec840953d82426b3d411c3f", + "size": 15963 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/upload", "status": "success", "path": "en/api/beta/files/upload.md", - "sha256": "7ba95d3edabc10ff068d3e8968c9e2cbe8746dd07cb9319f796fca1156d69d99", - "size": 3165 + "sha256": "da15685e53c13c6a4a4b9371a469cdee6a3ad4e8fca37f5b10314e574737425a", + "size": 3205 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/list", "status": "success", "path": "en/api/beta/files/list.md", - "sha256": "84b20729652ad21b2b1e74bb716ca6ddcac4f5a0ea19c5dce3641af83318d397", - "size": 4114 + "sha256": "a2c675cce41a758fa6d4568a9c48037677868991c4a54973726411c7e2b5ca21", + "size": 4154 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/download", "status": "success", "path": "en/api/beta/files/download.md", - "sha256": "20a062b021f40e0b243721b5629b2a74851f8f102c5caf2e1eda2b2e8d8bde4e", - "size": 1942 + "sha256": "791d15cc7ef5193e54a18ed106b2f6c2fbc2483d19937da80ce5b30a452ace49", + "size": 1978 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/retrieve_metadata", "status": "success", "path": "en/api/beta/files/retrieve_metadata.md", - "sha256": "726bdbaf3a3e157d1feb9efd621b1242462a6262afb30d4acf9437fda611959b", - "size": 3197 + "sha256": "322b343c8a3d8bcef219a5e230601ae315000e06d4324cb6f70bddb34f3176bf", + "size": 3237 }, { "url": "https://platform.claude.com/docs/en/api/beta/files/delete", "status": "success", "path": "en/api/beta/files/delete.md", - "sha256": "f2343118b71cc4fb6af50ec881f62ad88c95e2a468346349fc5faadb82d17a2f", - "size": 2276 + "sha256": "f4193f910a511ed9529fa521d9bac882a801935248cca59f33dfff8240d71bd6", + "size": 2316 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills", "status": "success", "path": "en/api/beta/skills.md", - "sha256": "d682c82e839399c3209e22082ede97d7588673683fd3ba10ee78f3a1fe29a966", - "size": 34400 + "sha256": "f18b7db94fd753820c5a9be1971770994ca8e8f5d902785c3fc64854f2bb535a", + "size": 34724 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/create", "status": "success", "path": "en/api/beta/skills/create.md", - "sha256": "c8a260509ab00bb96ba7183fa5277edd3279d96ba729413ae45439ea751f3c05", - "size": 3070 + "sha256": "708efdff9a65e992905399ef3d26cfb3fc7a28da634d1b187ffee39c069b19a4", + "size": 3106 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/list", "status": "success", "path": "en/api/beta/skills/list.md", - "sha256": "618c479a6a30b6c439086d58235ad4c0fd6eeeabe9136a9dc876add7e577919d", - "size": 4165 + "sha256": "7e93232e33b3eed6649860984a8434aff3f5c124ca3a90c3ca082b8d8d8611ea", + "size": 4201 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/retrieve", "status": "success", "path": "en/api/beta/skills/retrieve.md", - "sha256": "71a94e547ed286d3e47ac8832a4aa3c6e587793302528f2e113eb8ba40ba68d1", - "size": 3137 + "sha256": "aa6b9c1a0d7e5703560ba5a0a00448431baa6264a8f6e16298d46b3007ecee0c", + "size": 3173 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/delete", "status": "success", "path": "en/api/beta/skills/delete.md", - "sha256": "b18110dc9ad2e1e08981afb062e3b4d7e827ef45767b7670a1c5496b267a9097", - "size": 2317 + "sha256": "bf8329d9247afb31a009beec21c2231e0d31239b5865266f0f874c83ad532c6c", + "size": 2353 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions", "status": "success", "path": "en/api/beta/skills/versions.md", - "sha256": "0a009fa3eb7801557ae5d5ffd470b1f0e19ecd54894a558cecb5cccb7c3a8712", - "size": 18802 + "sha256": "d5d9c03201e9f34f2cfb38bee1006677fcbad1e24107abd057eed7ca51fd7799", + "size": 18982 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/create", "status": "success", "path": "en/api/beta/skills/versions/create.md", - "sha256": "8a0d1fde88ea41f36606ad79385b259d379b99cac545debba3b317a854929fbd", - "size": 3390 + "sha256": "29558264071372abdeda5d1f23d8316dbe96cb1b3ba2e40ff84ddf89ea660be9", + "size": 3426 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/list", "status": "success", "path": "en/api/beta/skills/versions/list.md", - "sha256": "83f7ef80f4486f59aa903797afe7215e54354eb91105767256b0ab1b92fc1974", - "size": 4030 + "sha256": "f751a9ed4cb1177051e03afd78edce3574cc83b45f2e5252c85c07bb04f6e09d", + "size": 4066 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/download", "status": "success", "path": "en/api/beta/skills/versions/download.md", - "sha256": "c01e01a75efb10c87790cdaf7c808692521293ab92e5701502ef7336cedb8697", - "size": 2277 + "sha256": "7d4353cb7559c5f033234487ccf96ded85945ee5d8c471f6e24a1f58e7918e04", + "size": 2313 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/retrieve", "status": "success", "path": "en/api/beta/skills/versions/retrieve.md", - "sha256": "8811b7835eb03832d1659480747e2490de6cc939e571257270827d4cff599a91", - "size": 3464 + "sha256": "c867f1683c50962d2c60d743868f5f83d1b4c643743d0385e033b2d536d476da", + "size": 3500 }, { "url": "https://platform.claude.com/docs/en/api/beta/skills/versions/delete", "status": "success", "path": "en/api/beta/skills/versions/delete.md", - "sha256": "21fba282d57821c2805e516a6ef21907ae4a59bdfe8b97c7c922a8fab868e163", - "size": 2560 + "sha256": "7bcb18ba81852c69cc76c552e89d959669efce3a7ad72dd1c98ff46f9246db4a", + "size": 2596 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles", "status": "success", "path": "en/api/beta/user_profiles.md", - "sha256": "44a816b26f66e56376a8ebde33ce66c980c30e98fd243818ce43738785874817", - "size": 21552 + "sha256": "f8977bd2cf1d13ac745084185378d681afde199e39ecc8259bce4728820f7721", + "size": 25706 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/create", "status": "success", "path": "en/api/beta/user_profiles/create.md", - "sha256": "2241e0e272cd791d0a67cc18f9309eaf9a85b70f2f75df92e0f082168251e8a7", - "size": 4719 + "sha256": "4da31eabef56a5948c5234cd4c5b4e745d08aa9e62b93a14fd8f3293ea9af350", + "size": 5874 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/list", "status": "success", "path": "en/api/beta/user_profiles/list.md", - "sha256": "e6060fea4dfcc35938641eb787f731bd1cacf6fdcca91ed6f83ab4fa8c32c33c", - "size": 4127 + "sha256": "bd47053e2fd700b23bc131200981b5869167aac7ac057fb7e947ec0884b3bb14", + "size": 4778 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/retrieve", "status": "success", "path": "en/api/beta/user_profiles/retrieve.md", - "sha256": "3569bf292c5512ae84c7e5dfa33c0847b7b26ad76e3dbec2643da365e1863f86", - "size": 3747 + "sha256": "3ad4950e5989a8c48f9158b647136b23c783bceee1ddfb75f675fc54207142bb", + "size": 4394 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/update", "status": "success", "path": "en/api/beta/user_profiles/update.md", - "sha256": "9b151a90a58a7d3f723fde7912459a57c00599483c1138d1c98a0122e800f1fa", - "size": 4804 + "sha256": "8435b661cd851ff3f09d713c5205cb70a3f51b71e668ee0b6149d24e626f956b", + "size": 5890 }, { "url": "https://platform.claude.com/docs/en/api/beta/user_profiles/create_enrollment_url", "status": "success", "path": "en/api/beta/user_profiles/create_enrollment_url.md", - "sha256": "baa00579b58b39d70f79604f03f1d6426099e8191d5249148040645da62bff06", - "size": 2557 + "sha256": "e439771452ddb52f87a7f38818382d62e15bbf26455e6becf90ae4d42dbc1ec7", + "size": 2593 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams", "status": "success", "path": "en/api/beta/dreams.md", - "sha256": "391ac5ab00af31f5109c5bbb1e055be72482b4ca980690654b2229414bb52e28", - "size": 34697 + "sha256": "53b696e358d1967abd35dee4d8a15bd20a0249cfec192b86a04868902c943fb3", + "size": 44826 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams/create", "status": "success", "path": "en/api/beta/dreams/create.md", - "sha256": "19cf7d7efa52a7a2de7188edf6e7b6a3940f4c44bbae4938aa3091e9b7a15715", - "size": 6686 + "sha256": "91f499a7a7fcd191ab3a9975cff74d046e2049a78363318aae9b6312e8ca5c25", + "size": 8909 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams/list", "status": "success", "path": "en/api/beta/dreams/list.md", - "sha256": "06cbab12f982f1a33db899cb228a787de4e3e446bf264adb5f169e6ea795c623", - "size": 5929 + "sha256": "d49a4074ecc2bfff1a12a05e2b2f4860ed939cb5697f9a9b680c6ad517fdb7ef", + "size": 7067 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams/retrieve", "status": "success", "path": "en/api/beta/dreams/retrieve.md", - "sha256": "f4d569649a0c58cebd05d7d4a114cbf8605757a5d037dd609272c6a87bbca607", - "size": 5345 + "sha256": "af58e96aca539bb21d24307530b0e1b3de9eff71a07eb8076b0d98b68c7616bb", + "size": 6544 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams/cancel", "status": "success", "path": "en/api/beta/dreams/cancel.md", - "sha256": "4a5b5c741a70ed507f3a612965d94197fe49844814e62c1e69a70dff96a6a3e2", - "size": 5381 + "sha256": "584262f0022cac1c9fdc5237433dc6d0a5f36919fb3f375a1341dbadc401ca60", + "size": 6580 }, { "url": "https://platform.claude.com/docs/en/api/beta/dreams/archive", "status": "success", "path": "en/api/beta/dreams/archive.md", - "sha256": "e1ea42af519dc1f9110a8faa5d19ead823da0d5a53c1493284cb309f73d122ee", - "size": 5387 + "sha256": "aaf48e5a37bd533551c51b565728adbee8c1dc8024f5893fd1f7a615b37a1865", + "size": 6586 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels", "status": "success", "path": "en/api/beta/tunnels.md", - "sha256": "7f300feadc67203f9de2029da081b05ea9ba7944f0e7dad7c1fb14f856aa3cb5", - "size": 34629 + "sha256": "e1eea8a820ef5a75a6746dba784819bd1d765ee49d22b580c6c35a98bfa16804", + "size": 34989 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/create", "status": "success", "path": "en/api/beta/tunnels/create.md", - "sha256": "fcecb763e702866ba8dd0dffc2721ae5c5dcb85272e3819dc403f57264952946", - "size": 3372 + "sha256": "4ca9dbb2aa57a7898718faff90a4123a096eabca1f0014384fe4250e45806d4c", + "size": 3408 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/retrieve", "status": "success", "path": "en/api/beta/tunnels/retrieve.md", - "sha256": "bf8fcb65e87e762e9bcb3218a6ecff5787233e5371301302db1d35e88856080b", - "size": 3089 + "sha256": "f08f7e53b3a10ae7e2166e7e4f1484163c9f39230abd0ca77872d5d360fe4296", + "size": 3125 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/list", "status": "success", "path": "en/api/beta/tunnels/list.md", - "sha256": "cdc9148c0cd6079c84810576b6ee100b5bd4e2031e77b54cc6ef5b15ea7b2239", - "size": 3649 + "sha256": "4463f436fb3cdcdd03cd315ada681bb7737d0056e628f19ea8fba62ee3753b7a", + "size": 3685 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/archive", "status": "success", "path": "en/api/beta/tunnels/archive.md", - "sha256": "f69208fb3b27a889b94516fb3efaca20d162b20c66e8ce58ebacd8b74f4f0cb9", - "size": 3396 + "sha256": "99242471dca0646d4257f90ea67697ba6ce21cbf7870eba9efc7f19e9d18e72a", + "size": 3432 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/reveal_token", "status": "success", "path": "en/api/beta/tunnels/reveal_token.md", - "sha256": "1c0ec48477c6822c708141a2d32c67d97af82e186e8ada93c6e015706a5f4700", - "size": 2939 + "sha256": "cddc4448fa20de984f31b735ee3fb48a63d920309681850d9d4f6d42e6310c15", + "size": 2975 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/rotate_token", "status": "success", "path": "en/api/beta/tunnels/rotate_token.md", - "sha256": "09fa5f6d63047fdfdc06953ff875353a987a04a46c98c8b9bbad8188827e8485", - "size": 3086 + "sha256": "f95e5ba75c7fa4adb24732530d5867cd6c2a05377af46e6bbd2b953aa80ac87d", + "size": 3122 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates", "status": "success", "path": "en/api/beta/tunnels/certificates.md", - "sha256": "634508d9cb3ebf8cf93cd0a87357fa622f040daef7f7ca80518253bfb89bf3c0", - "size": 14620 + "sha256": "aa8e3bc040bd9dc93c2953c8265973132cd92bac7081c77f863628a67ee695c5", + "size": 14764 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/create", "status": "success", "path": "en/api/beta/tunnels/certificates/create.md", - "sha256": "2f073485a2d362b5e56abf0991c9ef8298c017b73fed28c4564151b4f2694d9b", - "size": 3675 + "sha256": "695198f65d7c2643e4f8b6ce20dde1aa69234876563e8b91132fa3af406fa8d1", + "size": 3711 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/retrieve", "status": "success", "path": "en/api/beta/tunnels/certificates/retrieve.md", - "sha256": "77c6724914af71a416ad7db8b10e52cc846e687ad65dc28400d4ff815a7444f5", - "size": 3269 + "sha256": "d5020c5cc02c0c23c16baf33c3e1fc1e07f3ef31956a0e6e4b121e5f2bbe1ce4", + "size": 3305 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/list", "status": "success", "path": "en/api/beta/tunnels/certificates/list.md", - "sha256": "d9bcfd4eb2099fda320973128da409c447a498bba5535a46a5b18caa8feac84e", - "size": 3815 + "sha256": "246c14919ea1e2bb46cf48f3951afafe66043fdb204bc1abbf810a090b546b44", + "size": 3851 }, { "url": "https://platform.claude.com/docs/en/api/beta/tunnels/certificates/archive", "status": "success", "path": "en/api/beta/tunnels/certificates/archive.md", - "sha256": "b9ed9c30d72c3a9d5822bd3ccbdb395061c51d88695446bab53c32503b4fe45a", - "size": 3519 + "sha256": "505254ee46efb85329ac5060c44dd6c90bdcf6c69b409063c5b80213acb76c36", + "size": 3555 }, { "url": "https://platform.claude.com/docs/en/api/beta/webhooks", @@ -3992,8 +4111,8 @@ "url": "https://code.claude.com/docs/en/changelog", "status": "success", "path": "en/docs/claude-code/changelog.md", - "sha256": "492710bb316b840130b902990bd44ca496b940ed653e3d7bf200bfc882737286", - "size": 559755 + "sha256": "9602728f9c8546e1ec43fc6ec3dc3c235f2e59ef74fd3e34eab25edfb0425dc2", + "size": 565628 }, { "url": "https://code.claude.com/docs/en/how-claude-code-works", @@ -4027,8 +4146,8 @@ "url": "https://code.claude.com/docs/en/prompt-caching", "status": "success", "path": "en/docs/claude-code/prompt-caching.md", - "sha256": "b12cdf3df16f42b5aa6c4c922a555026a9ca840c21094ee61b0092ce918d161c", - "size": 31995 + "sha256": "cf53f933c70cc469e3aac3ad94bdd251c890ac5bbc165ae8536b4679f86ba59b", + "size": 32475 }, { "url": "https://code.claude.com/docs/en/memory", @@ -4083,8 +4202,8 @@ "url": "https://code.claude.com/docs/en/remote-control", "status": "success", "path": "en/docs/claude-code/remote-control.md", - "sha256": "e93415473d01ea5f98e471b29e92cb5c9ba3970e8a727902a950a2108bb764a4", - "size": 54940 + "sha256": "ab13cbfa018501151a89b9e43f9ef4734e42f7b40945f3cfea3bc670004da517", + "size": 56452 }, { "url": "https://code.claude.com/docs/en/web-quickstart", @@ -4104,8 +4223,8 @@ "url": "https://code.claude.com/docs/en/routines", "status": "success", "path": "en/docs/claude-code/routines.md", - "sha256": "137c0eda8a7e929260c4b253ab3504a68e63f1794fdb38642f69aa39e7fd3abd", - "size": 33540 + "sha256": "a2855f70de2fa86b53b5131ee170692404d81acc1c5956aad485fc2bbb219317", + "size": 33555 }, { "url": "https://code.claude.com/docs/en/ultrareview", @@ -4125,8 +4244,8 @@ "url": "https://code.claude.com/docs/en/desktop", "status": "success", "path": "en/docs/claude-code/desktop.md", - "sha256": "2f2c7eb04dc016d1156dca5281b956e1ad1378b7be528872ededc4dae1676a70", - "size": 95292 + "sha256": "d4975d3c35c9c40e3ca6a05c238f964545eccc022c21ef94f255243f7d269061", + "size": 95336 }, { "url": "https://code.claude.com/docs/en/desktop-linux", @@ -4146,8 +4265,8 @@ "url": "https://code.claude.com/docs/en/desktop-scheduled-tasks", "status": "success", "path": "en/docs/claude-code/desktop-scheduled-tasks.md", - "sha256": "52f27066a1be5ad79b076b2dcb9de78de2676f8b57b381252becf9acb334fb1d", - "size": 11778 + "sha256": "a3818d29e5f008491e8b8db09cc127e1bd0bf987fb17ceab9582007597c571a4", + "size": 11840 }, { "url": "https://code.claude.com/docs/en/desktop-ios-simulator", @@ -4181,8 +4300,8 @@ "url": "https://code.claude.com/docs/en/vs-code", "status": "success", "path": "en/docs/claude-code/vs-code.md", - "sha256": "c7f04f01b1a82d6426254574ee7db9738b4da05efe580ed5ed9bb167778a1d5a", - "size": 58270 + "sha256": "43c80d829fd5d427d03480d778ee9a3763d8fec8fcd71bbd47f8ce17bc83220d", + "size": 60359 }, { "url": "https://code.claude.com/docs/en/jetbrains", @@ -4195,8 +4314,8 @@ "url": "https://code.claude.com/docs/en/security-guidance", "status": "success", "path": "en/docs/claude-code/security-guidance.md", - "sha256": "a21699a9713e1e5ac6afb1a416dcfcebe186de6b6a197a09717d8421f372ea7a", - "size": 20560 + "sha256": "2a9c091b92d65ba780df239aebaafb89d9e31c6330a75b3fd6d36977a7c0e0e5", + "size": 20517 }, { "url": "https://code.claude.com/docs/en/claude-security", @@ -4209,8 +4328,8 @@ "url": "https://code.claude.com/docs/en/code-review", "status": "success", "path": "en/docs/claude-code/code-review.md", - "sha256": "07ef23c9c25e885a60920b2f21650efb75b72cd036d5551d43bf43f1b3051ba6", - "size": 31690 + "sha256": "c06d9d357c7ac61a998278e5001e1c01a5418d4f5eaa3835d6c8618b7fefb750", + "size": 32086 }, { "url": "https://code.claude.com/docs/en/github-actions", @@ -4265,8 +4384,8 @@ "url": "https://code.claude.com/docs/en/sub-agents", "status": "success", "path": "en/docs/claude-code/sub-agents.md", - "sha256": "6f51d2b55ae01c0a9c4915788ba0969d99130634512968d870f3b08e8860e5a5", - "size": 102648 + "sha256": "85d59add6479a67f55993995a8f170ab1236fba335fa8cd300657e52c19cf773", + "size": 104127 }, { "url": "https://code.claude.com/docs/en/agent-view", @@ -4286,22 +4405,22 @@ "url": "https://code.claude.com/docs/en/cross-session-messaging", "status": "success", "path": "en/docs/claude-code/cross-session-messaging.md", - "sha256": "4906354c778df040a93eb79efa13356f6540a4ecf9241e3e3aa919ea06ba7712", - "size": 29886 + "sha256": "cca9e805bab52879457511ad3ede8d1bb40f5ffa810eb2eaa40bdc9a38f77abb", + "size": 33252 }, { "url": "https://code.claude.com/docs/en/workflows", "status": "success", "path": "en/docs/claude-code/workflows.md", - "sha256": "afbe8d3bf0156f26f35a2db99690c7a947fc1d16709c08a03dea3f3cfca2ca1b", - "size": 32787 + "sha256": "cc0942285cadc04f77bd8d90630d53a7e56df1d5d232fd1f71effd21b34faa22", + "size": 32745 }, { "url": "https://code.claude.com/docs/en/worktrees", "status": "success", "path": "en/docs/claude-code/worktrees.md", - "sha256": "6795238bf1a0d57e59d80184f9b43c6061370f87d331e51d62524f0ffdd4093e", - "size": 29932 + "sha256": "93b139a65e39e8404fde8230aa79101b8dbcf78f15f136eb6ffcd5e80bdceb08", + "size": 30639 }, { "url": "https://code.claude.com/docs/en/mcp-quickstart", @@ -4314,15 +4433,15 @@ "url": "https://code.claude.com/docs/en/mcp", "status": "success", "path": "en/docs/claude-code/mcp.md", - "sha256": "66ee91eed4f14dbf5fa9171ac90b47ceacb6fad70a1454e2df4f4fe451eda145", - "size": 88493 + "sha256": "42f4f6df676f9a4296ea51590278b89390902fbc4ffe7800c73ae1f01b85ce68", + "size": 96831 }, { "url": "https://code.claude.com/docs/en/skills", "status": "success", "path": "en/docs/claude-code/skills.md", - "sha256": "448fde484cc410c84d871ccffe9c8676f6a5e5fd8ff8330183ef2461fed43575", - "size": 96949 + "sha256": "21ba53162166d02c1bd23a4dc215eeb01e95805712e3077cbf5060a1ef72075d", + "size": 96020 }, { "url": "https://code.claude.com/docs/en/discover-plugins", @@ -4342,8 +4461,8 @@ "url": "https://code.claude.com/docs/en/artifacts", "status": "success", "path": "en/docs/claude-code/artifacts.md", - "sha256": "21f65c34a9cb9c4eac4a8653ae4f73fa138df234837ca621f5eef226e17b8aac", - "size": 27553 + "sha256": "a11e6fbd2e8de88b89b87b0023795ebb486c4d0c09083cef6e7f80980d43932c", + "size": 32350 }, { "url": "https://code.claude.com/docs/en/hooks-guide", @@ -4370,22 +4489,22 @@ "url": "https://code.claude.com/docs/en/goal", "status": "success", "path": "en/docs/claude-code/goal.md", - "sha256": "daf2bb91cf41cf1e0cb634e329e52858b721a07e5777e03c5452c977271d5a7a", - "size": 13091 + "sha256": "d4a502880070c8b6d0b1a77b3e7c01486f3b86b5ebe0d1ff04129fd30aaf18f5", + "size": 14547 }, { "url": "https://code.claude.com/docs/en/headless", "status": "success", "path": "en/docs/claude-code/headless.md", - "sha256": "e20a738b2d2dce6a1922741c60649ff1a0348eeee3b8cef38e96fe394596a0d0", - "size": 28908 + "sha256": "3a478f9a6563fb3e6b1a46fe98bd963e5138d95d96facf79491fd1a8ee169233", + "size": 29821 }, { "url": "https://code.claude.com/docs/en/deep-links", "status": "success", "path": "en/docs/claude-code/deep-links.md", - "sha256": "6b2cd0bd94de10449ed8c5709cb26d04612a1cde93b8eeb29fdb89e83591012e", - "size": 14577 + "sha256": "fb78a55e6c411a3cc1d3f62f3aa9765ad416a41f9715641736f6595a35919d13", + "size": 14430 }, { "url": "https://code.claude.com/docs/en/large-codebases", @@ -4419,15 +4538,15 @@ "url": "https://code.claude.com/docs/en/errors", "status": "success", "path": "en/docs/claude-code/errors.md", - "sha256": "0ec2bcda562403a98b6ac4d41a13bf71d6e441098519a21b3d7b9b33cb69721f", - "size": 244668 + "sha256": "281103c72812910d50d173039210f28ce2cdb83108548476b76b8bd92638e4ec", + "size": 253013 }, { "url": "https://code.claude.com/docs/en/admin-setup", "status": "success", "path": "en/docs/claude-code/admin-setup.md", - "sha256": "3e9e27ed05533ba5d0d69efd9c887f4c94f7f291b74e8e2869755cabe4b58377", - "size": 35975 + "sha256": "afdd0ec00b9f874c2481efa9b2323ea95676836fce52f774a912523e8f2b4147", + "size": 36018 }, { "url": "https://code.claude.com/docs/en/setup", @@ -4440,15 +4559,15 @@ "url": "https://code.claude.com/docs/en/authentication", "status": "success", "path": "en/docs/claude-code/authentication.md", - "sha256": "34d56f2dc7ca4156d691ad23b906533850e160fde17cb79e8fa229d02fbaaa1b", - "size": 24203 + "sha256": "561c7450b6c3881fc601c10622ccbd7674a5354e20774ff7bcb29c1b9b955f7a", + "size": 24109 }, { "url": "https://code.claude.com/docs/en/server-managed-settings", "status": "success", "path": "en/docs/claude-code/server-managed-settings.md", - "sha256": "6acda2a8441151513e81394692eb683df3603ee080a31c1da52d35a6ee05a732", - "size": 32507 + "sha256": "386d741952dac2e6594079c66745e8f91cc85ebc30239ea10b85a742aa0b181d", + "size": 32725 }, { "url": "https://code.claude.com/docs/en/managed-mcp", @@ -4482,8 +4601,8 @@ "url": "https://code.claude.com/docs/en/amazon-bedrock", "status": "success", "path": "en/docs/claude-code/amazon-bedrock.md", - "sha256": "731c37532c8421fad18cc7f649b66f3a482db0686176199b4886f0671ab814af", - "size": 39547 + "sha256": "4c967b4d1cf239e0ab24e8896efc26ec2adb611cbff54822703d29a5853f508c", + "size": 39748 }, { "url": "https://code.claude.com/docs/en/claude-platform-on-aws", @@ -4496,8 +4615,8 @@ "url": "https://code.claude.com/docs/en/google-vertex-ai", "status": "success", "path": "en/docs/claude-code/google-vertex-ai.md", - "sha256": "cd3f53c82628d53ee7f71b591dfd1353029f10d3619f136da540801017fa6e8a", - "size": 20723 + "sha256": "74be65e539185e2ac5aa847c751d488e41df2f98bf8a67ed45ddebf00fb5b58c", + "size": 20924 }, { "url": "https://code.claude.com/docs/en/microsoft-foundry", @@ -4538,15 +4657,15 @@ "url": "https://code.claude.com/docs/en/claude-apps-gateway", "status": "success", "path": "en/docs/claude-code/claude-apps-gateway.md", - "sha256": "b5583b122adeaa0463a7ef35f3920821c8df952aa31773a7edecf227981539a0", - "size": 53917 + "sha256": "1e9422188ab4b1c5b2c951712f982ef29bab16cad0215a44e47c09a70f5ea5c6", + "size": 53956 }, { "url": "https://code.claude.com/docs/en/claude-apps-gateway-config", "status": "success", "path": "en/docs/claude-code/claude-apps-gateway-config.md", - "sha256": "a70d9157aa3704b1520776d2807cd65bc327e2b7781e2a89d2060f6ec34866c9", - "size": 100348 + "sha256": "9d325a9c4b00ee11f5fbc95d0f975c79ed6d929f1cdb676abad5a2f2fff9cb39", + "size": 100472 }, { "url": "https://code.claude.com/docs/en/claude-apps-gateway-spend-limits", @@ -4587,15 +4706,15 @@ "url": "https://code.claude.com/docs/en/llm-gateway-connect", "status": "success", "path": "en/docs/claude-code/llm-gateway-connect.md", - "sha256": "2e7405a432b4175f545fc14e4ff6559f4b59c08a87157d94f1474ba7e62508da", + "sha256": "e2ed0b4c44412c843573441de2bc4b5fae60c6b11d8e8a9765d58f367cfdfd3c", "size": 52333 }, { "url": "https://code.claude.com/docs/en/llm-gateway-rollout", "status": "success", "path": "en/docs/claude-code/llm-gateway-rollout.md", - "sha256": "3db7b2217d5a2bbca7b2b52069c2808739bcc64d5ed9f737e9bacf1ef2511bfa", - "size": 32297 + "sha256": "70358b86f8e2ba8a84203ef5a449df71d2345ff121a07b3c063dd244883d4336", + "size": 32256 }, { "url": "https://code.claude.com/docs/en/llm-gateway-protocol", @@ -4615,8 +4734,8 @@ "url": "https://code.claude.com/docs/en/costs", "status": "success", "path": "en/docs/claude-code/costs.md", - "sha256": "98bdf036000ead4997d141b8660dd99b619c48e0b41d16986b1eb46792f5e04c", - "size": 33541 + "sha256": "39428ff69d5e338f5dac1f0038a7d81303ee4451e3ba87e5437646b94d702e38", + "size": 33956 }, { "url": "https://code.claude.com/docs/en/analytics", @@ -4629,8 +4748,8 @@ "url": "https://code.claude.com/docs/en/plugin-marketplaces", "status": "success", "path": "en/docs/claude-code/plugin-marketplaces.md", - "sha256": "33ae0625956a0a956da0305705cb44eb47dc996304f9ced85f63c27efed91159", - "size": 97558 + "sha256": "dd027e020ea06375b1b9f43ee605a08e654a118e98963ac64914e35db33a766e", + "size": 98024 }, { "url": "https://code.claude.com/docs/en/plugin-dependencies", @@ -4643,8 +4762,8 @@ "url": "https://code.claude.com/docs/en/plugin-hints", "status": "success", "path": "en/docs/claude-code/plugin-hints.md", - "sha256": "b50970a2a58907aa4fa6f26f7b06879dcb79719ef66864e9ee5dc550db24e5b6", - "size": 9546 + "sha256": "cba6d1e4cb50ace8a02ed15cddc3f37f8098eadc01cae61a0f732b526b5b1232", + "size": 10007 }, { "url": "https://code.claude.com/docs/en/plugin-relevance", @@ -4692,15 +4811,15 @@ "url": "https://code.claude.com/docs/en/settings", "status": "success", "path": "en/docs/claude-code/settings.md", - "sha256": "b456a5603bb5399de68a95b88ddeba42bd66f1e79920f5e298551ec15acf257a", - "size": 337432 + "sha256": "721118eb9f244a7a06d6eed31ffbec68da245f295f39b2030ec9e70eba02c1dc", + "size": 338286 }, { "url": "https://code.claude.com/docs/en/permissions", "status": "success", "path": "en/docs/claude-code/permissions.md", - "sha256": "89f064c3f87f8e15f6bae5cd357fb05b37d8763a14cfe40b5195b4ecb33a0984", - "size": 67254 + "sha256": "4c9096c56bac95cddbb9bdbc24eef91b40fcbe32ede71f6292c2e7a51b87bf8f", + "size": 72050 }, { "url": "https://code.claude.com/docs/en/sandbox-environments", @@ -4713,8 +4832,8 @@ "url": "https://code.claude.com/docs/en/sandboxing", "status": "success", "path": "en/docs/claude-code/sandboxing.md", - "sha256": "d4b9736740b8d928ad83f824bdc1f64feae1ab3216c0c549c589499cf96bcc74", - "size": 67728 + "sha256": "3e4921740528dcc240213ec3185a9cf1843ac26be0763f7c61f39b5f255be82f", + "size": 68094 }, { "url": "https://code.claude.com/docs/en/cloud-environments", @@ -4727,8 +4846,8 @@ "url": "https://code.claude.com/docs/en/self-hosted-environments", "status": "success", "path": "en/docs/claude-code/self-hosted-environments.md", - "sha256": "05247aff384263a5bb6d059ea5a1d79fb53830c91b94071557245bd47239b99c", - "size": 18077 + "sha256": "f1ce05ace88c4e7661467f31da246e902d7d129da817e2299ecb5675666b0119", + "size": 18980 }, { "url": "https://code.claude.com/docs/en/self-hosted-environments-quickstart", @@ -4741,15 +4860,15 @@ "url": "https://code.claude.com/docs/en/self-hosted-environments-deploy", "status": "success", "path": "en/docs/claude-code/self-hosted-environments-deploy.md", - "sha256": "98cfad7fbaf73ac852f3a8481e98592a9873447a71d27adbf284d5a2c9a2b345", - "size": 45639 + "sha256": "a855a2e706a87aaaef5dd9a1a14feafbfc17a3ac0476df450adb3db12f4c0023", + "size": 53302 }, { "url": "https://code.claude.com/docs/en/self-hosted-environments-configuration", "status": "success", "path": "en/docs/claude-code/self-hosted-environments-configuration.md", - "sha256": "ba2e9e22654830d773c6c25342c5fdeffca91eb69c80d2a41bf17842dcec9c4c", - "size": 50501 + "sha256": "b3dc68d6b3b9b1ff17a532061964ec21806ac2af689e2013f3e5011f16cdd7fb", + "size": 51511 }, { "url": "https://code.claude.com/docs/en/self-hosted-environments-testing", @@ -4762,8 +4881,8 @@ "url": "https://code.claude.com/docs/en/self-hosted-environments-reference", "status": "success", "path": "en/docs/claude-code/self-hosted-environments-reference.md", - "sha256": "08ce7bd72d81d52a2cb7a4962c23df2521c92f7806051709876eb18e32ad214c", - "size": 74886 + "sha256": "8138727ae74514f3b60666d55531836f2e31fa8ced0e2a875ec5a822ba1f3d81", + "size": 85467 }, { "url": "https://code.claude.com/docs/en/self-hosted-environments-identity", @@ -4776,8 +4895,8 @@ "url": "https://code.claude.com/docs/en/model-config", "status": "success", "path": "en/docs/claude-code/model-config.md", - "sha256": "2ecaaa6e9bcbcd28e74c6acca5d3a2bc1fb95a3fe1f2e316b51c26594e016352", - "size": 96916 + "sha256": "2a3fc17f1f3afe13468ed51e14b500e358764a625d4b4a237481bc1d6498d814", + "size": 96866 }, { "url": "https://code.claude.com/docs/en/fast-mode", @@ -4797,29 +4916,29 @@ "url": "https://code.claude.com/docs/en/output-styles", "status": "success", "path": "en/docs/claude-code/output-styles.md", - "sha256": "c16054a3cf3ce307320b79216a520ccdf9af9c8003cc7ae6fea50bd3ffd3a52b", - "size": 10284 + "sha256": "7f28ae3292fe686e7aaf37f6f199ea1fcca60cedfdf8bd79b45d1476836b989e", + "size": 10800 }, { "url": "https://code.claude.com/docs/en/terminal-config", "status": "success", "path": "en/docs/claude-code/terminal-config.md", - "sha256": "8d3e94ec93a926b600777c0aa10e44790b8ce14da7e928604984fba409074c46", - "size": 22721 + "sha256": "4f93463dcd194115fe5f80020b13e5c47f420721f7178162e300b82ac7be3d6e", + "size": 23592 }, { "url": "https://code.claude.com/docs/en/fullscreen", "status": "success", "path": "en/docs/claude-code/fullscreen.md", - "sha256": "7a5258cf262093d36671b0e805459ace438951b0441dac9900b5b76a4381328c", - "size": 25760 + "sha256": "c06e7cb4f379bee56675f7a39c213b6c023822baa3e5f6b80fc220e702733afb", + "size": 28502 }, { "url": "https://code.claude.com/docs/en/accessibility", "status": "success", "path": "en/docs/claude-code/accessibility.md", - "sha256": "87662c1341931b0544ddd40757a47755c1105dd8fb88f94e2e13f67b9ef73631", - "size": 14146 + "sha256": "93509870505eb35e533c2c3fd8291351cde185b64f607b89284e5eafa70288b0", + "size": 14430 }, { "url": "https://code.claude.com/docs/en/voice-dictation", @@ -4839,43 +4958,43 @@ "url": "https://code.claude.com/docs/en/keybindings", "status": "success", "path": "en/docs/claude-code/keybindings.md", - "sha256": "53eda076c094255abfcc79b4365bf2ed53eb25314cfe5ebdb794e851128103d6", - "size": 31968 + "sha256": "a28bbcdde51c14b2e6a8b0525251169c180917014debf3b7dfe11ce644d5ba3b", + "size": 34759 }, { "url": "https://code.claude.com/docs/en/cli-reference", "status": "success", "path": "en/docs/claude-code/cli-reference.md", - "sha256": "949a0882cedc28bcbfb3f268e93e485695b78ec50c66d8573cf3bc51c8b45fdf", + "sha256": "a3592d30eab36dc74136a0a214032c487205dfa15c3511ab821900d68471d120", "size": 106538 }, { "url": "https://code.claude.com/docs/en/commands", "status": "success", "path": "en/docs/claude-code/commands.md", - "sha256": "76dcbb9439a42fcf868ddaad54c7fa5c439ce275ec0da6d9e514c86fc6970583", - "size": 154236 + "sha256": "6193356a1711741ac7b982826f114ba95d8968a07f6fa177ae44b4c6bea634e4", + "size": 154241 }, { "url": "https://code.claude.com/docs/en/env-vars", "status": "success", "path": "en/docs/claude-code/env-vars.md", - "sha256": "2066b28f2ea4c95a9fae4a3be7830d3bceffe341986beee95dd3775d3a8cc4cc", - "size": 408670 + "sha256": "4be43c98261d22698014a633d4e9c7c5f972b8d7b994a2be7712c6cfa1a2282a", + "size": 417708 }, { "url": "https://code.claude.com/docs/en/tools-reference", "status": "success", "path": "en/docs/claude-code/tools-reference.md", - "sha256": "3bdb698238e1f657b59baee669420e4195f1531c2a804cf08e4a656aaa4d7d94", - "size": 94653 + "sha256": "bf7fd3c73f47ff2e88c588fe4a7c8c227a829a552f8d92843032111e4595165a", + "size": 102754 }, { "url": "https://code.claude.com/docs/en/interactive-mode", "status": "success", "path": "en/docs/claude-code/interactive-mode.md", - "sha256": "a7a9ca4ac5efa44ed7167ba70d5983b52350607371bc684caccd74a856bca750", - "size": 66886 + "sha256": "3bf0f031f7023007a6d4c339780ece81f13185ae493d850f384edbb9b676e94a", + "size": 72472 }, { "url": "https://code.claude.com/docs/en/checkpointing", @@ -4888,8 +5007,8 @@ "url": "https://code.claude.com/docs/en/hooks", "status": "success", "path": "en/docs/claude-code/hooks.md", - "sha256": "57d5619cb9d96147c023025d83a41075ad24885129031d031cc9e2d58ce4891d", - "size": 277223 + "sha256": "4ba6151ad64366cfdd99237a2d02ef8b0b4dcc49492f8bc999040cc2329ae15e", + "size": 277883 }, { "url": "https://code.claude.com/docs/en/plugins-reference", @@ -4909,8 +5028,8 @@ "url": "https://code.claude.com/docs/en/glossary", "status": "success", "path": "en/docs/claude-code/glossary.md", - "sha256": "7b3d1b988f7716cbf94c0f77b776007f2fedd8af920a4559523ebf56becc9336", - "size": 23321 + "sha256": "64ae2fd9a68a7bb1d4a29df8294a99a12e632cc0ecddcb760511d89bbeac2aad", + "size": 23564 }, { "url": "https://code.claude.com/docs/en/agent-sdk/overview", @@ -5000,15 +5119,15 @@ "url": "https://code.claude.com/docs/en/agent-sdk/custom-tools", "status": "success", "path": "en/docs/claude-code/agent-sdk/custom-tools.md", - "sha256": "c73a4c7a9d578513bc4a43fd12e3ebdea013caf01885d541396e8afa7018b675", - "size": 40963 + "sha256": "d4a931e10220963502f100c09d9a7cb6a7108a75aec3d443b41bb6cdbc593341", + "size": 40723 }, { "url": "https://code.claude.com/docs/en/agent-sdk/mcp", "status": "success", "path": "en/docs/claude-code/agent-sdk/mcp.md", - "sha256": "250a372d2ea7b1fc716013362e5f92d02723ecf9c1fc3d01c95122e1cd3c679c", - "size": 34587 + "sha256": "b197bd01d02ce7801997bf2ba0d0b699a2cb77c17c18928aec0423afa38a6a25", + "size": 34114 }, { "url": "https://code.claude.com/docs/en/agent-sdk/tool-search", @@ -5021,8 +5140,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/subagents", "status": "success", "path": "en/docs/claude-code/agent-sdk/subagents.md", - "sha256": "e7ae552b855784ee1522cb120c1da039675be617edbdcbcf4a60bfc1f2f84d67", - "size": 45275 + "sha256": "40f1fd38287bccc811ce075c6120e5a19753d3b183c75730b9f348a837edf121", + "size": 45598 }, { "url": "https://code.claude.com/docs/en/agent-sdk/modifying-system-prompts", @@ -5056,15 +5175,15 @@ "url": "https://code.claude.com/docs/en/agent-sdk/hooks", "status": "success", "path": "en/docs/claude-code/agent-sdk/hooks.md", - "sha256": "bf062c9afd5b5d37fcf54d36b6f730a16d1c3eb1e37646b5fd4a642ae96fcec6", - "size": 54051 + "sha256": "221e239c824c41a56ad337249a0aaba59e770b0f1f695e358934b6ed87dca3dc", + "size": 53869 }, { "url": "https://code.claude.com/docs/en/agent-sdk/file-checkpointing", "status": "success", "path": "en/docs/claude-code/agent-sdk/file-checkpointing.md", - "sha256": "1419f50f8a20774f3aa22774ee20bc4d08b25c7a09602b301d51af59f17c7395", - "size": 33404 + "sha256": "a13c717ee34e1377ac64f5f2ae295b72d95e583a9a5d4e8992a37510e86bb245", + "size": 33260 }, { "url": "https://code.claude.com/docs/en/agent-sdk/cost-tracking", @@ -5084,8 +5203,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/todo-tracking", "status": "success", "path": "en/docs/claude-code/agent-sdk/todo-tracking.md", - "sha256": "21d0f543b8bacfaa6fe08be2aef0939b6fc2231568604c5be9812d3cd2282ff8", - "size": 17631 + "sha256": "b49170b98c64a3859977c92f0209895c02b1a7846dc253e2e08e8cbc72c6cb38", + "size": 19074 }, { "url": "https://code.claude.com/docs/en/agent-sdk/hosting", @@ -5105,8 +5224,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/typescript", "status": "success", "path": "en/docs/claude-code/agent-sdk/typescript.md", - "sha256": "ac9ba78023d800ecda70c568ded6510787c1da481176478d4bc8a63214e86efa", - "size": 296269 + "sha256": "a3084467fe90661a55c4183ab389f2eda2d3163960f3821c1d8ee5b46171d9d9", + "size": 298340 }, { "url": "https://code.claude.com/docs/en/agent-sdk/typescript-v2-preview", @@ -5119,8 +5238,8 @@ "url": "https://code.claude.com/docs/en/agent-sdk/python", "status": "success", "path": "en/docs/claude-code/agent-sdk/python.md", - "sha256": "1fce99cdcfd670e5468145546bbaee8eec329379f0ca818b4fa776995acc31b2", - "size": 192947 + "sha256": "da407558fcc4af45dd513262e23dfb834f2080baf1fd49750da6262f1f9d02dd", + "size": 192832 }, { "url": "https://code.claude.com/docs/en/agent-sdk/migration-guide", @@ -5336,15 +5455,15 @@ "url": "https://modelcontextprotocol.io/community/interest-groups/auth", "status": "success", "path": "mcp/community/interest-groups/auth.md", - "sha256": "c3f501251f3c7d4ae72ed74d714fa324377a6d6efbd61f122ec8bcfa74ef0f6d", - "size": 9231 + "sha256": "96c0d70da9b4e1595a63aadf0680af9b211b98aa1fb953e248f57c50f869aa2d", + "size": 13362 }, { "url": "https://modelcontextprotocol.io/community/interest-groups/enterprise-managed-authorization", "status": "success", "path": "mcp/community/interest-groups/enterprise-managed-authorization.md", - "sha256": "683dc01ea118f874980b21ea2cd375ac6eaa1f4129f39d0ab6014e06d9a86843", - "size": 5613 + "sha256": "f79de996720eba66064e0b33f7e827f6f63ad021282226a6e7b9cb3b8f5f21b7", + "size": 6140 }, { "url": "https://modelcontextprotocol.io/community/interest-groups/financial-services", @@ -5462,8 +5581,8 @@ "url": "https://modelcontextprotocol.io/community/working-interest-groups", "status": "success", "path": "mcp/community/working-interest-groups.md", - "sha256": "20428b3de810913b283efc4eec85c932a5fd8e3b529c88d393f9f06e13d32f6a", - "size": 16032 + "sha256": "80c090c57fd52637e692bb01678a4fc382b4fabfacae8195f93c8fdc06f247c8", + "size": 16268 }, { "url": "https://modelcontextprotocol.io/development/roadmap", @@ -7310,8 +7429,8 @@ "url": "https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/subscriptions", "status": "success", "path": "mcp/specification/2026-07-28/basic/patterns/subscriptions.md", - "sha256": "6a8e317e10d292ccf931ad323c81a9f9cdd78002db7367c5112b8726f06ab9ac", - "size": 6215 + "sha256": "5346635988902ca02a2503a63d5c19c91a525ba2e5ab9c32b91a6e9ba6939f87", + "size": 6326 }, { "url": "https://modelcontextprotocol.io/specification/2026-07-28/basic/transports", @@ -7527,8 +7646,8 @@ "url": "https://modelcontextprotocol.io/specification/draft/basic/patterns/subscriptions", "status": "success", "path": "mcp/specification/draft/basic/patterns/subscriptions.md", - "sha256": "89a4d8dfb5a6a234dbaff951b02a6d5461cc1f7463afc2141dacf43cd13e27b6", - "size": 6210 + "sha256": "640c8ba066fbc208defd400f674d65aea01ce4ad51c926aef8194efe7d34c821", + "size": 6321 }, { "url": "https://modelcontextprotocol.io/specification/draft/basic/transports", @@ -7751,8 +7870,8 @@ "url": "https://support.claude.com/en/articles/8114491-get-started-with-claude", "status": "success", "path": "support/8114491-get-started-with-claude.md", - "sha256": "5bbb274502141b099a6d2d1b275559c8e42f7c957ee7b95e85c8618ef1588ca8", - "size": 5300 + "sha256": "82ed4514165e198c3288ba17cd13040fb7f25ab1a20881f212b1f47484b4284c", + "size": 5298 }, { "url": "https://support.claude.com/en/articles/8114494-how-up-to-date-is-claude-s-training-data", @@ -7828,8 +7947,8 @@ "url": "https://support.claude.com/en/articles/8230524-delete-or-rename-a-conversation", "status": "success", "path": "support/8230524-delete-or-rename-a-conversation.md", - "sha256": "7d3b9dc3e839c23cab093ca71fe9164254c68e86534dfe6233308459f6396d45", - "size": 5885 + "sha256": "0605659f6a6c71b497d311a26300d3da1657c5164ee620b5d6c092d5ebd38378", + "size": 5875 }, { "url": "https://support.claude.com/en/articles/8241126-upload-files-to-claude", @@ -7898,7 +8017,7 @@ "url": "https://support.claude.com/en/articles/8325618-paid-plan-billing-faqs", "status": "success", "path": "support/8325618-paid-plan-billing-faqs.md", - "sha256": "09463263c96a5bb75a25bcbd7fc4bc2b419301fe819aa0d3537f40ec3a914871", + "sha256": "20054e256e5b1a03dd88187545ada78d1483b13e1d445698e108428f6540606d", "size": 4551 }, { @@ -7947,8 +8066,8 @@ "url": "https://support.claude.com/en/articles/8606394-how-large-is-the-context-window-on-paid-claude-plans", "status": "success", "path": "support/8606394-how-large-is-the-context-window-on-paid-claude-plans.md", - "sha256": "e3ec75b8cde4b85016792a776e072660acb7ada2182ac098853e88140412563f", - "size": 2439 + "sha256": "2208b9f806b510823696c2a8f0fed446762992ab727bd144d0403de3369c6cee", + "size": 2762 }, { "url": "https://support.claude.com/en/articles/8664678-change-the-model-effort-and-thinking-settings", @@ -7961,8 +8080,8 @@ "url": "https://support.claude.com/en/articles/8887527-customizing-your-appearance-settings", "status": "success", "path": "support/8887527-customizing-your-appearance-settings.md", - "sha256": "968c06711cc92c7310c483639908a346f45d7dfc5000616895139936dd5a1922", - "size": 1874 + "sha256": "882ad0660a02b77226904b860e7aad4ae52a830891da16e024d2faa34d32a129", + "size": 1878 }, { "url": "https://support.claude.com/en/articles/8896518-does-anthropic-crawl-data-from-the-web-and-how-can-site-owners-block-the-crawler", @@ -8014,9 +8133,9 @@ "size": 1126 }, { - "url": "https://support.claude.com/en/articles/9028421-how-can-i-delete-my-claude-account", + "url": "https://support.claude.com/en/articles/9028421-delete-your-claude-account", "status": "success", - "path": "support/9028421-how-can-i-delete-my-claude-account.md", + "path": "support/9028421-delete-your-claude-account.md", "sha256": "a20a2b05a35ccf372dda3c884301e09eaa297d763cde12f311a8b92600b748eb", "size": 2731 }, @@ -8136,8 +8255,8 @@ "url": "https://support.claude.com/en/articles/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization", "status": "success", "path": "support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md", - "sha256": "0730e4c3bd4f0e5f756ed310a215a76825b2bc9764d3eaf2fc3b09d81680037e", - "size": 9269 + "sha256": "4cf791577cd964a389790f48ecc2b2cb54d329b6fc842f959da25961e0c46e4e", + "size": 9271 }, { "url": "https://support.claude.com/en/articles/9301722-updates-to-our-acceptable-use-policy-now-usage-policy-consumer-terms-of-service-and-privacy-policy", @@ -8192,8 +8311,8 @@ "url": "https://support.claude.com/en/articles/9519189-manage-project-visibility-and-sharing", "status": "success", "path": "support/9519189-manage-project-visibility-and-sharing.md", - "sha256": "692052b690ba8d0cb5ff159417f59177543ad602002598da5df4521d7ceba40c", - "size": 8571 + "sha256": "50a08f326ced85c1afc918214cce24c72b742cf1cf287d1cecbed30bcf9e2aed", + "size": 8555 }, { "url": "https://support.claude.com/en/articles/9519291-what-is-anthropic-s-policy-for-handling-governmental-requests-for-user-information", @@ -8213,15 +8332,15 @@ "url": "https://support.claude.com/en/articles/9534590-cost-and-usage-reporting-in-the-claude-console", "status": "success", "path": "support/9534590-cost-and-usage-reporting-in-the-claude-console.md", - "sha256": "9179ba6c952154013c61fdf78778194b214d72a2f61c675b7c6f65bccfe3f3fc", - "size": 5106 + "sha256": "f60a001ea1791db2f290e835229c4ab0a62f17d4fadab119159802bb138699da", + "size": 5104 }, { "url": "https://support.claude.com/en/articles/9547008-publish-and-share-artifacts", "status": "success", "path": "support/9547008-publish-and-share-artifacts.md", - "sha256": "16b20c338552b8ade52c5538b86b08f4bfe02e843c6addcc1bd005947adeee5c", - "size": 7322 + "sha256": "7efaac5376205867c1c8f970b950dd61ac9db4858e464743e48e1a8b21aa0859", + "size": 7330 }, { "url": "https://support.claude.com/en/articles/9612887-install-claude-for-android", @@ -8297,8 +8416,8 @@ "url": "https://support.claude.com/en/articles/9927533-disable-public-projects-for-your-organization", "status": "success", "path": "support/9927533-disable-public-projects-for-your-organization.md", - "sha256": "1e1b92ac2d6e754352705f5af6d2bbb7eef7491ee6cf239bd130c61cf95468e6", - "size": 2578 + "sha256": "4d3980823ea541315ef732a0a1600b1052d3b00031c4d406f9bccd3a6aded797", + "size": 2580 }, { "url": "https://support.claude.com/en/articles/9927624-add-or-update-your-team-plan-s-tax-or-vat-id", @@ -8437,14 +8556,14 @@ "url": "https://support.claude.com/en/articles/10310342-how-do-i-log-out-of-all-active-sessions", "status": "success", "path": "support/10310342-how-do-i-log-out-of-all-active-sessions.md", - "sha256": "113cf11f07400f4d555815d67b1419dd34e883db33322de4575cd48cc654c122", + "sha256": "ab6bb06cfd21767c3f0eca429e6295b0d1977735e5c428f82262a1ef65ea846a", "size": 2494 }, { "url": "https://support.claude.com/en/articles/10366376-how-can-i-delete-my-claude-console-account", "status": "success", "path": "support/10366376-how-can-i-delete-my-claude-console-account.md", - "sha256": "376e49cad63c102f3452d9ea5a054631792f7b08dcaa947edb0e30a55976e976", + "sha256": "fdbc64d663de111f9adb0fa9254611690b4fe751017e4c5da0429304bff3e3eb", "size": 3161 }, { @@ -8493,15 +8612,15 @@ "url": "https://support.claude.com/en/articles/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans", "status": "success", "path": "support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md", - "sha256": "22b2888963968678bde344c2969fc8ad2e2ab5352bc1785f4de1267b509696fe", - "size": 1036 + "sha256": "587fd15bf2073a363f981b7d7edf5297130c5e6ee070e73983d645df7f8c7511", + "size": 1034 }, { "url": "https://support.claude.com/en/articles/10504853-manage-user-feedback-settings-on-claude-console", "status": "success", "path": "support/10504853-manage-user-feedback-settings-on-claude-console.md", - "sha256": "2f82f0f3f98a288379fd49e1aa96dbd4d24cf411b3efdd1bdc7da40f0665e20c", - "size": 999 + "sha256": "7bd3a9954d671b1d058dad060d5675dbeacd01b12e9786c42c4e8b5bc19a2513", + "size": 997 }, { "url": "https://support.claude.com/en/articles/10534883-use-the-claude-widget-on-android", @@ -8514,15 +8633,15 @@ "url": "https://support.claude.com/en/articles/10593882-share-and-unshare-chats", "status": "success", "path": "support/10593882-share-and-unshare-chats.md", - "sha256": "51627cd85618d9a2737acf294215dfefc39ec928ee50acf588f671464b4254fe", - "size": 4014 + "sha256": "88c74632d40824cff598deb57abef215b6320a653eb435a2fbfbfcb50a835d10", + "size": 4010 }, { "url": "https://support.claude.com/en/articles/10684626-enable-and-use-web-search", "status": "success", "path": "support/10684626-enable-and-use-web-search.md", - "sha256": "4fb9f5c34df148355dad637a1f2653ecea519e492959c550e0ec4ec7a5e56d57", - "size": 6368 + "sha256": "d2502caa1fe0806841903dc1defe553a3290f36734fdb6bfcae48ba045160b91", + "size": 6370 }, { "url": "https://support.claude.com/en/articles/10684638-report-block-and-remove-content-from-claude", @@ -8542,8 +8661,8 @@ "url": "https://support.claude.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop", "status": "success", "path": "support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md", - "sha256": "5d9b5f3fe23c607676c19f8bda5bca4a2d78c6204ebb20ae33b507b9456b5816", - "size": 8265 + "sha256": "a05530ff8f2b26fd9ccd296cc1cc5be28ba5c8ba974061088a64a3f4b186b2fe", + "size": 8269 }, { "url": "https://support.claude.com/en/articles/11049741-what-is-the-max-plan", @@ -8584,8 +8703,8 @@ "url": "https://support.claude.com/en/articles/11101966-use-voice-mode", "status": "success", "path": "support/11101966-use-voice-mode.md", - "sha256": "4579731328fcc2b36a54261fbbbe7e6dd93c1b57273e9886dffc49ed0c3bc2db", - "size": 10556 + "sha256": "46f1e6bb6978ee5f8d9ef8dc3dd62006cd97c9872f7fdb0b0541ae4fed309603", + "size": 10552 }, { "url": "https://support.claude.com/en/articles/11107691-why-is-a-coupon-or-promotion-not-available-for-my-account", @@ -8647,8 +8766,8 @@ "url": "https://support.claude.com/en/articles/11176164-use-connectors-to-extend-claude-s-capabilities", "status": "success", "path": "support/11176164-use-connectors-to-extend-claude-s-capabilities.md", - "sha256": "708113094cfc0787adf362cb90370f1df7e36741ef1123e36ea6faaa24bcab49", - "size": 12332 + "sha256": "76d5b19bd17675b821a09c4a1597092c5ecbd5ee2c2b55baaa6eb212b685f0de", + "size": 12696 }, { "url": "https://support.claude.com/en/articles/11199177-anthropic-s-ai-for-science-program", @@ -8717,7 +8836,7 @@ "url": "https://support.claude.com/en/articles/11725453-set-up-the-claude-lti-in-canvas-by-instructure", "status": "success", "path": "support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md", - "sha256": "dfefcc13f9094f249c08966192e5ed94c4bfed96e96a406adee5300a060643a3", + "sha256": "e018f299c00b0e8f88332eecff6c7287fdef7bc0cc069102c025434eef679458", "size": 2748 }, { @@ -8738,8 +8857,8 @@ "url": "https://support.claude.com/en/articles/11818288-why-am-i-being-asked-to-verify-my-payment-method", "status": "success", "path": "support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md", - "sha256": "5d17e6bb03fc5bcf07c9285b27c12afbd28f76b04cb99f1bb52d8e3691e4c68d", - "size": 814 + "sha256": "4df6a08210ebb0f961d3a93832d7190bd4b0d1bacc0b0d77d68a186440f646d9", + "size": 816 }, { "url": "https://support.claude.com/en/articles/11825384-how-to-update-claude-for-ios", @@ -8773,8 +8892,8 @@ "url": "https://support.claude.com/en/articles/11869629-use-claude-with-android-apps", "status": "success", "path": "support/11869629-use-claude-with-android-apps.md", - "sha256": "44ce7e5e22d244980a167ed7ea920a19990a8afdf55f7fecdc841954c6d2c3c4", - "size": 13881 + "sha256": "95d8202dfa99fdccca9b4f8ddf1e2ddcb8bfb7891ef3f1270f49ff637a427503", + "size": 13879 }, { "url": "https://support.claude.com/en/articles/11932705-automated-security-reviews-in-claude-code", @@ -8808,15 +8927,15 @@ "url": "https://support.claude.com/en/articles/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans", "status": "success", "path": "support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md", - "sha256": "b1979e5bf176973292ee07afb96a49d05e49c898540ceb9ed6161395905da948", - "size": 9642 + "sha256": "61aede3b323723f100d637bfe3f3f76e3ff16f1195822c5a2181793592cba132", + "size": 9636 }, { "url": "https://support.claude.com/en/articles/12012173-get-started-with-claude-in-chrome", "status": "success", "path": "support/12012173-get-started-with-claude-in-chrome.md", - "sha256": "dd5e45c77f68b6f7bd10e40b12dcbdf9929c6f4bfacc803e2ea22d705a3209fb", - "size": 14335 + "sha256": "ca63860821b416a4446c44e38f048b51a2e1d8c15f253f7ac6d7c2b76656d7e5", + "size": 14331 }, { "url": "https://support.claude.com/en/articles/12053672-what-happens-to-a-user-s-data-when-they-are-removed-from-a-team-or-enterprise-organization", @@ -8829,7 +8948,7 @@ "url": "https://support.claude.com/en/articles/12083917-change-your-team-plan-from-monthly-to-annual-billing", "status": "success", "path": "support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md", - "sha256": "51a87bdcc3591fbd049f9c39c2d6ee87b29b5380753d7caf6d3c14d999f5acb2", + "sha256": "48b265bfe68ebf47f3a5708a53f1cf8ddf290fa8898a4ae38c8d0cbc69c9009b", "size": 1396 }, { @@ -8843,8 +8962,8 @@ "url": "https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude", "status": "success", "path": "support/12111783-create-and-edit-files-with-claude.md", - "sha256": "51e6ec2d9c1c874642379757974f9703df583a9cea142976b5921994290f0030", - "size": 17968 + "sha256": "53aef70ecd8d1dbb4eef599b69164033b19ee991e4a7a57f75a3409fe0eacf74", + "size": 17966 }, { "url": "https://support.claude.com/en/articles/12119250-model-safety-bug-bounty-program", @@ -8871,22 +8990,22 @@ "url": "https://support.claude.com/en/articles/12157520-claude-code-usage-analytics", "status": "success", "path": "support/12157520-claude-code-usage-analytics.md", - "sha256": "eb854c8dfbd396ad1f64718b4924607d8aa62d0061749d15eb2d0c915e2dd844", - "size": 6431 + "sha256": "a77e75fd3538c25cfa4a65b67378ab47e4f9f36d138af4c263f45c85464a9bc8", + "size": 6425 }, { "url": "https://support.claude.com/en/articles/12260368-use-incognito-chats", "status": "success", "path": "support/12260368-use-incognito-chats.md", - "sha256": "61c9fae9125af9f82ad2bc79ad809f2ab8567d8c9da7d75618e9f3920cd321bb", - "size": 3600 + "sha256": "ebd1e2525a29957a00ab7df10af69635f9613f738e3e55228ddf8c4083ff6186", + "size": 3598 }, { "url": "https://support.claude.com/en/articles/12293051-use-claude-in-xcode", "status": "success", "path": "support/12293051-use-claude-in-xcode.md", - "sha256": "0230e1ed2ddd708edfcf847f2739bc00e86f391515ad22d8ffc8e8e31a7cc508", - "size": 1909 + "sha256": "343d119e9edb7557f5a208232555e7a21d0bd9da7489c68cc07d4688033f6e30", + "size": 1907 }, { "url": "https://support.claude.com/en/articles/12304248-manage-api-key-environment-variables-in-claude-code", @@ -8927,15 +9046,15 @@ "url": "https://support.claude.com/en/articles/12429409-manage-usage-credits-for-paid-claude-plans", "status": "success", "path": "support/12429409-manage-usage-credits-for-paid-claude-plans.md", - "sha256": "1939930609fa2f742b0518ff7b768272bb746a1b4421be8d46e6dce6da72470a", - "size": 6410 + "sha256": "f999978226332f25a672c2e96a6c301685cf165f40c3ab01daec67bbf545d1b1", + "size": 6414 }, { "url": "https://support.claude.com/en/articles/12466728-troubleshoot-claude-error-messages", "status": "success", "path": "support/12466728-troubleshoot-claude-error-messages.md", - "sha256": "18c2a8f969c486f6934d17af9edd996c680e220bd317e89d315fc510290e3bba", - "size": 4234 + "sha256": "e519f2ceb2fbd61237b7fad6f04e540ce25ae3a1c91720d0a99544277d94e3b3", + "size": 4230 }, { "url": "https://support.claude.com/en/articles/12489464-use-enterprise-search", @@ -8955,8 +9074,8 @@ "url": "https://support.claude.com/en/articles/12512180-use-skills-in-claude", "status": "success", "path": "support/12512180-use-skills-in-claude.md", - "sha256": "d2b2f6dadcbe084835d81a7911ab4ef05f58178131443e1dd661c973d411f65c", - "size": 14429 + "sha256": "a87010e5c529b873ffb2e957e1ea2052906a3a7b1e2baa82f055d9f7c4b846c0", + "size": 14937 }, { "url": "https://support.claude.com/en/articles/12512198-how-to-create-custom-skills", @@ -8976,8 +9095,8 @@ "url": "https://support.claude.com/en/articles/12592343-enabling-and-using-the-desktop-extension-allowlist", "status": "success", "path": "support/12592343-enabling-and-using-the-desktop-extension-allowlist.md", - "sha256": "87d0bca1da39e1101c65661d789817816c9b388dba237a3186d7b33bacc587c0", - "size": 5710 + "sha256": "e44fd6f66d0dd4cbe2e5b282728a57161f875fe68a1dd2f171d46144e57a4cf1", + "size": 5712 }, { "url": "https://support.claude.com/en/articles/12611117-deploy-claude-desktop-for-macos", @@ -8990,8 +9109,8 @@ "url": "https://support.claude.com/en/articles/12618689-claude-code-on-the-web", "status": "success", "path": "support/12618689-claude-code-on-the-web.md", - "sha256": "9af3a688b0faf9184656731204414b48c5ceb786026dcffb02231fa54d797e20", - "size": 10964 + "sha256": "4dcd2d7789f19fbb0458d3305e07824088981a0af8941f35e574956a96caf9bb", + "size": 10968 }, { "url": "https://support.claude.com/en/articles/12622667-enterprise-configuration-for-claude-desktop", @@ -9011,8 +9130,8 @@ "url": "https://support.claude.com/en/articles/12626668-use-quick-entry-with-claude-desktop-on-mac", "status": "success", "path": "support/12626668-use-quick-entry-with-claude-desktop-on-mac.md", - "sha256": "73c80c567a494dd216c442f0d67a3bf5dcd6c6abcce2c84f3f0fcac2b776a270", - "size": 5970 + "sha256": "7b589064039bcebb2d900ff18b21ffad997a4bfd5bdfbd5ae7b0cdbc54634f3b", + "size": 5972 }, { "url": "https://support.claude.com/en/articles/12684923-microsoft-365-connector-security-guide", @@ -9046,8 +9165,8 @@ "url": "https://support.claude.com/en/articles/12883420-view-usage-analytics-for-team-and-enterprise-plans", "status": "success", "path": "support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md", - "sha256": "78f07dd58b81eae40e74fb22b2ff159eaf279bee5afb2d50cb529aa1f86ff45c", - "size": 13163 + "sha256": "4cd68a2b9ca82c02ef2def818f050e24071ea7ae3c3d74289a7c024698358ca0", + "size": 13181 }, { "url": "https://support.claude.com/en/articles/12902405-claude-in-chrome-troubleshooting", @@ -9067,8 +9186,8 @@ "url": "https://support.claude.com/en/articles/12902446-claude-in-chrome-permissions-guide", "status": "success", "path": "support/12902446-claude-in-chrome-permissions-guide.md", - "sha256": "425396d41dcef3d0c9fd94543b4cde590d042b670d761f4ecaa403b4bc427f55", - "size": 9563 + "sha256": "9baa3b7b15a38c8f3d15b7d80e36edd266cf0dc40eae8d78f9ff1f3c7279c831", + "size": 9571 }, { "url": "https://support.claude.com/en/articles/12938627-how-to-gift-a-claude-subscription", @@ -9095,8 +9214,8 @@ "url": "https://support.claude.com/en/articles/12997503-team-plan-billing-faqs", "status": "success", "path": "support/12997503-team-plan-billing-faqs.md", - "sha256": "0f634d6bd1d80b722fc8b48167c45484f6443f5bcc5c3813a727c38321e05c74", - "size": 4008 + "sha256": "cd2e5325c8be34f3bb5661bda35f4f3f852894b7f747a20e064a5f16144b618c", + "size": 4004 }, { "url": "https://support.claude.com/en/articles/13015708-access-the-compliance-api", @@ -9130,8 +9249,8 @@ "url": "https://support.claude.com/en/articles/13119606-provision-and-manage-skills-for-your-organization", "status": "success", "path": "support/13119606-provision-and-manage-skills-for-your-organization.md", - "sha256": "ab19039aa91cb98841732c27aae243916ec10f722f35b7d3df90d3a0b1dc0293", - "size": 9990 + "sha256": "bb8c680de06e545b0e441d142848eea69fea63aaddca1ebb8ee25fda4ac4d035", + "size": 11047 }, { "url": "https://support.claude.com/en/articles/13124001-managing-your-active-sessions", @@ -9144,15 +9263,15 @@ "url": "https://support.claude.com/en/articles/13132885-set-up-single-sign-on-sso", "status": "success", "path": "support/13132885-set-up-single-sign-on-sso.md", - "sha256": "c9b976cb3e7ab7df993b7a757edffe2a3e7f7a7a916edc320e599157f92ecd72", - "size": 12315 + "sha256": "3a1a03459b0b9f83b65c27c1b1ef45c8ae24bcd5026518db41a5b52798d51981", + "size": 12323 }, { "url": "https://support.claude.com/en/articles/13133195-set-up-jit-or-scim-provisioning", "status": "success", "path": "support/13133195-set-up-jit-or-scim-provisioning.md", - "sha256": "4a5b2a01d773c1a09423ce3273f0ab70030fb74bee24d20a945368b60bc699f0", - "size": 16610 + "sha256": "51427e53bb9ceb2eb11ffdb54aecf8ccee03b323162a01a303fef39736861daa", + "size": 19561 }, { "url": "https://support.claude.com/en/articles/13133750-manage-members-on-team-and-enterprise-plans", @@ -9179,8 +9298,8 @@ "url": "https://support.claude.com/en/articles/13163631-configuring-session-security-settings", "status": "success", "path": "support/13163631-configuring-session-security-settings.md", - "sha256": "098a15839e9a911f1b684c5d02903e2c6111b1960339c8b054d893862e5becb6", - "size": 3706 + "sha256": "0b04fbbc282ed70ca0bf65aa5fa1ca42d20d0838d67f9ef5e080d17c4754faba", + "size": 3698 }, { "url": "https://support.claude.com/en/articles/13163666-holiday-2025-usage-promotion", @@ -9200,7 +9319,7 @@ "url": "https://support.claude.com/en/articles/13189465-log-in-to-your-claude-account", "status": "success", "path": "support/13189465-log-in-to-your-claude-account.md", - "sha256": "70802fa28ae31a3430fcaedb897d5db2ff4e18d0e7f3969291fd5c4adc003e6f", + "sha256": "59a31baac5eb28457c7ad949c62f7e0c42acaf6a66e0e2d9c881a371f0cbc6ac", "size": 7038 }, { @@ -9228,22 +9347,22 @@ "url": "https://support.claude.com/en/articles/13325567-account-management-faqs", "status": "success", "path": "support/13325567-account-management-faqs.md", - "sha256": "5c9db6533d5e55459763db2f88527c620529df4073e2033c8b967f6b0040fec8", + "sha256": "0d99531aa5e75d1814b40bc8485355fc1a53d41e9b3215a2a8ccb0df4c0a6115", "size": 2634 }, { "url": "https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork", "status": "success", "path": "support/13345190-get-started-with-claude-cowork.md", - "sha256": "7009e41e57a320197f7ea6c0cb9d576615acc8bd0a2d23f2ba60d788f7d1d475", - "size": 20562 + "sha256": "a2124a111e6f44cfe933e071502086cfc2af24f22faa128fe9cae158f249fc03", + "size": 20728 }, { "url": "https://support.claude.com/en/articles/13346458-customizing-your-console-appearance-settings", "status": "success", "path": "support/13346458-customizing-your-console-appearance-settings.md", - "sha256": "1157a3c340a34f25e6bb910739c926636e9cbadc5065446337178aeed46fbafc", - "size": 605 + "sha256": "dd013246aeed4e1a726ed4e1463d14cf069e98946db8db1e189c5b783a4dd5e2", + "size": 609 }, { "url": "https://support.claude.com/en/articles/13346720-export-your-organization-s-data", @@ -9263,7 +9382,7 @@ "url": "https://support.claude.com/en/articles/13371040-log-in-to-your-console-account", "status": "success", "path": "support/13371040-log-in-to-your-console-account.md", - "sha256": "20107a637687fbda8e594297524fc2f87b684359a2d3ecdc8fc991baa10e01e5", + "sha256": "2623784a8000967e810313f8f4cbc898e4f50cf5350866075b3668c4a39f6f26", "size": 4611 }, { @@ -9305,8 +9424,8 @@ "url": "https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans", "status": "success", "path": "support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md", - "sha256": "5fd5c8402562b5dcbf7ca01c5769099792ff7d5caca38fc0bcd7836c1b0d3cba", - "size": 10832 + "sha256": "6b86d5e2e2a386ef6c8d75a0ee31e06084775fcef75097f444582305be2ff165", + "size": 11469 }, { "url": "https://support.claude.com/en/articles/13566435-find-and-join-a-team-or-enterprise-organization", @@ -9319,8 +9438,8 @@ "url": "https://support.claude.com/en/articles/13641943-visual-and-interactive-content", "status": "success", "path": "support/13641943-visual-and-interactive-content.md", - "sha256": "de5d3078aa7f78e8e8077723048541b3bcb5eeff0040e3cbd081685149a23c04", - "size": 6509 + "sha256": "6cac94068f41dbc77332dde20156ceab33162b84e23643ac4dd2cd784a7b57c7", + "size": 6507 }, { "url": "https://support.claude.com/en/articles/13663666-use-visual-and-interactive-content-on-team-and-enterprise-plans", @@ -9347,7 +9466,7 @@ "url": "https://support.claude.com/en/articles/13756069-public-sector-faqs", "status": "success", "path": "support/13756069-public-sector-faqs.md", - "sha256": "8237312d67a741824fe41876c93846428d00aafbd4a28fb5db2e943615c4a3f7", + "sha256": "3665a7bdff3d42198dde8aa29af9d27419ce037e264233c8e52c861db3d635a5", "size": 8378 }, { @@ -9375,22 +9494,22 @@ "url": "https://support.claude.com/en/articles/13837433-manage-plugins-for-your-organization", "status": "success", "path": "support/13837433-manage-plugins-for-your-organization.md", - "sha256": "64d9e8da9843f39fc48ca8b68d5476fbee5aa54bee50e27fcb1851c4caa38d1a", - "size": 19932 + "sha256": "baae7cf16944a3119b1532cf7d92d40994824d7d0dc11af135f3c0b904edee33", + "size": 20833 }, { "url": "https://support.claude.com/en/articles/13837440-use-plugins-in-claude", "status": "success", "path": "support/13837440-use-plugins-in-claude.md", - "sha256": "c75099859a39df38fb56b1c9a847680904e5e1a19454da0c6ba28782756265c5", + "sha256": "2f3d28bb4b7246d195cf71c26bd13dff4f3c671f9a8d717453dce8c3a991d580", "size": 6720 }, { "url": "https://support.claude.com/en/articles/13854387-schedule-recurring-tasks-in-claude-cowork", "status": "success", "path": "support/13854387-schedule-recurring-tasks-in-claude-cowork.md", - "sha256": "b43a8975c4b60a3625b497dce22e0a1ef310d487c2259b3ea6c9a7945f5ce7eb", - "size": 4747 + "sha256": "088e0ba1e4ba0b320fea7456f0e3649a2e19406490b885e0ba842f9854f99030", + "size": 4745 }, { "url": "https://support.claude.com/en/articles/13917817-google-workspace-sso-scim-email-mismatch", @@ -9473,15 +9592,15 @@ "url": "https://support.claude.com/en/articles/13930458-set-up-role-based-permissions-on-enterprise-plans", "status": "success", "path": "support/13930458-set-up-role-based-permissions-on-enterprise-plans.md", - "sha256": "b292713a85fb68d5b43a6e3fd0067a2a521a76c6c80a63520a8e905add020369", - "size": 42072 + "sha256": "598f7216ba1965c769a429487397ae00a2635fe9d7c0e5b04c8d59c267bf9f9f", + "size": 42066 }, { "url": "https://support.claude.com/en/articles/13947068-assign-tasks-from-anywhere-in-claude-cowork", "status": "success", "path": "support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md", - "sha256": "680712c10f4721820c72aa19b8073aff277485dea04d16e91e882040ac46fad7", - "size": 8282 + "sha256": "e4ee73fee6f7985f57220a0a339664446089a958058b78fddec390dec7bdf0f8", + "size": 8276 }, { "url": "https://support.claude.com/en/articles/13979539-custom-visuals-in-chat-and-cowork", @@ -9501,14 +9620,14 @@ "url": "https://support.claude.com/en/articles/14116274-organize-your-tasks-with-projects-in-claude-cowork", "status": "success", "path": "support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md", - "sha256": "b3581ac67f1b0e0233c3a827dc23a61f3c0b6ac0f66f954cb709b731be95d705", - "size": 5692 + "sha256": "8029fedc5eb4006e7b5bb09c1cccde33c4ae1e57e19e31cd1d91873fd353884b", + "size": 5698 }, { "url": "https://support.claude.com/en/articles/14128542-let-claude-use-your-computer-in-cowork", "status": "success", "path": "support/14128542-let-claude-use-your-computer-in-cowork.md", - "sha256": "d6ff2f7414477922f3af9f49e16c486b89a13bfcae3a3ac211efc237704cde33", + "sha256": "126a9d3b67989a879c4406f03ed664fe364fedb6f970e4d9f92542c3f753204e", "size": 8288 }, { @@ -9571,7 +9690,7 @@ "url": "https://support.claude.com/en/articles/14499648-how-scim-sync-works-for-enterprise-organizations", "status": "success", "path": "support/14499648-how-scim-sync-works-for-enterprise-organizations.md", - "sha256": "d422bc21b2cd5caf3dd2e204372cbea1d551e82c14a6910f87a1005832da6119", + "sha256": "c88e11c934cb03b3b14c3ab48929075536a3b33cde27731f662a4155bf2a629f", "size": 7438 }, { @@ -9592,15 +9711,15 @@ "url": "https://support.claude.com/en/articles/14503613-sso-login", "status": "success", "path": "support/14503613-sso-login.md", - "sha256": "da1af891166d5edc8b1ce648e6c0f021bc6741575a8f7762f3b55da7e920ff75", - "size": 6686 + "sha256": "8b0cafc18b8cddb84ff288ce44fff6f271b915643c08aee9516480a9523be130", + "size": 6692 }, { "url": "https://support.claude.com/en/articles/14503643-set-up-scim-in-claude-for-government", "status": "success", "path": "support/14503643-set-up-scim-in-claude-for-government.md", - "sha256": "7c71d076cecd75e167be88b5b6accded2f27d3908ce2151e006990caeadcad43", - "size": 6417 + "sha256": "bf5a5be48351e77288657fc33b3c24a0c0f17aa771144e1023e45238026337d1", + "size": 6423 }, { "url": "https://support.claude.com/en/articles/14503675-organization-instructions-in-claude-for-government", @@ -9627,8 +9746,8 @@ "url": "https://support.claude.com/en/articles/14503775-mcp-web-search", "status": "success", "path": "support/14503775-mcp-web-search.md", - "sha256": "1164faf818c2645ac1938c560166a98ad222630a9b05590e3e7dccd4f16c47bd", - "size": 4677 + "sha256": "ce02c4b7c31151ba8ed4d5d9f7e2cc0ea4803d9e371f493b501c3d3d4ee22ff1", + "size": 4675 }, { "url": "https://support.claude.com/en/articles/14503794-model-availability-in-claude-for-government", @@ -9725,29 +9844,29 @@ "url": "https://support.claude.com/en/articles/14604397-set-up-your-design-system-in-claude-design", "status": "success", "path": "support/14604397-set-up-your-design-system-in-claude-design.md", - "sha256": "2e5b90493ffffa449c8b3eb618f7d5d4da23374eba84548e40ad025462b24baf", - "size": 4394 + "sha256": "508226ff0308fb63ce8ab743e98c8882bc7521f167056b2af5dc34a7a87098f3", + "size": 4396 }, { "url": "https://support.claude.com/en/articles/14604406-claude-design-admin-guide-for-team-and-enterprise-plans", "status": "success", "path": "support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md", - "sha256": "2c6bae5fc1450234b28902e3d173dd583b36f7ae88d60fdc3c49b0519d5d0962", - "size": 12735 + "sha256": "96c81c74e77e337230eaedf7d08b13429406bedff840101d45c1607e8407dffb", + "size": 12733 }, { "url": "https://support.claude.com/en/articles/14604416-get-started-with-claude-design", "status": "success", "path": "support/14604416-get-started-with-claude-design.md", - "sha256": "ec55b6aedcab0bce9a5cb05f332e91d45460ace10c9336785c8a7de3b495fd19", + "sha256": "3b6b1610324baedd06eb9972872cac19c6af3024f7fe2b2ee48ad5593692addd", "size": 11136 }, { "url": "https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet", "status": "success", "path": "support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md", - "sha256": "e17c5c306e795803af20ce9bc2b3d65af47cd8393075ee3378ecba5db401065a", - "size": 7863 + "sha256": "6c5da77000502ab430294187be948b94631aa297219170933e0215d228b3fb85", + "size": 8517 }, { "url": "https://support.claude.com/en/articles/14625619-claim-and-migrate-accounts-on-your-domain", @@ -9865,7 +9984,7 @@ "url": "https://support.claude.com/en/articles/15330088-set-a-default-model-for-your-organization", "status": "success", "path": "support/15330088-set-a-default-model-for-your-organization.md", - "sha256": "7293df94cf2a6a78d0dc24e42eed78d547edc2d0028e8f0edd25983c6c641f38", + "sha256": "4a00cb6121735a519e5c24501a5655c83e98ebb693f54c0bf062e52fa6e56e8e", "size": 5742 }, { @@ -9977,8 +10096,8 @@ "url": "https://support.claude.com/en/articles/15694740-manage-model-access-for-your-organization", "status": "success", "path": "support/15694740-manage-model-access-for-your-organization.md", - "sha256": "4c8513679b6d0b1e5c3fa6c04cb6ee6595bc9bfe733b786aaa0f9aa5ab7841a6", - "size": 8511 + "sha256": "4ac80f53acf96f7a17e72f5059ebd25a9f3d1e3b84b71eda13c0db29e6dde513", + "size": 8507 }, { "url": "https://support.claude.com/en/articles/15707726-using-claude-for-legal-work-privilege-confidentiality-and-how-to-think-about-configuration", @@ -10012,7 +10131,7 @@ "url": "https://support.claude.com/en/articles/15936181-get-started-with-1password-for-claude", "status": "success", "path": "support/15936181-get-started-with-1password-for-claude.md", - "sha256": "0b31150ffd9a5881afeb92eddb5f4eb2c75ef25a90b2584badfda77599d49a92", + "sha256": "eacb376abb442eed88aa9a52a2961d05f078b557477c82e7471f50403782336b", "size": 5056 }, { @@ -12189,7 +12308,7 @@ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/main/.claude-plugin/marketplace.json", "status": "success", "path": "github/claude-plugins-official/.claude-plugin/marketplace.json", - "sha256": "50449eb87355c01b78709cae3d577fe994b96362e56460dfdd1df0d142f24883", + "sha256": "d59c14446c9a9a232ea37733fb2dc9dc4217a4045119eb8dec845e1e791db568", "size": 168794 }, { @@ -15262,8 +15381,8 @@ "url": "https://raw.githubusercontent.com/anthropics/claude-code-action/main/docs/configuration.md", "status": "success", "path": "github/claude-code-action/docs/configuration.md", - "sha256": "0624d4813bfdfba21f450c0b8412334cf02524e50d6fbbd495a521569019c572", - "size": 12682 + "sha256": "d7b0d1381e846eb6504d452459b450a267858759b565bd4744e88f6470cd75ec", + "size": 13611 }, { "url": "https://raw.githubusercontent.com/anthropics/claude-code-action/main/docs/custom-automations.md", @@ -15661,8 +15780,15 @@ "url": "https://raw.githubusercontent.com/anthropics/cwc-workshops/main/ship-your-first-managed-agent/README.md", "status": "success", "path": "github/cwc-workshops/ship-your-first-managed-agent/README.md", - "sha256": "41fa08a8c80e513275d452e2218a307bb9edafaf19dfc57eba395080f4157534", - "size": 4502 + "sha256": "dc3004a29f4445f3ece4487a27f18e414b384c07052a2f84b245ee7a16f0f26f", + "size": 4847 + }, + { + "url": "https://raw.githubusercontent.com/anthropics/cwc-workshops/main/ship-your-first-managed-agent/incident-triage-runbook/SKILL.md", + "status": "success", + "path": "github/cwc-workshops/ship-your-first-managed-agent/incident-triage-runbook/SKILL.md", + "sha256": "a149675d59f790d0094bf7170b240beb00d702d077769532b8f21e3b22f6f329", + "size": 1399 }, { "url": "https://raw.githubusercontent.com/anthropics/cwc-long-running-agents/main/README.md", @@ -15696,8 +15822,8 @@ "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/CHANGELOG.md", "status": "success", "path": "github/anthropic-sdk-python/CHANGELOG.md", - "sha256": "4c7605cb2743a116dedd186b1df35945a9547e431872ad557d9753099c3f81f9", - "size": 225824 + "sha256": "54b2ef339cc50969be795c98d7a2ab1c357b8d008942ee3030707c559936b4b1", + "size": 226918 }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/CONTRIBUTING.md", @@ -15706,12 +15832,19 @@ "sha256": "86f621e57cb6cd7f46463e70e87fe09ba04498f3999d081cbf8c5c39e058818d", "size": 4684 }, + { + "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/MIGRATION.md", + "status": "success", + "path": "github/anthropic-sdk-python/MIGRATION.md", + "sha256": "2163448f25e2d5819608f607da2f66f776ecbea5c618625904ce28d77a526615", + "size": 24606 + }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/README.md", "status": "success", "path": "github/anthropic-sdk-python/README.md", - "sha256": "e5b1518fb2538ff7624c6f4d5c14a07b9e30ca69a2cbf1d3c9b8c1be2ff4a0ea", - "size": 1066 + "sha256": "abfed505bba2888ca968565b633561379ec9d87d29b65ddee53e8fb86d571ed6", + "size": 1144 }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/SECURITY.md", @@ -15724,8 +15857,8 @@ "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/api.md", "status": "success", "path": "github/anthropic-sdk-python/api.md", - "sha256": "9a449941e0eb156fb8e350636e818fe6a406c5a809ca39f2ae90bce424b035a3", - "size": 82918 + "sha256": "c3cb64ac0b468b517520f66bb70cf13f1e551995d98601cfd0762e48cc26ffea", + "size": 82894 }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/examples/greeting-SKILL.md", @@ -15741,6 +15874,13 @@ "sha256": "842e7974c938931282d274d2896a8ecf408a95b4bfcc6ac75909dc42cc8b79dc", "size": 14424 }, + { + "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/src/anthropic/_vendor/httpx_aiohttp/NOTICE.md", + "status": "success", + "path": "github/anthropic-sdk-python/src/anthropic/_vendor/httpx_aiohttp/NOTICE.md", + "sha256": "90f45e20cf0b5c730d956ad93d3cd68ab4466b9c7490ac2a1999c8dcbd521562", + "size": 1705 + }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/src/anthropic/lib/foundry.md", "status": "success", @@ -15752,8 +15892,8 @@ "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/src/anthropic/lib/google_cloud/README.md", "status": "success", "path": "github/anthropic-sdk-python/src/anthropic/lib/google_cloud/README.md", - "sha256": "05de37788c6bfb904986f36fc572514da719cb733380b2326e0c97f07ee7cb0f", - "size": 5311 + "sha256": "ab9b60f41a6f75c18a1f6782b1a6081b93498dd24a85ca76b3a717f4844145d6", + "size": 5259 }, { "url": "https://raw.githubusercontent.com/anthropics/anthropic-sdk-python/main/tools.md", @@ -15932,10 +16072,6 @@ } ], "failures": [ - { - "url": "https://support.claude.com/en/articles/8114526-how-will-i-be-billed-for-claude-api-use", - "error": "404, message='Not Found', url='https://support.claude.com/en/articles/8114526-how-will-i-be-billed-for-claude-api-use.md'" - }, { "url": "https://support.claude.com/en/articles/12650343-use-claude-for-excel", "error": "upstream returned HTML, not markdown (soft 404)" @@ -15966,10 +16102,10 @@ } ], "summary": { - "total": 2283, - "downloaded": 2275, + "total": 2302, + "downloaded": 2295, "skipped": 0, - "failed": 8, - "success_rate": 99.6 + "failed": 7, + "success_rate": 99.7 } } \ No newline at end of file diff --git a/content/CHANGELOG.md b/content/CHANGELOG.md index d2211503db..e347b6d583 100644 --- a/content/CHANGELOG.md +++ b/content/CHANGELOG.md @@ -1,5 +1,47 @@ # Changelog +## 2.1.238 + +- Added a `keybindingFlavor` setting: set it to `"readline"` to make Ctrl+W in the prompt delete back to the previous whitespace, as in Bash; the default (`"classic"`) is unchanged +- Plugin marketplaces: `headersHelper` on a url marketplace or a catalog entry runs a command that mints HTTP headers (e.g. a short-lived token) for catalog and same-origin archive fetches +- A catalog entry's `headersHelper` runs only when you install or update that plugin, after its command is shown; `claude plugin install/update` ask `[y/N]` (or pass `-y`) +- Added `claude self-hosted-runner --defer-shutdown-max-min `: on SIGTERM, keep serving attached sessions, park what is left after that many minutes, then exit +- Added `claude self-hosted-runner --proxy-authorization-command` / `--proxy-authorization-file` for egress proxies that require a freshly issued `Proxy-Authorization` header on every connection +- Fixed unbounded memory growth in long interactive sessions: subagent tool results are now released once they leave the recent display window +- Fixed custom, project, and plugin output styles drifting back to the default voice mid-session +- Fixed `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true` not keeping prompt suggestions on when your account is near, but not over, its usage limit +- Fixed worktree-isolation Bash refusals telling you to remove a redirect when the command had none +- Fixed self-hosted runners occasionally being removed by the server after a single slow or lost poll request, handing their healthy session to another runner +- Fixed MCP elicitation dialogs showing nothing for URLs longer than 4,096 characters, and permission prompts dropping the "don't ask again" option when the project path didn't fit the terminal width +- Fixed leftover `/tmp/claude-*-cwd` files when a Bash command is killed, times out, or is interrupted +- Fixed held Backspace being ignored on terminals that send Ctrl+H for Backspace when keystrokes arrive in large bursts (slow SSH/mosh links) +- Fixed text-wrapping in permission prompt diffs: lines containing wide multi-code-point characters (such as emoji) or tabs are no longer clipped +- Fixed killing a suspended (Ctrl+Z) session sometimes leaving the terminal in bracketed-paste mode with the cursor hidden +- Fixed stdio MCP servers receiving a `server/discover` request before `initialize`, forcing lazy servers to start their backend on every session open +- Fixed a proxy's refusal of a connection being reported as a generic network error instead of naming the proxy +- Fixed the `/model` and `/effort` cache-miss warning appearing when the prompt cache had already expired +- Fixed per-task Stop from the Remote Control tasks panel doing nothing on CLI-hosted sessions +- Fixed remote sessions exiting when a client delivered a user message without a valid role +- Fixed Remote Control sessions started by `claude remote-control` inheriting session-scoped environment variables from the launching shell +- Fixed a Remote Control session whose process crashed staying unavailable until `claude remote-control` was restarted; it can now be reused when you next message it +- Fixed Remote Control messages sent from the web or Desktop while Claude is mid-turn disappearing from the transcript after the turn finishes +- Fixed Remote Control model picks made on a phone or web not updating the model shown in the terminal +- Fixed Remote Control disconnecting with "login expired" when a brief network hiccup delays renewing your sign-in; it now retries and stays connected +- Fixed Remote Control reporting a failed reconnect on sign-out; signing out now ends the session with a clear message +- Fixed `ListAgents`/`SendMessage` reporting "Remote Control is not connected" in sessions run by `claude remote-control` (server mode) or Desktop/IDE hosts; they now list and reach Remote Control peers +- Fixed `ListAgents` and `SendMessage` exposing the idle worker that the agent view pre-warms for your next background session; it now appears only once a task claims it +- Cross-session messaging: sending to a session on this machine that refuses inbound messages (e.g. `crossSessionInbound: "refuse"`) now reports "refused" to the sender instead of a silent success +- Cross-session messaging: a session whose inbox drops your messages (rate limit or full queue) now tells your session, instead of the messages vanishing silently +- Improved startup: bare `claude` starts sooner on macOS +- Improved Bash tool permission checking for zsh-specific syntax in shell conditionals +- Improved Remote Control connection resilience: brief HTTP 403 refusals from a network edge, VPN, or proxy are now tolerated for up to 3 minutes, with the refusing party named when a block persists +- Improved startup responsiveness: the automatic update check now runs about 10 seconds after launch instead of competing with startup for CPU +- Updated the bundled `claude-api` skill for the Managed Agents Aug 19 release: web search/fetch domain settings and memory stores on self-hosted sandboxes +- Changed Ctrl+L and Cmd+K in fullscreen to always just repaint — the double-press `/clear` shortcut was removed, and 1-row nvim terminals no longer trigger automatic `/clear` loops +- Changed `claude mcp list` and `claude mcp get` to show disabled servers as `⊘ Disabled` instead of connecting to them for a health check +- MCP `headersHelper` in a project `.mcp.json`, and inline MCP servers in project or `--add-dir` agent files, now require that folder's trust dialog to have been accepted (also under `claude -p`) +- MCP `headersHelper` from a project `.mcp.json`, plugin, or agent file runs without inherited credential env vars; user, managed and claude.ai-scope helpers now run from the Claude config dir + ## 2.1.237 - Fixed prompt caching for sessions using an LLM gateway or custom base URL diff --git a/content/claude-code-manifest.json b/content/claude-code-manifest.json index 81abd57b7a..9edd2aac2b 100644 --- a/content/claude-code-manifest.json +++ b/content/claude-code-manifest.json @@ -6,17 +6,17 @@ "url": "https://github.com/anthropics/claude-code/issues" }, "dist": { - "shasum": "ee9d0ca62e3af256bcf28ae71ae198fb7e67a504", - "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.237.tgz", + "shasum": "a8ba2539a61441b7a268a07dc2bf5623534fd127", + "tarball": "https://registry.npmjs.org/@anthropic-ai/claude-code/-/claude-code-2.1.238.tgz", "fileCount": 7, - "integrity": "sha512-abVRJmxRjeoti4i5luV56PZ2T73gJOO7Y1puy/SsXpF5sid0PXbqBkbX4jQMLtdy2Ho4MftJ71v1vCXYrhb9Ww==", + "integrity": "sha512-8AgGrM8qxsA5B8KU/MvVND/fMUsF3vZQxeYjz+1Z/rGx/ZmNr0iqjfmUVKVASKN7P9OzkAUHoXgKEpyvgRfUkA==", "signatures": [ { - "sig": "MEUCIG/2MF1JFbSrDZ01kmap+626aLOoNlEX+kKpoRnj7xrHAiEAtaq9lRUfO7Rg56cvoBUUJasKPlnfKwEWbdmhpwYFecY=", + "sig": "MEUCIQCUYnw+HZRCwlArNXBeCh6NfOsVa383v1cJOpeqx5WsRwIgVlGIQclcGcQ//I6MWip9B4SgvmxQXhQGQCJ5gDqXFOk=", "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U" }, { - "sig": "MEYCIQDOM8DZvrMf0FmjkCXl9WbeQpmh4lcpLqxsKQwmWh4bFwIhAPNGsdytMpcFrn+pDBFV1QLZWLdGYjLpML8NJJV03QQk", + "sig": "MEUCIQDh9h+q+hrRNRbypDcHcw7z7+MIJ2BHi2ATluSNnJGxEAIgJw+x3HiF3kbW39Tx+3DYOUgS7zTORVJV4BoGbistm1E=", "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U" } ], @@ -24,7 +24,7 @@ }, "name": "@anthropic-ai/claude-code", "type": "module", - "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.237.tgz", + "_from": "file:staged-npm/anthropic-ai-claude-code-2.1.238.tgz", "author": { "name": "Anthropic", "email": "support@anthropic.com" @@ -42,8 +42,8 @@ "email": "wolffiex@anthropic.com" }, "homepage": "https://github.com/anthropics/claude-code", - "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.237.tgz", - "_integrity": "sha512-abVRJmxRjeoti4i5luV56PZ2T73gJOO7Y1puy/SsXpF5sid0PXbqBkbX4jQMLtdy2Ho4MftJ71v1vCXYrhb9Ww==", + "_resolved": "/home/runner/work/claude-cli-internal/claude-cli-internal/staged-npm/anthropic-ai-claude-code-2.1.238.tgz", + "_integrity": "sha512-8AgGrM8qxsA5B8KU/MvVND/fMUsF3vZQxeYjz+1Z/rGx/ZmNr0iqjfmUVKVASKN7P9OzkAUHoXgKEpyvgRfUkA==", "_npmVersion": "11.17.0", "description": "Use Claude, Anthropic's AI assistant, right from your terminal. Claude can understand your codebase, edit files, run terminal commands, and handle entire workflows for you.", "directories": {}, @@ -106,19 +106,19 @@ "_hasShrinkwrap": false, "readmeFilename": "README.md", "optionalDependencies": { - "@anthropic-ai/claude-code-linux-x64": "2.1.237", - "@anthropic-ai/claude-code-win32-x64": "2.1.237", - "@anthropic-ai/claude-code-darwin-x64": "2.1.237", - "@anthropic-ai/claude-code-linux-arm64": "2.1.237", - "@anthropic-ai/claude-code-win32-arm64": "2.1.237", - "@anthropic-ai/claude-code-darwin-arm64": "2.1.237", - "@anthropic-ai/claude-code-linux-x64-musl": "2.1.237", - "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.237" + "@anthropic-ai/claude-code-linux-x64": "2.1.238", + "@anthropic-ai/claude-code-win32-x64": "2.1.238", + "@anthropic-ai/claude-code-darwin-x64": "2.1.238", + "@anthropic-ai/claude-code-linux-arm64": "2.1.238", + "@anthropic-ai/claude-code-win32-arm64": "2.1.238", + "@anthropic-ai/claude-code-darwin-arm64": "2.1.238", + "@anthropic-ai/claude-code-linux-x64-musl": "2.1.238", + "@anthropic-ai/claude-code-linux-arm64-musl": "2.1.238" }, "_npmOperationalInternal": { - "tmp": "tmp/claude-code_2.1.237_1787183874722_0.6222272370003468", + "tmp": "tmp/claude-code_2.1.238_1787248914597_0.7384895031343544", "host": "s3://npm-registry-packages-npm-production" }, - "_id": "@anthropic-ai/claude-code@2.1.237", - "version": "2.1.237" + "_id": "@anthropic-ai/claude-code@2.1.238", + "version": "2.1.238" } \ No newline at end of file diff --git a/content/en/about-claude/models/migration-guide.md b/content/en/about-claude/models/migration-guide.md index e7a59959cc..d0dad5ed73 100644 --- a/content/en/about-claude/models/migration-guide.md +++ b/content/en/about-claude/models/migration-guide.md @@ -794,7 +794,7 @@ These are not required but will improve your experience: ### Migrating to Claude Opus 5 from Claude Opus 4.7 -Claude Opus 5 should have strong out-of-the-box performance on existing Claude Opus 4.7 prompts and evals, at the same pricing of $5 per million input tokens and $25 per million output tokens. It supports the same set of features as Claude Opus 4.7, including the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), [128k max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview), [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), with two exceptions: [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) is not available on Claude Opus 5, and [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not supported on Claude Opus 5. It also adds [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) and publicly documents [refusal stop details](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response). +Claude Opus 5 should have strong out-of-the-box performance on existing Claude Opus 4.7 prompts and evals, at the same pricing of $5 per million input tokens and $25 per million output tokens. It supports the same set of features as Claude Opus 4.7, including the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), [128k max output tokens](https://platform.claude.com/docs/en/about-claude/models/overview), [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview), with two exceptions: [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) is not available on Claude Opus 5, and [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not supported on Claude Opus 5. It also adds [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) and publicly documents [refusal stop details](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response). On the Claude API, Claude Opus 5 also supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) as the generally available `computer_toolset_20260801` toolset and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for tasks inside webpages, neither of which Claude Opus 4.7 supports; existing integrations on the earlier `computer_20251124` version continue to work unchanged on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). If your code is on Claude Opus 4.6 or earlier, use [Migrating to Claude Opus 5 from Claude Opus 4.6 and earlier Opus models](https://platform.claude.com/docs/en/about-claude/models/migration-guide#migrating-from-claude-opus-46) instead. That section includes breaking changes (sampling parameters rejected, manual extended thinking rejected, new tokenizer) that the upgrade from Claude Opus 4.7 alone does not cover. @@ -915,7 +915,7 @@ Claude Opus 5 should have strong out-of-the-box performance on existing Claude O * [Vision](https://platform.claude.com/docs/en/build-with-claude/vision) * Server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) ([bash](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool), [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), [text editor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool), [web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool), [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector), [memory](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool)) -Two exceptions: [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) is not available on Claude Opus 5, and [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not supported on Claude Opus 5. +Two exceptions: [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) is not available on Claude Opus 5, and [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not supported on Claude Opus 5. On the Claude API, Claude Opus 5 also supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) as the generally available `computer_toolset_20260801` toolset and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for tasks inside webpages, neither of which Claude Opus 4.6 or earlier Opus models support; existing integrations on the earlier `computer_20251124` version continue to work unchanged on Claude Opus 5. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). #### Update your model name @@ -1315,7 +1315,7 @@ Claude Opus 4.7 introduced several behavioral differences from Claude Opus 4.6 t To increase tool usage, raise the effort setting. `high` or `xhigh` effort settings show substantially more tool usage in agentic search and coding. You can also adjust your prompt to explicitly instruct the model about when and how to properly use its tools. -8. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) to request reduced restrictions. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +8. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) to request reduced restrictions. The application route depends on how you access Claude. 9. **High-resolution image support:** Claude Opus 4.7 is the first Claude model with high-resolution image support. Maximum image resolution is 2,576 pixels on the long edge, up from 1,568 pixels on prior models. This unlocks gains on vision-heavy workloads and is particularly valuable for computer use, screenshot understanding, and document analysis. @@ -1447,7 +1447,7 @@ These are not required but will improve your experience: * If you use [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool), plan an alternative: it is not available on Claude Opus 5. * If your organization has a [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) commitment, note that Priority Tier is not supported on Claude Opus 5. * Remove verification and self-check instructions carried over from prompts tuned for earlier models; they cause over-verification on Claude Opus 5. -* If your product does legitimate security work, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) for access to lower restrictions on cyber content. +* If your product does legitimate security work, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for access to lower restrictions on cyber content. #### Migrating from Claude Opus 4.5 or earlier @@ -2044,7 +2044,7 @@ model = "claude-opus-5" # After Claude Sonnet 5 offers the best combination of speed and intelligence in the Claude model family. It builds on Claude Sonnet 4.6. -Claude Sonnet 5 is a drop-in upgrade for Claude Sonnet 4.6, priced at $2/$10 USD per million input/output tokens; see [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) for details. There are two breaking API changes for code already running on Claude Sonnet 4.6: manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) and sampling parameters (`temperature`, `top_p`, `top_k`) set to non-default values are no longer accepted and return a 400 error. Use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) instead. Claude Sonnet 5 supports the same set of features as Claude Sonnet 4.6, including the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not available on Claude Sonnet 5. Claude Sonnet 5 also uses a new tokenizer. +Claude Sonnet 5 is a drop-in upgrade for Claude Sonnet 4.6, priced at $2/$10 USD per million input/output tokens; see [Pricing](https://platform.claude.com/docs/en/about-claude/pricing) for details. There are two breaking API changes for code already running on Claude Sonnet 4.6: manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) and sampling parameters (`temperature`, `top_p`, `top_k`) set to non-default values are no longer accepted and return a 400 error. Use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) with the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) instead. Claude Sonnet 5 supports the same set of features as Claude Sonnet 4.6, including the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows), [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), [batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Files API](https://platform.claude.com/docs/en/build-with-claude/files), [PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support), [vision](https://platform.claude.com/docs/en/build-with-claude/vision), and the full set of server-side and client-side [tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). On the Claude API, Claude Sonnet 5 also supports [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) as the generally available `computer_toolset_20260801` toolset and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for tasks inside webpages, neither of which Claude Sonnet 4.6 supports; existing integrations on the earlier `computer_20251124` version continue to work unchanged on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) is not available on Claude Sonnet 5. Claude Sonnet 5 also uses a new tokenizer. ### Migrating to Claude Sonnet 5 from Claude Sonnet 4.6 @@ -2569,7 +2569,7 @@ Items 4 and 5 in the following list are breaking changes. `max_tokens` remains a 5. **Sampling parameters removed:** Sampling parameters (`temperature`, `top_p`, `top_k`) set to a non-default value are not accepted and return a 400 error. -6. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +6. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. #### Migration checklist @@ -2673,7 +2673,7 @@ model = "claude-sonnet-5" # After 5. **Pricing:** Claude Haiku 4.5 is priced at $1/$5 per million input/output tokens. Claude Sonnet 5 is priced at $2/$10 per million input/output tokens. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing). -6. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +6. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. #### Migration checklist diff --git a/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md b/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md index e8062bf4ab..38691fcb5b 100644 --- a/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md +++ b/content/en/about-claude/models/optimizing-for-cost-and-intelligence.md @@ -51,7 +51,7 @@ Setup takes little work. [Automatic caching](https://platform.claude.com/docs/en ```text wrap $ claude -> add prompt caching to this integration +> /claude-api add prompt caching to this integration Done. Prompt caching is now wired into the harness. Two changes: @@ -201,7 +201,7 @@ A generous budget gave up about 2.7 points of pass rate for an 18% cost saving, Three controls do three different jobs. A task budget saves money, because the model sees it. `max_tokens` is a safety cap that saves nothing. On Claude Managed Agents, a session budget is the hard dollar stop behind both. Set all three: a task budget, a high `max_tokens`, and a session cap for the run you never want on a bill, with a [workspace spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-lower-limits-for-workspaces) as the final backstop. * **Task budgets** are in beta (beta header `task-budgets-2026-03-13`) on Claude Opus 5, Claude Fable 5, Claude Opus 4.8, and Claude Opus 4.7, but not Claude Sonnet 5; check the [support table](https://platform.claude.com/docs/en/build-with-claude/task-budgets#feature-support) first. Start near your loop's 90th-percentile token usage, then tighten ([Choosing a budget](https://platform.claude.com/docs/en/build-with-claude/task-budgets#choosing-a-budget) shows how to collect that distribution). Budgets below the current 20,000-token floor are rejected, and very tight budgets can produce refusal-like behavior. Set the budget once, on the first request, because a mid-task change [invalidates the cache](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#cache-repeated-context). The budget is advisory, steering the model rather than stopping it, so verify adherence on your workload. -* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 33.3% (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see. +* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 36.6% on the problems both runs scored (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see. * **Session budgets on Claude Managed Agents** are the hard stop. A [session budget](https://platform.claude.com/docs/en/managed-agents/budgets) is a dollar cap on one session at list rates for tokens, searches, and session time. At the cap, the session pauses with `stop_reason: budget_reached`; raising the budget resumes it. It is platform-enforced, works on any model with a list price (including Claude Sonnet 5), and combines with the advisory task budget. Deployments apply the same field to every run. The first of two `max_tokens` charts plots cost per attempt and per solved task at each cap: @@ -269,7 +269,7 @@ To build one, use [multiagent orchestration](https://platform.claude.com/docs/en ![Diagram of the orchestrator strategy: a Claude Fable 5 orchestrator fans subtasks out to three Claude Sonnet 5 workers](https://platform.claude.com/docs/images/model-routing-orchestrator-strategy.png) -This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) later in this section, an episode took 1.9 hours with the coordinator compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time. +This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), an episode took a little over 2 hours with the coordinator running the platform's documented limit of 25 concurrent workers, compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time. **Case 1: insurance against the cost tail on routine work.** A frontier model running alone occasionally spirals on a routine problem it would normally solve. Because you cannot tell in advance which those will be, a few such runs dominate the bill. A coordinator that hands routine work to a lower-cost worker caps that tail, because any spiraling now happens at worker rates. @@ -281,11 +281,11 @@ Delegation paid on the routine, normally solvable share of the work, the opposit **Case 2: work larger than one context window.** A solo model must work through an input that large serially, one context window at a time, paying to re-read its own state on every pass. Workers each read their own partition, in parallel and at worker rates. Reading-heavy work that still fits in one context window is a model-choice problem, not a delegation problem: on reading cost alone, the orchestrator comes out ahead only when no single context can hold the work. -Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost 55% less than any of those settings and scored 3 to 7 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright: +Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost more than 60% less than any of those settings and scored 2 to 6 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright: -![Chart, corpus benchmark: the coordinator costs 55% less than Fable solo at every effort setting, 3 to 7 points below its best](https://platform.claude.com/docs/images/cost-intel-corpus-pareto.png) +![Chart, corpus benchmark: the coordinator costs over 60% less than Fable solo at every effort setting, 2 to 6 points below its best](https://platform.claude.com/docs/images/cost-intel-corpus-pareto.png) -The token accounting shows why. The coordinator configuration read more than the solo model (32 million input tokens compared with 14.5 million) and still cost less, because partitioned reading at worker rates is cheaper than repeated re-reading at frontier rates. Fable 5 at default effort still holds peak accuracy, at 2.3 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it. +The token accounting shows why. Both bills are mostly corpus reading served from the cache: the coordinator configuration read about 570 million cached tokens per episode, nearly three times the solo model's roughly 200 million, and still cost less than half as much, because its reads were billed at Claude Sonnet 5's cache-read rate rather than Claude Fable 5's. Fable 5 at default effort still holds peak accuracy, at 2.8 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it. **When delegation doesn't pay.** An orchestrator buys something only when there is bulk to hand off: many independent pieces, ideally too many for one context window. When the work is one dependent chain, or fits in a single context, the orchestrator pays for a plan, a handoff, and a merge that a single model gets for free. In every such case measured, the coordinator's model alone at lower effort came out ahead. @@ -538,9 +538,9 @@ The following table lists the levers in the order to try them: | Lower effort | Knowledge work: `medium` 15% to 30%, `low` a third to a half; long coding: `medium` about half, `low` about three quarters | 1 to 3 points on knowledge work, 2 to 8 on long coding | Faster | [Tune effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#tune-effort) | | Re-run failures | About half, at the same pass rate | None | Two runs on the tasks that fail | [Re-run failures at higher effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#re-run-failures-at-higher-effort) | | Task budget | 18% to 47% | 3 to 4 points | Faster | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | -| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 21 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | +| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 18 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) | | Advisor | Depends on the capability gap and the consult rate; the chart-reading pairing scored above both models' effort curves, the coding pairing only marginally | Small gains | About two extra calls per task | [Advisor strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#advisor-strategy-escalate-hard-decisions) | -| Orchestrator | 55% below the frontier model beyond one context window; about half on routine tails | 3 to 7 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) | +| Orchestrator | More than 60% below the frontier model beyond one context window; about half on routine tails | 2 to 6 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) | ## Benchmarks referenced @@ -553,7 +553,7 @@ All measurements are Anthropic-internal runs of these benchmarks. Unless noted, 5. **Agent-architecture scaling:** Kim et al., "Towards a Science of Scaling Agent Systems," arXiv.08296, 2025. Independent external study, cited only for the direction of the finding on when delegation does not pay, not for any figure. 6. **DeepWideSearch:** "DeepWideSearch: Benchmarking Depth and Width in Agentic Information Seeking," arXiv.20168, 2025. The 220 questions span 15 domains, each combining many-row collection with multi-hop retrieval; measured on the benchmark's standing row set, 3 runs per configuration. 7. **DeepResearch Bench II:** Li et al., "DeepResearch Bench II: Diagnosing Deep Research Agents via Rubrics from Expert Report," arXiv.08536, 2026. Its 132 research tasks across 22 domains are graded against expert-derived binary rubrics; measured on a 50-task subset stratified across all themes, one attempt per task, 3 runs, scored on tasks no configuration refused. Claude Opus 4.6 judges under the benchmark's rubric protocol; the original uses a different judge, and an Anthropic judge may favor the house style. The runs predate Claude Opus 5, hence its absence from the [Compare models](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#compare-models-on-cost-per-task) chart. The Sonnet 5 cost differs slightly between the caching chart (inference cost, with and without caching) and that chart (all-in cost, caching on); both come from the same runs. -8. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. The charted team configuration ran its workers on Claude Managed Agents: each of six waves was one session in which the Claude Fable 5 lead ran 40 Claude Sonnet 5 worker threads, the platform's limit at the time (the current default is lower), with a small external driver sequencing the waves and carrying the findings between them. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like. +8. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. Every configuration ran on Claude Managed Agents. The charted team configuration is an August 2026 run in which the Claude Fable 5 coordinator ran the whole sweep inside the platform at its documented limit of 25 concurrent Claude Sonnet 5 workers; its three episodes scored F1 0.842, 0.805, and 0.810 for $263, $299, and $261. The solo configurations are July 2026 runs on the same corpus build. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like. 9. **GPQA Diamond:** Rein et al., "GPQA: A Graduate-Level Google-Proof Q\&A Benchmark," 2023. The 198-question Diamond subset, measured August 2026, two runs per configuration, model-graded against reference answers, advisor tokens metered per request. A platform safety check refused two biology questions on the Sonnet and Opus executors; excluding them changes no comparison by more than one point. 10. **DeepSWE:** Datacurve, "DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks," arXiv.07946, 2026. Measured August 2026: 113 original tasks across five languages with program-based verifiers. Pairings are two runs each with advisor tokens metered per request, and used a client-side advisor loop rather than the advisor tool, with identical accounting. Single-model effort sweeps are single runs priced from token counts, a cache-aware approximation. Costs per task are run totals divided by 113. 11. **Internal agentic-coding benchmark:** Anthropic-internal: 370 repository tasks graded by the repositories' own tests. The API figures (Opus 5 alone, Fable 5 alone, and the pairing) were measured August 2026 at the default effort with a 128,000-token output cap, one run per configuration: five attempts per task at the default settings and for the pairing, one at `low` and `medium`; the pairing averaged about two advisor consultations per attempt; costs are per attempt. The Claude Code figures are July 2026 runs of the same tasks, one run per configuration, costs approximate. @@ -588,6 +588,10 @@ All measurements are Anthropic-internal runs of these benchmarks. Unless noted, See current per-token pricing for every Claude model. + + Apply these levers one at a time to a working agent in a runnable notebook, with cost per task after each step. + + Watch a walkthrough of Claude Fable 5 and the advisor and orchestrator patterns. diff --git a/content/en/about-claude/models/whats-new-sonnet-5.md b/content/en/about-claude/models/whats-new-sonnet-5.md index 94acb8441e..6511856803 100644 --- a/content/en/about-claude/models/whats-new-sonnet-5.md +++ b/content/en/about-claude/models/whats-new-sonnet-5.md @@ -12,7 +12,7 @@ Claude Sonnet 5 is the next generation of Anthropic's Sonnet model family. It is | --------------- | ----------------- | ---------------------------------------------- | | Claude Sonnet 5 | `claude-sonnet-5` | The best combination of speed and intelligence | -Claude Sonnet 5 supports the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. +Claude Sonnet 5 supports the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. On the Claude API, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) and the generally available `computer_toolset_20260801` version of the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), neither of which Claude Sonnet 4.6 supports; the earlier `computer_20251124` version is still accepted on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). For complete pricing and specs, see the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview). @@ -121,7 +121,7 @@ The largest gains over Claude Sonnet 4.6 are in coding and agentic tasks. For be ## Cybersecurity safeguards -Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background. +Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program. ## Pricing diff --git a/content/en/about-claude/pricing.md b/content/en/about-claude/pricing.md index 8eaefb80f8..44df92de8a 100644 --- a/content/en/about-claude/pricing.md +++ b/content/en/about-claude/pricing.md @@ -355,23 +355,37 @@ Example token usage for typical content: Computer use follows the standard [tool use pricing](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview#pricing). When using the computer use tool: -**System prompt overhead:** The computer use beta adds 466–499 tokens to the system prompt +**Toolset definition overhead:** Declaring `computer_toolset_20260801` with its default members adds about 4,500 input tokens to a request (about 4,520 on Claude Fable 5, Claude Mythos 5, Claude Opus 5, and Claude Opus 4.8, and about 4,590 on Claude Sonnet 5), which covers the member tool definitions and the tool use system prompt. Disabling `zoom` with `configs` removes about 410 of those tokens. The exact count for a request is reported in the response `usage`, and you can estimate it in advance with the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting). -**Computer use tool token usage:** +**Earlier tool versions:** The following figures apply to the `computer_20251124` and `computer_20250124` tool versions, not to `computer_toolset_20260801`: -| Model | Input tokens per tool definition | -| ----------------- | -------------------------------- | -| Claude 4.x models | 735 tokens | +* System prompt overhead: 466–499 tokens added to the system prompt +* Tool definition: about 735 input tokens per tool definition (measured with `computer_20250124`) **Additional token consumption:** -* Screenshot images (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision)) +* Screenshot and zoom images returned in tool results, billed as image input (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)) * Tool execution results returned to Claude If you're also using bash or text editor tools alongside computer use, those tools have their own token costs as documented in their respective pages. +#### Browser use tool + +Browser use follows the standard [tool use pricing](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview#pricing). When using the browser use tool: + +**Toolset definition overhead:** Declaring `browser_toolset_20260801` with its default members adds about 6,600 input tokens to a request (about 6,610 on Claude Fable 5, Claude Mythos 5, Claude Opus 5, and Claude Opus 4.8, and about 6,670 on Claude Sonnet 5), which covers the member tool definitions and the tool use system prompt. Enabling all four optional members adds about 880 tokens, and disabling members with `configs` reduces the count. The exact count for a request is reported in the response `usage`, and you can estimate it in advance with the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting). + +**Additional token consumption:** + +* Screenshot and zoom images returned in tool results, billed as image input (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)) +* Text tool results returned to Claude, such as accessibility trees, page text, and console or network entries + + + If you also use the computer use tool, bash tool, text editor tool, or your own tools alongside browser use, those tools have their own token costs as documented on their respective pages. + + ## Claude Managed Agents pricing [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) is billed on two dimensions: tokens and session runtime. diff --git a/content/en/agents-and-tools/agent-skills/overview.md b/content/en/agents-and-tools/agent-skills/overview.md index b430f22668..6446b4fddf 100644 --- a/content/en/agents-and-tools/agent-skills/overview.md +++ b/content/en/agents-and-tools/agent-skills/overview.md @@ -149,7 +149,7 @@ Skills are available across Claude's agent products: The Claude API supports both pre-built Agent Skills and custom Skills. Both work identically: specify the relevant `skill_id` in the `container` parameter along with the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool). -**Prerequisites:** Using Skills through the API requires the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool), whose container Skills run in. On the Claude API, neither the Skills API nor the `container.skills` parameter requires a beta header, and requests that still send `skills-2025-10-02` continue to work. +**Prerequisites:** Using Skills through the API requires the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool), whose container Skills run in. Use pre-built Agent Skills by referencing their `skill_id` (`pptx`, `xlsx`, `docx`, or `pdf`), or create and upload your own through the Skills API (`/v1/skills` endpoints). Custom Skills are shared workspace-wide: all workspace members can access them. diff --git a/content/en/agents-and-tools/agent-skills/quickstart.md b/content/en/agents-and-tools/agent-skills/quickstart.md index 54f9b33f76..102399a877 100644 --- a/content/en/agents-and-tools/agent-skills/quickstart.md +++ b/content/en/agents-and-tools/agent-skills/quickstart.md @@ -34,46 +34,44 @@ First, check what Skills are available. Use the Skills API to list all Anthropic # List Anthropic-managed Skills curl --fail-with-body -sS "https://api.anthropic.com/v1/skills?source=anthropic" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" | - jq -r '.data[] | "\(.id): \(.display_title)"' + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # List Anthropic-managed Skills - ant beta:skills list --source anthropic + ant skills list --source anthropic ``` ```python Python # List Anthropic-managed Skills - skills = client.beta.skills.list(source="anthropic") + skills = client.skills.list(source="anthropic") for skill in skills.data: - print(f"{skill.id}: {skill.display_title}") + print(f"{skill.id}: {skill.display_name}") ``` ```typescript TypeScript // List Anthropic-managed Skills - const skills = await client.beta.skills.list({ source: "anthropic" }); + const skills = await client.skills.list({ source: "anthropic" }); for (const skill of skills.data) { - console.log(`${skill.id}: ${skill.display_title}`); + console.log(`${skill.id}: ${skill.display_name}`); } ``` ```csharp C# // List Anthropic-managed Skills - var skills = await client.Beta.Skills.List(new SkillListParams { Source = "anthropic" }); + var skills = await client.Skills.List(new SkillListParams { Source = "anthropic" }); foreach (var skill in skills.Items) { - Console.WriteLine($"{skill.ID}: {skill.DisplayTitle}"); + Console.WriteLine($"{skill.ID}: {skill.DisplayName}"); } ``` ```go Go // List Anthropic-managed Skills - skills, err := client.Beta.Skills.List(ctx, anthropic.BetaSkillListParams{ + skills, err := client.Skills.List(ctx, anthropic.SkillListParams{ Source: anthropic.String("anthropic"), }) if err != nil { @@ -81,22 +79,23 @@ First, check what Skills are available. Use the Skills API to list all Anthropic } for _, skill := range skills.Data { - fmt.Printf("%s: %s\n", skill.ID, skill.DisplayTitle) + fmt.Printf("%s: %s\n", skill.ID, skill.DisplayName) } ``` ```java Java // List Anthropic-managed Skills - SkillListPage skills = client.beta().skills().list( + SkillListPage skills = client.skills().list( SkillListParams.builder().source("anthropic").build() ); - for (SkillListResponse skill : skills.data()) { - IO.println(skill.id() + ": " + skill.displayTitle().orElse("")); + for (Skill skill : skills.data()) { + IO.println(skill.id() + ": " + skill.displayName()); } ``` ```php PHP + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. // List Anthropic-managed Skills $skills = $client->beta->skills->list(source: 'anthropic'); @@ -107,10 +106,10 @@ First, check what Skills are available. Use the Skills API to list all Anthropic ```ruby Ruby # List Anthropic-managed Skills - skills = client.beta.skills.list(source: "anthropic") + skills = client.skills.list(source: "anthropic") skills.data.each do |skill| - puts "#{skill.id}: #{skill.display_title}" + puts "#{skill.id}: #{skill.display_name}" end ``` @@ -131,7 +130,6 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d @- <<'EOF' { "model": "claude-opus-5", @@ -146,13 +144,11 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif } EOF ) - jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response" ``` ```bash CLI # Create a message with the PowerPoint Skill - response=$(ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' + response=$(ant messages create --format json <<'YAML' model: claude-opus-5 max_tokens: 16000 container: @@ -168,16 +164,13 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif name: code_execution YAML ) - - jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response" ``` ```python Python # Create a message with the PowerPoint Skill - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}] }, @@ -195,10 +188,9 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ```typescript TypeScript // Create a message with the PowerPoint Skill - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "pptx", version: "latest" }], }, @@ -218,18 +210,17 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ```csharp C# // Create a message with the PowerPoint Skill - var response = await client.Beta.Messages.Create(new MessageCreateParams + var response = await client.Messages.Create(new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, @@ -237,13 +228,13 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif }, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Create a presentation about renewable energy with 5 slides", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], }); Console.WriteLine($"stop_reason={response.StopReason?.Raw()}, blocks={response.Content.Count}"); @@ -251,30 +242,27 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ```go Go // Create a message with the PowerPoint Skill - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaTextBlock("Create a presentation about renewable energy with 5 slides"), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewTextBlock("Create a presentation about renewable energy with 5 slides"), ), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}}, }, }) if err != nil { @@ -286,16 +274,15 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ```java Java // Create a message with the PowerPoint Skill - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build() @@ -303,7 +290,7 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif .build() ) .addUserMessage("Create a presentation about renewable energy with 5 slides") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() ); @@ -314,6 +301,7 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. // Create a message with the PowerPoint Skill $response = $client->beta->messages->create( model: 'claude-opus-5', @@ -336,10 +324,9 @@ Use the PowerPoint Skill to create a presentation about renewable energy. Specif ```ruby Ruby # Create a message with the PowerPoint Skill - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "pptx", version: "latest"}] }, @@ -366,9 +353,7 @@ The request includes the following parts: * **`tools`:** Enables code execution (required for Skills) - Skills are generally available on the Claude API and don't require a beta header. The examples on this page still send the `skills-2025-10-02` beta header and use the SDKs' `beta` namespace. Both remain valid, so you can run the examples as written and omit the header in your own requests. - - The examples use the `code_execution_20260521` tool version, and the Step 3 code parses the result types that current tool versions return. Skills also work with older [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) versions such as `code_execution_20250825`: any current code execution tool version satisfies the Skills requirement without a beta header. If you use a different version, use the tool `type` listed on the code execution tool page. + The examples use the `code_execution_20260521` tool version, and the Step 3 code parses the result types that current tool versions return. Skills also work with older [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) versions such as `code_execution_20250825`: any current code execution tool version satisfies the Skills requirement. If you use a different version, use the tool `type` listed on the code execution tool page. When you make this request, Claude automatically matches your task to the relevant Skill. Because you asked for a presentation, Claude determines the PowerPoint Skill is relevant and loads its full instructions: the second level of progressive disclosure. Then Claude runs the Skill's code to create your presentation. @@ -398,7 +383,6 @@ The presentation was created in the code execution container and saved as a file curl --fail-with-body -sS "https://api.anthropic.com/v1/files/$file_id/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -o "$output_path" echo "Presentation saved to $output_path" fi @@ -421,7 +405,7 @@ The presentation was created in the code execution container and saved as a file if [[ -n "$file_id" ]]; then # Download the file and save it output_path="${TMPDIR:-/tmp}/renewable_energy.pptx" - ant beta:files download --file-id "$file_id" --output "$output_path" + ant files download --file-id "$file_id" --output "$output_path" echo "Presentation saved to $output_path" fi ``` @@ -440,7 +424,7 @@ The presentation was created in the code execution container and saved as a file if file_id: # Download the file and save it output_path = Path(tempfile.gettempdir()) / "renewable_energy.pptx" - file_content = client.beta.files.download(file_id=file_id) + file_content = client.files.download(file_id=file_id) file_content.write_to_file(output_path) print(f"Presentation saved to {output_path}") ``` @@ -464,7 +448,7 @@ The presentation was created in the code execution container and saved as a file if (fileId) { // Download the file and save it const outputPath = path.join(os.tmpdir(), "renewable_energy.pptx"); - const fileContent = await client.beta.files.download(fileId); + const fileContent = await client.files.download(fileId); await fs.writeFile(outputPath, Buffer.from(await fileContent.arrayBuffer())); console.log(`Presentation saved to ${outputPath}`); } @@ -478,7 +462,7 @@ The presentation was created in the code execution container and saved as a file foreach (var block in response.Content) { if (block.TryPickBashCodeExecutionToolResult(out var bashResult) - && bashResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var bashResultBlock)) + && bashResult.Content.TryPickBashCodeExecutionResultBlock(out var bashResultBlock)) { foreach (var output in bashResultBlock.Content) { @@ -491,7 +475,7 @@ The presentation was created in the code execution container and saved as a file { // Download the file and save it var outputPath = Path.Combine(Path.GetTempPath(), "renewable_energy.pptx"); - using var download = await client.Beta.Files.Download(fileId); + using var download = await client.Files.Download(fileId); await using var source = await download.ReadAsStream(); await using var destination = File.Create(outputPath); await source.CopyToAsync(destination); @@ -506,7 +490,7 @@ The presentation was created in the code execution container and saved as a file var fileID string for _, block := range response.Content { switch result := block.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: if result.Content.Type == "bash_code_execution_result" { for _, output := range result.Content.Content { fileID = output.FileID @@ -518,7 +502,7 @@ The presentation was created in the code execution container and saved as a file if fileID != "" { // Download the file and save it outputPath := filepath.Join(os.TempDir(), "renewable_energy.pptx") - fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(ctx, fileID) if err != nil { panic(err) } @@ -540,11 +524,11 @@ The presentation was created in the code execution container and saved as a file // its Bash sub-tool, and generated files appear as bash_code_execution_output // items inside the bash_code_execution_tool_result block. String fileId = null; - for (BetaContentBlock block : response.content()) { + for (ContentBlock block : response.content()) { if (block.isBashCodeExecutionToolResult()) { var content = block.asBashCodeExecutionToolResult().content(); - if (content.isBetaBashCodeExecutionResultBlock()) { - for (var output : content.asBetaBashCodeExecutionResultBlock().content()) { + if (content.isBashCodeExecutionResultBlock()) { + for (var output : content.asBashCodeExecutionResultBlock().content()) { fileId = output.fileId(); } } @@ -554,7 +538,7 @@ The presentation was created in the code execution container and saved as a file if (fileId != null) { // Download the file and save it Path outputPath = Files.createTempFile("renewable_energy", ".pptx"); - try (HttpResponse fileContent = client.beta().files().download(fileId)) { + try (HttpResponse fileContent = client.files().download(fileId)) { Files.copy(fileContent.body(), outputPath, StandardCopyOption.REPLACE_EXISTING); } IO.println("Presentation saved to " + outputPath); @@ -562,6 +546,7 @@ The presentation was created in the code execution container and saved as a file ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. // Extract the file ID. The code execution tool runs the Skill's code through // its Bash sub-tool, and generated files appear as bash_code_execution_output // items inside the bash_code_execution_tool_result block. @@ -604,7 +589,7 @@ The presentation was created in the code execution container and saved as a file if file_id # Download the file and save it output_path = File.join(Dir.tmpdir, "renewable_energy.pptx") - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) File.binwrite(output_path, file_content.read) puts "Presentation saved to #{output_path}" end @@ -627,7 +612,6 @@ Try these variations: -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000, @@ -638,12 +622,11 @@ Try these variations: {"role": "user", "content": "Create a quarterly sales tracking spreadsheet with sample data"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container: @@ -661,10 +644,9 @@ Try these variations: ``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] }, @@ -679,10 +661,9 @@ Try these variations: ``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] }, @@ -697,19 +678,18 @@ Try these variations: ``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, @@ -717,41 +697,38 @@ Try these variations: }, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Create a quarterly sales tracking spreadsheet with sample data", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a quarterly sales tracking spreadsheet with sample data")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a quarterly sales tracking spreadsheet with sample data")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, }) @@ -761,15 +738,14 @@ Try these variations: ``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("xlsx") .version("latest") @@ -778,13 +754,14 @@ Try these variations: .build() ) .addUserMessage("Create a quarterly sales tracking spreadsheet with sample data") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() ); ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $response = $client->beta->messages->create( model: 'claude-opus-5', maxTokens: 16000, @@ -805,10 +782,9 @@ Try these variations: ``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "xlsx", version: "latest"}] }, @@ -831,7 +807,6 @@ Try these variations: -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000, @@ -842,12 +817,11 @@ Try these variations: {"role": "user", "content": "Write a 2-page report on the benefits of renewable energy"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container: @@ -865,10 +839,9 @@ Try these variations: ``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "docx", "version": "latest"}] }, @@ -883,10 +856,9 @@ Try these variations: ``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "docx", version: "latest" }] }, @@ -901,19 +873,18 @@ Try these variations: ``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "docx", Version = "latest", }, @@ -921,41 +892,38 @@ Try these variations: }, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Write a 2-page report on the benefits of renewable energy", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "docx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Write a 2-page report on the benefits of renewable energy")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Write a 2-page report on the benefits of renewable energy")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, }) @@ -965,15 +933,14 @@ Try these variations: ``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("docx") .version("latest") @@ -982,13 +949,14 @@ Try these variations: .build() ) .addUserMessage("Write a 2-page report on the benefits of renewable energy") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() ); ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $response = $client->beta->messages->create( model: 'claude-opus-5', maxTokens: 16000, @@ -1009,10 +977,9 @@ Try these variations: ``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "docx", version: "latest"}] }, @@ -1035,7 +1002,6 @@ Try these variations: -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -d '{ "model": "claude-opus-5", "max_tokens": 16000, @@ -1046,12 +1012,11 @@ Try these variations: {"role": "user", "content": "Generate a PDF invoice template"} ], "tools": [{"type": "code_execution_20260521", "name": "code_execution"}] - }' | jq -r '"stop_reason=\(.stop_reason)"' + }' ``` ```bash CLI - ant beta:messages create --format json \ - --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 16000 container: @@ -1069,10 +1034,9 @@ Try these variations: ``` ```python Python - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=16000, - betas=["skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pdf", "version": "latest"}] }, @@ -1087,10 +1051,9 @@ Try these variations: ``` ```typescript TypeScript - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 16000, - betas: ["skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "pdf", version: "latest" }] }, @@ -1105,19 +1068,18 @@ Try these variations: ``` ```csharp C# - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = Model.ClaudeOpus5, MaxTokens = 16000, - Betas = ["skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pdf", Version = "latest", }, @@ -1125,41 +1087,38 @@ Try these variations: }, Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, Content = "Generate a PDF invoice template", }, ], - Tools = [new BetaCodeExecutionTool20260521()], + Tools = [new CodeExecutionTool20260521()], } ); ``` ```go Go - response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 16000, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pdf", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate a PDF invoice template")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Generate a PDF invoice template")), }, - Tools: []anthropic.BetaToolUnionParam{ + Tools: []anthropic.ToolUnionParam{ { - OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}, + OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}, }, }, }) @@ -1169,15 +1128,14 @@ Try these variations: ``` ```java Java - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(CLAUDE_OPUS_5) .maxTokens(16000) - .addBeta(AnthropicBeta.SKILLS_2025_10_02) .container( - BetaContainerParams.builder() + ContainerParams.builder() .addSkill( - BetaSkillParams.builder() + SkillParams.builder() .type(ANTHROPIC) .skillId("pdf") .version("latest") @@ -1186,13 +1144,14 @@ Try these variations: .build() ) .addUserMessage("Generate a PDF invoice template") - .addTool(BetaCodeExecutionTool20260521.builder().build()) + .addTool(CodeExecutionTool20260521.builder().build()) .build() ); ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $response = $client->beta->messages->create( model: 'claude-opus-5', maxTokens: 16000, @@ -1213,10 +1172,9 @@ Try these variations: ``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 16_000, - betas: ["skills-2025-10-02"], container: { skills: [{type: "anthropic", skill_id: "pdf", version: "latest"}] }, @@ -1242,7 +1200,7 @@ Try these variations: Learn how to use Agent Skills to extend Claude's capabilities through the API. - + Upload your own Skills for specialized tasks. diff --git a/content/en/agents-and-tools/mcp-connector.md b/content/en/agents-and-tools/mcp-connector.md index 175ba573df..54865a14ab 100644 --- a/content/en/agents-and-tools/mcp-connector.md +++ b/content/en/agents-and-tools/mcp-connector.md @@ -664,7 +664,7 @@ Install both the Anthropic SDK and the MCP SDK: ```kotlin - implementation("com.anthropic:anthropic-java-mcp:2.53.0") + implementation("com.anthropic:anthropic-java-mcp:2.57.0") ``` @@ -673,7 +673,7 @@ Install both the Anthropic SDK and the MCP SDK: com.anthropic anthropic-java-mcp - 2.53.0 + 2.57.0 ``` @@ -1153,7 +1153,7 @@ Convert MCP resources into content blocks to include in messages, or into file o file_resource = await mcp_client.read_resource( uri="file:///path/to/data.json", ) - uploaded = await client.beta.files.upload( + uploaded = await client.files.upload( file=mcp_resource_to_file(file_resource), ) print(uploaded.id) @@ -1181,7 +1181,7 @@ Convert MCP resources into content blocks to include in messages, or into file o // As a file upload const fileResource = await mcpClient.readResource({ uri: "file:///path/to/data.json" }); - const uploaded = await anthropic.beta.files.upload({ file: mcpResourceToFile(fileResource) }); + const uploaded = await anthropic.files.upload({ file: mcpResourceToFile(fileResource) }); console.log(uploaded.id); ``` @@ -1223,7 +1223,7 @@ Convert MCP resources into content blocks to include in messages, or into file o file.ContentType = new(mediaType); } - var uploaded = await anthropic.Beta.Files.Upload(new FileUploadParams { File = file }); + var uploaded = await anthropic.Files.Upload(new FileUploadParams { File = file }); Console.WriteLine(uploaded.ID); ``` @@ -1269,7 +1269,7 @@ Convert MCP resources into content blocks to include in messages, or into file o if err != nil { log.Fatal(err) } - uploaded, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{File: fileReader}) + uploaded, err := client.Files.Upload(ctx, anthropic.FileUploadParams{File: fileReader}) if err != nil { log.Fatal(err) } @@ -1309,7 +1309,7 @@ Convert MCP resources into content blocks to include in messages, or into file o fileField.contentType(resourceFile.mimeType()); } - var uploaded = anthropic.beta().files().upload(FileUploadParams.builder() + var uploaded = anthropic.files().upload(FileUploadParams.builder() .file(fileField.build()) .build()); @@ -1317,6 +1317,7 @@ Convert MCP resources into content blocks to include in messages, or into file o ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. // As a content block in a message $resource = $mcp->readResource('file:///path/to/doc.txt'); @@ -1365,7 +1366,7 @@ Convert MCP resources into content blocks to include in messages, or into file o # As a file upload file_resource = mcp_client.read_resource(uri: "file:///path/to/data.json") file = Anthropic::Mcp.resource_to_files(file_resource).first - uploaded_file = anthropic.beta.files.upload(file: file) + uploaded_file = anthropic.files.upload(file: file) puts uploaded_file.id ``` diff --git a/content/en/agents-and-tools/tool-use/bash-tool.md b/content/en/agents-and-tools/tool-use/bash-tool.md index 3903237576..905d27d650 100644 --- a/content/en/agents-and-tools/tool-use/bash-tool.md +++ b/content/en/agents-and-tools/tool-use/bash-tool.md @@ -257,7 +257,7 @@ To handle `restart: true`, kill the shell process, start a new one, and return a `bash_20250124` is the current version of the tool, and it requires no beta header. Every model from Claude Sonnet 3.7 ([retired](https://platform.claude.com/docs/en/about-claude/model-deprecations)) onward accepts it, including all current Claude models. -The original `bash_20241022` version is part of the computer use beta, and the October 2024 Claude Sonnet 3.5 release ([retired](https://platform.claude.com/docs/en/about-claude/model-deprecations)) is the only model that accepts it. Requests that use it need the `anthropic-beta: computer-use-2024-10-22` header, and the SDKs expose it only in their beta namespaces. New integrations should use `bash_20250124`. +The original `bash_20241022` version works only with the October 2024 Claude Sonnet 3.5 model ([retired](https://platform.claude.com/docs/en/about-claude/model-deprecations)). Requests that use it need the `anthropic-beta: computer-use-2024-10-22` header, and the SDKs expose it only in their beta namespaces. New integrations should use `bash_20250124`. ## Example: Multistep automation diff --git a/content/en/agents-and-tools/tool-use/browser-use-tool.md b/content/en/agents-and-tools/tool-use/browser-use-tool.md new file mode 100644 index 0000000000..4e4dba07f6 --- /dev/null +++ b/content/en/agents-and-tools/tool-use/browser-use-tool.md @@ -0,0 +1,1570 @@ +--- +title: Browser use tool +url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool +description: Let Claude navigate, read, and interact with webpages in your own browser environment with the browser use tool. +--- + +## Compatibility +- [ZDR](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention): eligible (excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)) +- Supported models: `claude-fable-5`, `claude-mythos-5`, `claude-opus-5`, `claude-sonnet-5`, `claude-opus-4-8` +- Platforms: Claude API; not available on Claude Platform on AWS, Amazon Bedrock, Google Cloud, Microsoft Foundry + +The browser use tool lets Claude navigate, read, and interact with webpages in a browser that your application runs. It works with the page both through its structure (the accessibility tree, elements, forms, and tabs) and through pixels (screenshots and viewport coordinates), whereas the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) works with a whole desktop through screenshots and coordinates alone. It's an Anthropic-defined [client toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets): one `browser_toolset_20260801` entry in your `tools` array gives Claude 27 member tools by default, such as `navigate`, `read_page`, `left_click`, and `screenshot`, plus four more (`javascript_exec`, `file_upload`, `read_console`, and `read_network`) when you [enable them](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#enable-optional-member-tools). Your application runs every call against its own browser automation; nothing runs on Anthropic's side. It isn't currently available in [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/tools). This page says "your application" for the agent loop that calls the Messages API and "your executor" for the part of it that drives the browser and produces tool results. + +Choose browser use over computer use when the task stays inside webpages: Claude can read a page's structure, act on an element by reference in addition to by coordinate, set form values directly, and work across tabs, and you don't need to run a desktop. If Claude only needs to read pages you can point it to, or to find sources on the web, the [web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) and [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) are lighter still, because they're [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) that the API runs for you with no browser to operate. Choose browser use instead when pages build their content with JavaScript or the task means acting on the page rather than only reading it. + +With browser use, Claude reads and acts on live webpages, so everything a page supplies is untrusted input and the actions Claude takes can have real effects. See [Security considerations](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#security-considerations) before you deploy. + +## Quick start + +The browser use tool is generally available on the Claude API with no beta header: add one entry of type `browser_toolset_20260801`, with no `name`, to the `tools` array of a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request. + + + ```bash cURL + curl https://api.anthropic.com/v1/messages \ + -H "content-type: application/json" \ + -H "x-api-key: $ANTHROPIC_API_KEY" \ + -H "anthropic-version: 2023-06-01" \ + -d '{ + "model": "claude-opus-5", + "max_tokens": 2048, + "tools": [ + { + "type": "browser_toolset_20260801" + } + ], + "messages": [ + { + "role": "user", + "content": "Open example.com/docs and tell me how to get started." + } + ] + }' + ``` + + ```bash CLI + ant messages create <<'YAML' + model: claude-opus-5 + max_tokens: 2048 + tools: + - type: browser_toolset_20260801 + messages: + - role: user + content: Open example.com/docs and tell me how to get started. + YAML + ``` + + ```python Python + client = anthropic.Anthropic() + + response = client.messages.create( + model="claude-opus-5", + max_tokens=2048, + tools=[{"type": "browser_toolset_20260801"}], + messages=[ + { + "role": "user", + "content": "Open example.com/docs and tell me how to get started.", + } + ], + ) + print(response) + ``` + + ```typescript TypeScript + const client = new Anthropic(); + + const response = await client.messages.create({ + model: "claude-opus-5", + max_tokens: 2048, + tools: [{ type: "browser_toolset_20260801" }], + messages: [ + { + role: "user", + content: "Open example.com/docs and tell me how to get started." + } + ] + }); + + console.log(response); + ``` + + ```csharp C# + var client = new AnthropicClient(); + + var parameters = new MessageCreateParams + { + Model = Model.ClaudeOpus5, + MaxTokens = 2048, + Tools = [new BrowserToolset20260801()], + Messages = + [ + new MessageParam + { + Role = Role.User, + Content = "Open example.com/docs and tell me how to get started.", + }, + ], + }; + + var response = await client.Messages.Create(parameters); + Console.WriteLine(response); + ``` + + ```go Go + client := anthropic.NewClient() + + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ + Model: anthropic.ModelClaudeOpus5, + MaxTokens: 2048, + Tools: []anthropic.ToolUnionParam{ + {OfBrowserToolset20260801: &anthropic.BrowserToolset20260801Param{}}, + }, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Open example.com/docs and tell me how to get started.")), + }, + }) + if err != nil { + log.Fatal(err) + } + fmt.Println(response.RawJSON()) + ``` + + ```java Java + import com.anthropic.models.messages.BrowserToolset20260801; + // ... + + void main() { + AnthropicClient client = AnthropicOkHttpClient.fromEnv(); + + MessageCreateParams params = MessageCreateParams.builder() + .model(Model.CLAUDE_OPUS_5) + .maxTokens(2048L) + .addTool(BrowserToolset20260801.builder().build()) + .addUserMessage("Open example.com/docs and tell me how to get started.") + .build(); + + Message response = client.messages().create(params); + IO.println(response); + } + ``` + + ```php PHP + $client = new Client(); + + $response = $client->messages->create( + maxTokens: 2048, + messages: [ + ['role' => 'user', 'content' => 'Open example.com/docs and tell me how to get started.'], + ], + model: 'claude-opus-5', + tools: [ + ['type' => 'browser_toolset_20260801'], + ], + ); + + echo $response; + ``` + + ```ruby Ruby + client = Anthropic::Client.new + + response = client.messages.create( + model: "claude-opus-5", + max_tokens: 2048, + tools: [ + { type: "browser_toolset_20260801" } + ], + messages: [ + { + role: "user", + content: "Open example.com/docs and tell me how to get started." + } + ] + ) + + puts response + ``` + + +Claude's first response ends with `stop_reason: "tool_use"` and carries one or more member `tool_use` blocks, each naming a member tool in `name` and carrying `"toolset_name": "browser"`: + +```json Output +{ + "id": "msg_01HCDu4XSTLzTAcodEQ58vDo", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "I'll open the documentation and read the page to find the getting-started instructions." + }, + { + "type": "tool_use", + "id": "toolu_01NRLabsLyVHZPKxbKvkfSMn", + "name": "navigate", + "toolset_name": "browser", + "input": { "url": "https://example.com/docs" } + }, + { + "type": "tool_use", + "id": "toolu_01UvHU5cDyTZ2vXKf5wCkPqR", + "name": "read_page", + "toolset_name": "browser", + "input": { "filter": "interactive" } + } + ], + "stop_reason": "tool_use", + "stop_sequence": null +} +``` + +Your executor runs `navigate`, then `read_page`, and your application returns one `tool_result` per block in its next request, echoing `toolset_name` on each. The `navigate` result reports the tab it loaded in a `browser_state` block; the `read_page` result is text in which every element carries a reference: + +```json +{ + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_01NRLabsLyVHZPKxbKvkfSMn", + "toolset_name": "browser", + "content": [ + { "type": "text", "text": "Navigated to https://example.com/docs" }, + { + "type": "browser_state", + "tabs": [ + { + "tab_id": "tab-1", + "title": "Documentation", + "url": "https://example.com/docs", + "active": true + } + ] + } + ] + }, + { + "type": "tool_result", + "tool_use_id": "toolu_01UvHU5cDyTZ2vXKf5wCkPqR", + "toolset_name": "browser", + "content": [ + { + "type": "text", + "text": "link \"Documentation\" [ref_1]\nlink \"Getting started\" [ref_2]\ntextbox \"Search docs\" [ref_3]\nbutton \"Search\" [ref_4]\nlink \"Pricing\" [ref_5]" + } + ] + } + ] +} +``` + +Claude now holds references it can act on, so its next turn can click `ref_2` to open the getting-started page, with no need to locate the link in a screenshot first. + +## How browser use works + +Browser use runs as an agent loop: Claude returns member tool calls, your executor runs them against the browser, and you return the results until Claude answers in text. + + + + * Add the `browser_toolset_20260801` entry, and optionally other tools, to your API request. + * Include a user prompt that calls for working with webpages, for example, "Open example.com/docs and tell me how to get started." + + + + * Claude returns one or more `tool_use` blocks in a single assistant turn; several in one turn form a batch action, for example, `left_click`, then `type`, then `key`. + * Each block's `name` is the member name, each carries `"toolset_name": "browser"`, and `input` holds only that member's parameters, with no `action` field. The response's `stop_reason` is `tool_use`. + + + + * Iterate every `tool_use` block in `response.content` (don't assume there's exactly one) and run them sequentially, in the order they appear, because later calls usually depend on earlier ones. + * Return one `tool_result` per block in a new `user` message, matched by `tool_use_id`, and echo `"toolset_name": "browser"` on each. Every call must be answered or the next request is rejected. + * If a call fails, return `is_error: true` with a text description for that block, then apply the halt rule in [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions) to every later block in the turn. + + + + * Claude reads the results (page text, accessibility trees, screenshots, tab state) and, if it needs more, returns further member calls, which takes you back to step 3. + * Otherwise, it returns a text response to the user. + + + +Here's a skeleton of that loop's tool-call step in two parts. First, stub member handlers stand in for your browser automation. Five members (`navigate`, `read_page`, `left_click`, `type`, and `screenshot`) return the text, or for `screenshot` the image block, that becomes the result content, and the dispatcher raises an error for any member it doesn't implement. + + + ```python Python + # Placeholder image data; a real executor captures the viewport and returns the PNG bytes + PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" + + + def navigate(url): + return f"navigated to {url}" + + + def read_page(): + return 'link "Docs" [ref_1]\nbutton "Search" [ref_2]' + + + def click(target): + # A target is an element reference from read_page or find, or a viewport coordinate + if target["type"] == "ref": + return f"clicked {target['ref']}" + return f"clicked at ({target['x']}, {target['y']})" + + + def type_text(text): + return f"typed: {text}" + + + def capture_screenshot() -> list[ImageBlockParam]: + # screenshot answers with an image block rather than text: return the result content list + return [ + { + "type": "image", + "source": {"type": "base64", "media_type": "image/png", "data": PLACEHOLDER_PNG}, + } + ] + + + def handle_browser_action(name, tool_input): + if name == "navigate": + return navigate(tool_input["url"]) + elif name == "read_page": + return read_page() + elif name == "left_click": + return click(tool_input["target"]) + elif name == "type": + return type_text(tool_input["text"]) + elif name == "screenshot": + return capture_screenshot() + # Handle other actions as needed + raise ValueError(f"Unknown or unimplemented member: {name}") + ``` + + ```typescript TypeScript + // Placeholder image data; a real executor captures the viewport as PNG bytes + const PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + function navigate(url: string): string { + return `navigated to ${url}`; + } + + function readPage(): string { + return 'link "Docs" [ref_1]\nbutton "Search" [ref_2]'; + } + + function clickElement(ref: string): string { + return `clicked ${ref}`; + } + + function clickAt(x: number, y: number): string { + return `clicked at (${x}, ${y})`; + } + + function typeText(text: string): string { + return `typed: ${text}`; + } + + function captureScreenshot(): Anthropic.ImageBlockParam[] { + // screenshot answers with an image block rather than text + return [ + { + type: "image", + source: { + type: "base64", + media_type: "image/png", + data: PLACEHOLDER_PNG, + }, + }, + ]; + } + + function handleBrowserAction( + action: string, + input: unknown, + ): string | Anthropic.ImageBlockParam[] { + const params: object = + typeof input === "object" && input !== null ? input : {}; + if (action === "navigate" && "url" in params) { + return navigate(String(params.url)); + } else if (action === "read_page") { + return readPage(); + } else if (action === "left_click" && "target" in params) { + // target is an element reference from read_page or a viewport coordinate + const target: object = + typeof params.target === "object" && params.target !== null + ? params.target + : {}; + if ("type" in target && target.type === "ref" && "ref" in target) { + return clickElement(String(target.ref)); + } else if ("x" in target && "y" in target) { + return clickAt(Number(target.x), Number(target.y)); + } + } else if (action === "type" && "text" in params) { + return typeText(String(params.text)); + } else if (action === "screenshot") { + return captureScreenshot(); + } + // Handle other actions as needed + throw new Error(`Unknown or unimplemented member: ${action}`); + } + ``` + + ```csharp C# + // Placeholder image data; a real executor captures the viewport and returns the PNG bytes + const string PlaceholderPng = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + string Navigate(string url) => $"navigated to {url}"; + + string ReadPage() => + """ + link "Docs" [ref_1] + button "Search" [ref_2] + """; + + string ClickRef(string elementRef) => $"clicked {elementRef}"; + + string ClickAt(int x, int y) => $"clicked at ({x}, {y})"; + + // target is {"type": "ref", "ref": "ref_1"} or {"type": "coordinate", "x": 640, "y": 380} + string Click(JsonElement target) => + target.GetProperty("type").GetString() == "ref" + ? ClickRef(target.GetProperty("ref").GetString()!) + : ClickAt(target.GetProperty("x").GetInt32(), target.GetProperty("y").GetInt32()); + + string TypeText(string text) => $"typed: {text}"; + + // screenshot answers with an image block rather than text: return the result content list + List CaptureScreenshot() => + [ + new ImageBlockParam( + new Base64ImageSource { Data = PlaceholderPng, MediaType = MediaType.ImagePng } + ), + ]; + + ToolResultBlockParamContent HandleBrowserAction( + string action, + IReadOnlyDictionary input + ) => + action switch + { + "navigate" => Navigate(input["url"].GetString()!), + "read_page" => ReadPage(), + "left_click" => Click(input["target"]), + "type" => TypeText(input["text"].GetString()!), + "screenshot" => CaptureScreenshot(), + // Handle other actions as needed + _ => throw new NotSupportedException($"Unknown or unimplemented member: {action}"), + }; + ``` + + ```go Go + // placeholderPNG stands in for a real capture: an executor returns the + // viewport as base64-encoded PNG data. + const placeholderPNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" + + // textContent wraps text as tool_result content. + func textContent(text string) []anthropic.ToolResultBlockParamContentUnion { + return []anthropic.ToolResultBlockParamContentUnion{ + {OfText: &anthropic.TextBlockParam{Text: text}}, + } + } + + func navigate(url string) string { + return fmt.Sprintf("navigated to %s", url) + } + + func readPage() string { + return "link \"Docs\" [ref_1]\nbutton \"Search\" [ref_2]" + } + + func clickRef(ref string) string { + return fmt.Sprintf("clicked %s", ref) + } + + func clickAt(x, y int) string { + return fmt.Sprintf("clicked at (%d, %d)", x, y) + } + + func typeText(text string) string { + return fmt.Sprintf("typed: %s", text) + } + + // captureScreenshot returns an image block rather than text. + func captureScreenshot() []anthropic.ToolResultBlockParamContentUnion { + return []anthropic.ToolResultBlockParamContentUnion{{ + OfImage: &anthropic.ImageBlockParam{ + Source: anthropic.ImageBlockParamSourceUnion{ + OfBase64: &anthropic.Base64ImageSourceParam{ + MediaType: anthropic.Base64ImageSourceMediaTypeImagePNG, + Data: placeholderPNG, + }, + }, + }, + }} + } + + func handleBrowserAction(action string, params map[string]any) ([]anthropic.ToolResultBlockParamContentUnion, error) { + switch action { + case "navigate": + if url, ok := params["url"].(string); ok { + return textContent(navigate(url)), nil + } + case "read_page": + return textContent(readPage()), nil + case "left_click": + // target is either an element reference from read_page or a viewport coordinate + target, _ := params["target"].(map[string]any) + if ref, ok := target["ref"].(string); ok && target["type"] == "ref" { + return textContent(clickRef(ref)), nil + } + x, xok := target["x"].(float64) + y, yok := target["y"].(float64) + if xok && yok { + return textContent(clickAt(int(x), int(y))), nil + } + case "type": + if text, ok := params["text"].(string); ok { + return textContent(typeText(text)), nil + } + case "screenshot": + return captureScreenshot(), nil + // Handle other actions as needed + default: + return nil, fmt.Errorf("unknown or unimplemented member: %s", action) + } + // Reached when a member's input is missing a field or a field has the wrong type + return nil, fmt.Errorf("invalid input for %s", action) + } + + ``` + + ```java Java + /** Placeholder pixels; a real executor captures the viewport and base64-encodes the PNG. */ + static final String PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + ToolResultBlockParam.Content captureScreenshot() { + ImageBlockParam image = ImageBlockParam.builder() + .source(Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) + .data(PLACEHOLDER_PNG) + .build()) + .build(); + return ToolResultBlockParam.Content.ofBlocks( + List.of(ToolResultBlockParam.Content.Block.ofImage(image))); + } + + String navigate(String url) { + return "navigated to " + url; + } + + String readPage() { + return """ + link "Docs" [ref_1] + button "Search" [ref_2]"""; + } + + String clickRef(String ref) { + return "clicked " + ref; + } + + String clickAt(long x, long y) { + return "clicked at (" + x + ", " + y + ")"; + } + + String typeText(String text) { + return "typed: " + text; + } + + /** Runs one browser toolset member; {@code action} is the tool_use block's name. */ + ToolResultBlockParam.Content handleBrowserAction(String action, Map input) { + if (action.equals("screenshot")) { + return captureScreenshot(); // the one member here that answers with an image block + } + String output = switch (action) { + case "navigate" -> navigate(input.get("url").asStringOrThrow()); + case "read_page" -> readPage(); + case "left_click" -> { + // target is {"type": "ref", "ref": "ref_1"} or {"type": "coordinate", "x": 640, "y": 380} + Map target = + (Map) input.get("target").asObject().get(); + if (target.get("type").asStringOrThrow().equals("ref")) { + yield clickRef(target.get("ref").asStringOrThrow()); + } + long x = ((Number) target.get("x").asNumber().get()).longValue(); + long y = ((Number) target.get("y").asNumber().get()).longValue(); + yield clickAt(x, y); + } + case "type" -> typeText(input.get("text").asStringOrThrow()); + // Handle other actions as needed + default -> throw new UnsupportedOperationException("Unknown or unimplemented member: " + action); + }; + return ToolResultBlockParam.Content.ofString(output); + } + ``` + + ```php PHP + // Stand-in for real PNG bytes; a real executor captures the viewport + const PLACEHOLDER_PNG = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=='; + + function navigateTo(string $url): string + { + return "navigated to {$url}"; + } + + function readPage(): string + { + return <<<'TEXT' + link "Docs" [ref_1] + button "Search" [ref_2] + TEXT; + } + + function clickTarget(array $target): string + { + // A target is an element reference from read_page or find, or a viewport pixel coordinate + if ($target['type'] === 'ref') { + return "clicked {$target['ref']}"; + } + + return "clicked at ({$target['x']}, {$target['y']})"; + } + + function typeText(string $text): string + { + return "typed: {$text}"; + } + + function captureScreenshot(): array + { + // screenshot answers with an image block rather than text, so return the result content list + $image = [ + 'type' => 'image', + 'source' => ['type' => 'base64', 'media_type' => 'image/png', 'data' => PLACEHOLDER_PNG], + ]; + + return [$image]; + } + + function handleBrowserAction(string $name, array $input): string|array + { + return match ($name) { + 'navigate' => navigateTo($input['url']), + 'read_page' => readPage(), + 'left_click' => clickTarget($input['target']), + 'type' => typeText($input['text']), + 'screenshot' => captureScreenshot(), + // Handle other actions as needed + default => throw new RuntimeException("Unknown or unimplemented member: {$name}"), + }; + } + ``` + + ```ruby Ruby + # Stand-in image data; a real executor captures the viewport as a PNG. + PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" + + def navigate(url) + "navigated to #{url}" + end + + def read_page + <<~TREE + link "Docs" [ref_1] + button "Search" [ref_2] + TREE + end + + def click(target) + return "clicked #{target[:ref]}" if target[:type] == "ref" + + "clicked at (#{target[:x]}, #{target[:y]})" + end + + def type_text(text) + "typed: #{text}" + end + + def capture_screenshot + [ + { + type: "image", + source: { type: "base64", media_type: "image/png", data: PLACEHOLDER_PNG } + } + ] + end + + def handle_browser_action(name, input) + case name + when "navigate" + navigate(input[:url]) + when "read_page" + read_page + when "left_click" + # target is an element reference (from read_page or find) or a coordinate + click(input[:target]) + when "type" + type_text(input[:text]) + when "screenshot" + capture_screenshot + # Handle other actions as needed + else + raise ArgumentError, "Unknown or unimplemented member: #{name}" + end + end + ``` + + +The second part runs a batch in order, dispatches each block to those handlers, echoes `toolset_name` on every result, and applies the halt rule from [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions), turning a handler error into an error result. The sampling loop that calls it is the one shown in [Understand the agent loop](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#understanding-the-agentic-loop), with the browser toolset in `tools`. + + + ```python Python + NOT_EXECUTED = "Not executed: an earlier action in this turn failed." + + + def process_tool_calls(response: Message) -> list[ToolResultBlockParam]: + """ + Run the browser actions in Claude's response in order and answer each + one. After the first failure the rest are skipped, because Claude planned + them assuming the earlier actions succeeded. + """ + tool_results: list[ToolResultBlockParam] = [] + failed = False + for block in response.content: + # Only the browser toolset is declared; route other tools here if you add them + if block.type != "tool_use" or block.toolset_name != "browser": + continue + result: ToolResultBlockParam = { + "type": "tool_result", + "tool_use_id": block.id, + "toolset_name": "browser", + } + if failed: + result["content"] = NOT_EXECUTED + result["is_error"] = True + else: + try: + # A string or a list of content blocks; a real executor also adds a + # browser_state block to navigation and tab-management results + result["content"] = handle_browser_action(block.name, block.input) + except Exception as err: + result["content"] = f"Error: {err}" + result["is_error"] = True + failed = True + tool_results.append(result) + return tool_results + ``` + + ```typescript TypeScript + const HALT_TEXT = "Not executed: an earlier action in this turn failed."; + + function browserResult( + toolUseId: string, + content: string | Anthropic.ImageBlockParam[], + isError?: boolean, + ): Anthropic.ToolResultBlockParam { + return { + type: "tool_result", + tool_use_id: toolUseId, + toolset_name: "browser", + content, + is_error: isError, + }; + } + + function processToolCalls( + response: Anthropic.Message, + ): Anthropic.ToolResultBlockParam[] { + const toolResults: Anthropic.ToolResultBlockParam[] = []; + let failed = false; + for (const block of response.content) { + if (block.type !== "tool_use") { + continue; + } + if (block.toolset_name !== "browser") { + // This example declares only the browser toolset; route other tools + // here if you add them. + continue; + } + if (failed) { + // A batch stops at its first failure; answer later actions unexecuted + toolResults.push(browserResult(block.id, HALT_TEXT, true)); + continue; + } + try { + // A string or an image block list; a real executor also adds a + // browser_state block to navigation and tab-management results + const result = handleBrowserAction(block.name, block.input); + toolResults.push(browserResult(block.id, result)); + } catch (error) { + failed = true; + const message = error instanceof Error ? error.message : String(error); + toolResults.push(browserResult(block.id, `Error: ${message}`, true)); + } + } + return toolResults; + } + ``` + + ```csharp C# + const string HaltText = "Not executed: an earlier action in this turn failed."; + + List ProcessToolCalls(Message response) + { + List toolResults = []; + var failed = false; + foreach (var block in response.Content) + { + if (!block.TryPickToolUse(out var toolUse)) + { + continue; + } + + if (toolUse.ToolsetName != "browser") + { + // This example declares only the browser toolset; route other tools + // here if you add them. + continue; + } + + if (failed) + { + // A batch stops at its first failure; answer later actions without running them + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) + { + Content = HaltText, + IsError = true, + ToolsetName = "browser", + } + ); + continue; + } + + try + { + // A string or a list of content blocks; a real executor also adds a + // browser_state block to navigation and tab-management results + var result = HandleBrowserAction(toolUse.Name, toolUse.Input); + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) { Content = result, ToolsetName = "browser" } + ); + } + catch (Exception e) + { + failed = true; + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) + { + Content = $"Error: {e.Message}", + IsError = true, + ToolsetName = "browser", + } + ); + } + } + return toolResults; + } + ``` + + ```go Go + const notExecuted = "Not executed: an earlier action in this turn failed." + + // browserToolResult builds the result for one browser action. Unlike an + // ordinary tool result, it must echo the toolset name. A real executor also + // adds a browser_state block to navigation and tab-management results. + func browserToolResult(toolUseID string, content []anthropic.ToolResultBlockParamContentUnion, isError bool) anthropic.ContentBlockParamUnion { + result := anthropic.ToolResultBlockParam{ + ToolUseID: toolUseID, + ToolsetName: anthropic.String("browser"), + Content: content, + } + if isError { + result.IsError = anthropic.Bool(true) + } + return anthropic.ContentBlockParamUnion{OfToolResult: &result} + } + + // processToolCalls runs the browser actions in Claude's response in order and + // builds one tool_result per tool_use block. After the first failure it skips + // the rest: Claude planned them assuming the earlier actions succeeded. + func processToolCalls(response *anthropic.Message) []anthropic.ContentBlockParamUnion { + var toolResults []anthropic.ContentBlockParamUnion + failed := false + for _, block := range response.Content { + switch variant := block.AsAny().(type) { + case anthropic.ToolUseBlock: + // This example declares only the browser toolset; route other tools here if you add them. + if variant.ToolsetName != "browser" { + continue + } + if failed { + toolResults = append(toolResults, browserToolResult(variant.ID, textContent(notExecuted), true)) + continue + } + var input map[string]any + var content []anthropic.ToolResultBlockParamContentUnion + err := json.Unmarshal(variant.Input, &input) + if err == nil { + content, err = handleBrowserAction(variant.Name, input) + } + if err != nil { + failed = true + content = textContent("Error: " + err.Error()) + } + toolResults = append(toolResults, browserToolResult(variant.ID, content, err != nil)) + } + } + return toolResults + } + + ``` + + ```java Java + /** The exact text the toolset contract prescribes for member calls skipped after a failure. */ + static final String HALT_TEXT = "Not executed: an earlier action in this turn failed."; + + /** Every result answering a browser toolset member echoes toolset_name. */ + ToolResultBlockParam.Builder browserResult(ToolUseBlock toolUse) { + return ToolResultBlockParam.builder() + .toolUseId(toolUse.id()) + .toolsetName("browser"); + } + + /** + * Run the browser actions in Claude's response in order and build one + * tool_result per tool_use block. After the first failure, skip the rest: + * Claude planned them assuming the earlier actions succeeded. + */ + List processToolCalls(Message response) { + List toolResults = new ArrayList<>(); + boolean failed = false; + for (ContentBlock block : response.content()) { + // This example declares only the browser toolset; route other tools here if you add them. + if (!block.isToolUse() || !block.asToolUse().toolsetName().equals(Optional.of("browser"))) { + continue; + } + ToolUseBlock toolUse = block.asToolUse(); + ToolResultBlockParam result; + if (failed) { + result = browserResult(toolUse).content(HALT_TEXT).isError(true).build(); + } else { + try { + Map input = + (Map) toolUse._input().asObject().get(); + ToolResultBlockParam.Content output = handleBrowserAction(toolUse.name(), input); + // A real executor also adds a browser_state block to navigation and + // tab-management results; see "Track tabs with browser_state" on this page. + result = browserResult(toolUse).content(output).build(); + } catch (RuntimeException e) { + failed = true; + result = browserResult(toolUse).content("Error: " + e.getMessage()).isError(true).build(); + } + } + toolResults.add(ContentBlockParam.ofToolResult(result)); + } + return toolResults; + } + ``` + + ```php PHP + const HALT_TEXT = 'Not executed: an earlier action in this turn failed.'; + + function processToolCalls(Message $response): array + { + $toolResults = []; + $failed = false; + foreach ($response->content as $block) { + // This example declares only the browser toolset; route other tools here if you add them. + // Read toolset_name through array access: the SDK keeps it as raw data until a release types it. + if (!($block instanceof ToolUseBlock) || ($block['toolsetName'] ?? $block['toolset_name'] ?? null) !== 'browser') { + continue; + } + $result = ['type' => 'tool_result', 'tool_use_id' => $block->id, 'toolset_name' => 'browser']; + if ($failed) { + // A batch stops at its first failure; the remaining actions are answered without running + $toolResults[] = [...$result, 'content' => HALT_TEXT, 'is_error' => true]; + continue; + } + try { + // A real executor also returns a browser_state block on navigation and tab-management results + $toolResults[] = [...$result, 'content' => handleBrowserAction($block->name, $block->input)]; + } catch (Throwable $e) { + $failed = true; + $toolResults[] = [...$result, 'content' => 'Error: ' . $e->getMessage(), 'is_error' => true]; + } + } + + return $toolResults; + } + ``` + + ```ruby Ruby + NOT_EXECUTED = "Not executed: an earlier action in this turn failed." + + # Run the browser actions in Claude's response in order and build one + # tool_result per tool_use block. After the first failure, skip the rest: + # Claude planned them assuming the earlier actions succeeded. + def process_tool_calls(response) + tool_results = [] + failed = false + response.content.each do |block| + # This example declares only the browser toolset; route other tools here + # if you add them. + next unless block.type == :tool_use && block.toolset_name == "browser" + + result = { type: "tool_result", tool_use_id: block.id, toolset_name: "browser" } + if failed + result.update(content: NOT_EXECUTED, is_error: true) + else + begin + # A String, or content blocks for a screenshot. A real executor also adds + # a browser_state block to navigation and tab-management results. + result[:content] = handle_browser_action(block.name, block.input) + rescue => e + result.update(content: "Error: #{e.message}", is_error: true) + failed = true + end + end + tool_results << result + end + tool_results + end + ``` + + +Dispatch each block on the pair (`toolset_name`, `name`) rather than on `name` alone, because a custom tool in the same request may share a member's name; [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets) describes the parts of this contract both toolsets share. If Claude names a member your executor doesn't implement, or one you disabled, answer that block with an [error result](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#return-errors-from-your-executor) rather than dropping it. + +When you stream the response, each member's `input` arrives as one complete `input_json_delta` rather than as fragments, so wait for the turn to finish before running the batch. + +### Batch actions + +A turn with several member calls is a batch action: run the calls in the order they appear, stop at the first failure, and answer every later call with `is_error: true` and the exact text `Not executed: an earlier action in this turn failed.` A batch uses the same response shape as [parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use); the difference is that you run the blocks in order rather than concurrently. Here Claude clicks the search box it found earlier, types a query, and presses Enter in one turn: + +```json +{ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "name": "left_click", + "toolset_name": "browser", + "input": { "target": { "type": "ref", "ref": "ref_3" } } + }, + { + "type": "tool_use", + "id": "toolu_01Ez4kLb1nQ2vXo8sJ9pWm3c", + "name": "type", + "toolset_name": "browser", + "input": { "text": "install" } + }, + { + "type": "tool_use", + "id": "toolu_01FkP8rTz6uYh2mNq4LsXw7v", + "name": "key", + "toolset_name": "browser", + "input": { "text": "Enter" } + } + ] +} +``` + +Your application returns three `tool_result` blocks in one `user` message, each carrying `toolset_name` and a short text acknowledgment such as `Clicked element ref_3.` Pressing Enter loads a results page, so the `key` result also carries a `browser_state` block with the tab's updated URL ([Tab context on other results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-context-on-other-results)). If the click had failed instead, its result would carry your error text and the other two results would carry the halt text, as shown under [Return errors from your executor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#return-errors-from-your-executor). + +You don't need to return a screenshot after every call. Claude typically ends a batch with an observation call (`screenshot`, `read_page`, or `get_page_text`), and your application can also attach its own observation, such as a fresh screenshot or accessibility tree, as an extra content block on the last result in the batch to save a round trip. Because a tab-management result must be exactly one `browser_state` block, attach it to the last result that isn't a tab-management call. + +If your executor can run only one call per round trip, set `disable_parallel_tool_use` to `true` in `tool_choice` and Claude returns at most one member call per turn, at the cost of more round trips ([Disable parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use#disable-parallel-tool-use)). The rest of the contract under [Batch actions for the computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions) carries over, including one `tool_result` for every `tool_use` in the next `user` message, except for two things: the halt text and what a successful result's `content` holds. Result content follows [Member tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#member-tools) on this page instead: a `new_tab`, `switch_tab`, `close_tab`, or `list_tabs` result is exactly one `browser_state` block with no text or image ([Tab management results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-management-results)), and any other member's result may add a `browser_state` block to its text or image ([Tab context on other results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-context-on-other-results)). Where cache breakpoints inside a batch take effect is described in the `cache_control` row of the computer use tool's [Tool parameters](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#tool-parameters). + +### Targets and coordinates + +Member tools that act on a location take a `target` object, which is either a viewport-pixel coordinate or a reference to an element that `read_page` or `find` returned. The [Member tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#member-tools) tables write `Target` for a parameter that accepts either shape. + +| Shape | `target.type` | Fields | Accepted by | +| ------------------ | -------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `CoordinateTarget` | `"coordinate"` | `x`, `y` (integers, viewport pixels) | `left_click`, `right_click`, `middle_click`, `double_click`, `triple_click`, `hover`, `left_click_drag` (`from` and `target`), `left_mouse_down`, `left_mouse_up`, `mouse_move`, `scroll` | +| `RefTarget` | `"ref"` | `ref` (an element reference such as `"ref_2"`) | `left_click`, `right_click`, `middle_click`, `double_click`, `triple_click`, `hover`, `scroll_to`, `form_input`, `file_upload` | + +**Coordinates are viewport pixels**, the pixel space of a full-viewport `screenshot` with the origin at the top left of the rendered page; there's no surrounding desktop or window frame. The toolset declares no display dimensions and Claude infers the viewport size from the screenshots you return, so keep them one consistent size. A `zoom` doesn't change the frame, so its `region` and any coordinates Claude emits after seeing the zoomed image are still full-viewport pixels. + +**Screenshots must fit the image limits.** The API doesn't downscale toolset images: a screenshot or zoom image over your model's [image size limits](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size), or over the stricter per-image limit that applies once a request holds [more than 20 images](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits), is rejected. Resize before returning, and scale Claude's coordinates back up by the inverse of your factor before dispatching them ([Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions)). + +**Element references come from `read_page` and `find`.** Each element in their output carries a tag such as `[ref_2]`, as in the Quick start result: + +```text wrap +link "Documentation" [ref_1] +link "Getting started" [ref_2] +textbox "Search docs" [ref_3] +button "Search" [ref_4] +link "Pricing" [ref_5] +``` + +Claude passes a reference back as a `{"type": "ref", "ref": "ref_2"}` target on a later click, `hover`, `scroll_to`, `form_input`, or `file_upload` call, or as the `ref` parameter on `read_page` to read a subtree. Your executor assigns the references, keeps the mapping from each one to the underlying node (an accessibility-node ID, a stored selector, or equivalent), and acts on that node when a reference comes back. + +References are scoped to the tab that produced them and stay valid until that tab navigates or its DOM changes materially. The API can't detect a stale or unknown reference, so when Claude passes a reference your executor no longer recognizes, return an error result such as `Error: ref_3 is stale or not found on the current page. Re-read the page to get fresh references.` Claude then reads the page again. Don't renumber references you've already handed out for a tab until it navigates, because that silently invalidates references Claude still holds. + +Claude uses both targeting styles and switches between them based on what the page exposes; your prompt and what your executor returns steer the choice: + +* **Prefer references where the page has a usable accessibility tree.** A reference survives layout shifts and reflows that make pixel coordinates fragile, and lets Claude act on controls that are hard to hit with a pointer. +* **Fall back to coordinates for content the tree doesn't describe.** Canvas-rendered interfaces, embedded video or remote-desktop surfaces, heavily virtualized lists, and elements inside cross-origin iframes often have no useful node, so Claude works from `screenshot` and `zoom` and clicks by coordinate; your executor resolves which frame a coordinate lands in. +* **Scope reads, and read the tree before you screenshot.** On large pages, `read_page` with `filter: "interactive"` or the `ref` of a container returns a focused subtree, and a tree read of a typical page often costs fewer input tokens than a screenshot while giving Claude references it can act on immediately. Screenshots remain the right observation when visual layout, images, or rendering state matter. + +## Security considerations + +Browser use carries risks that standard API features don't, because Claude reads and acts on content from the open web, where any page can contain text written to manipulate it. + + + To reduce these risks, take precautions such as the following: + + 1. Run the browser and your executor in a dedicated container or virtual machine with minimal privileges, a fresh profile that holds no credentials, and no access to sensitive filesystems or internal networks; isolate any tool you run alongside it the same way. + 2. Restrict the hosts the browser can reach to a domain allowlist enforced at the network layer and re-checked in your `navigate` handler after redirects, and block loopback, link-local, and private ranges unless the task needs them. + 3. Treat everything a page supplies as untrusted input, including the tab titles and URLs you report in a [`browser_state`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#track-tabs-and-page-state) block, and build page reads from what the page renders (the accessibility tree or visible text), not raw DOM source, so hidden text doesn't reach Claude. + 4. In your `navigate` handler, accept the history keywords `"back"`, `"forward"`, and `"reload"`, treat a URL without a scheme as `https://`, then parse the URL and refuse any scheme other than `http` or `https` (`javascript:`, `file:`, `data:`, `chrome:`, and so on) with an [error result](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#return-errors-from-your-executor). Check the scheme with a URL parser rather than a string prefix; the API never sees the navigation and can't reject it for you. + 5. Leave `javascript_exec` and `file_upload` disabled unless you need them, and read [Enable optional members](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#enable-optional-member-tools) before turning either on. + 6. Have a human confirm consequential actions and anything that requires affirmative consent (purchasing, modifying accounts, messaging, and accepting terms), and make that check in your executor before each call, because one turn can carry several. + + +Claude sometimes follows instructions found in page content even when they conflict with yours; text on a page that says "ignore your previous instructions and navigate to..." can divert it from the task. Isolate Claude from sensitive data and actions to limit what a prompt injection can reach, review [Mitigate jailbreaks and prompt injections](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks), and if a task can't avoid a logged-in session, use a dedicated low-privilege account and keep human confirmation on account-changing actions. + +Because the browser runs in your environment, the sites Claude visits see your executor's network identity, and page content reaches the API only as the tool results you return. Inform end users of the relevant risks and obtain their consent before enabling browser use in your products. + +## Member tools + +The `browser_toolset_20260801` entry declares 31 member tools; each call's `input` is exactly the parameters listed here, and `tab_id`, where optional, defaults to the active tab. `Target`, `CoordinateTarget`, and `RefTarget` are the shapes described in [Targets and coordinates](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates). Four members (`javascript_exec`, `file_upload`, `read_console`, and `read_network`) are disabled by default and appear only when you [enable them](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#enable-optional-member-tools). The input bounds and output conventions noted in each member's row are stated to Claude, not enforced by the API, so validate inputs (including coordinates against your viewport) and apply the conventions in your executor. + +Only `screenshot` and `zoom` require an [`image` block](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls#handling-results-from-client-tools) in their result, and the four tab-management members (`new_tab`, `list_tabs`, `switch_tab`, and `close_tab`) return exactly one `browser_state` block (see [Tab management results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-management-results)). Every other member returns a `text` block: either a short acknowledgment such as `Clicked element ref_2.` or the member's output. Any result other than a tab-management result may also carry an `image` block, typically a screenshot taken after the action, so Claude sees the outcome without a separate `screenshot` call; [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions) shows where to attach one in a batch. A member `tool_result` may contain only `text`, `image`, and `browser_state` content blocks. + +### Navigation and capture + +| Member | Input | Description | +| ------------ | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `navigate` | `url`, `tab_id?` | Load an `http` or `https` URL, or move through history with `"back"`, `"forward"`, or `"reload"`. Treat a URL without a scheme as `https://` and refuse any other scheme with an error result. Return a short acknowledgment, plus a `browser_state` block when the tab's URL or title changed. | +| `screenshot` | `tab_id?` | Capture the viewport and return an `image` block. | +| `zoom` | `region`, `tab_id?` | Return a cropped, upscaled `image` of `region`, given as `[x0, y0, x1, y1]` in viewport pixels, for closer inspection of small text or controls. | + +### Pointer + +| Member | Input | Description | +| ----------------- | --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `left_click` | `target: Target`, `modifiers?`, `tab_id?` | Left-click a coordinate or a referenced element. `modifiers` is a chord held during the click, for example, `"shift"` or `"ctrl+shift"`. | +| `right_click` | `target: Target`, `modifiers?`, `tab_id?` | Right-click a coordinate or element. | +| `middle_click` | `target: Target`, `modifiers?`, `tab_id?` | Middle-click a coordinate or element. | +| `double_click` | `target: Target`, `modifiers?`, `tab_id?` | Double left-click a coordinate or element. | +| `triple_click` | `target: Target`, `modifiers?`, `tab_id?` | Triple left-click a coordinate or element, which typically selects a line or paragraph. | +| `hover` | `target: Target`, `tab_id?` | Move the pointer over a coordinate or element without clicking. | +| `left_click_drag` | `from: CoordinateTarget`, `target: CoordinateTarget`, `tab_id?` | Press at `from`, drag to `target`, and release. | +| `left_mouse_down` | `target: CoordinateTarget`, `tab_id?` | Press and hold the left button at a coordinate; pair with `left_mouse_up` for a custom drag. | +| `left_mouse_up` | `target: CoordinateTarget`, `tab_id?` | Release the left button at a coordinate. | +| `mouse_move` | `target: CoordinateTarget`, `tab_id?` | Move the pointer to a coordinate. | +| `scroll` | `target: CoordinateTarget`, `scroll_direction`, `scroll_amount?`, `tab_id?` | Scroll at a viewport position. `scroll_direction` is `"up"`, `"down"`, `"left"`, or `"right"`; `scroll_amount` is in scroll-wheel notches, 1 to 10, default 3. | +| `scroll_to` | `target: RefTarget`, `tab_id?` | Scroll a referenced element into view. | + +### Keyboard and timing + +| Member | Input | Description | +| ---------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `type` | `text`, `tab_id?` | Type a literal string at the current focus. | +| `key` | `text`, `repeat?`, `tab_id?` | Press a key or chord. `text` is a single key (`"Enter"`), a chord joined with `+` (`"ctrl+a"`), or a space-separated sequence (`"Backspace Backspace"`); `repeat` is 1 to 100, default 1. | +| `hold_key` | `text`, `duration`, `tab_id?` | Hold a key or chord for `duration` seconds, 0 to 30. | +| `wait` | `duration`, `tab_id?` | Pause for `duration` seconds, 0 to 30. | + +### Page reading + +| Member | Input | Description | +| --------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `read_page` | `filter?`, `depth?`, `ref?`, `tab_id?` | Return the page's accessibility tree as text with each element tagged with a reference such as `[ref_2]`. With `filter` omitted, return every visible element; with `"interactive"`, only visible interactive elements; with `"all"`, also elements outside the viewport. `depth` caps the tree depth (minimum 1, default 15) and `ref` scopes the read to that element's subtree. Cap the output at 50,000 characters and say so in the text; Claude then narrows with a smaller `depth` or a `ref`. | +| `find` | `query`, `tab_id?` | Search for elements matching a natural-language description such as `"search field"` or `"add to cart button"`, and return up to 20 matches in the same tagged format as `read_page`. | +| `get_page_text` | `tab_id?` | Return the page's visible text as plain text, prioritizing the main article content; suited to articles, documentation, and other text-heavy pages. | + +### Forms and files + +| Member | Input | Description | +| ----------------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `form_input` | `target: RefTarget`, `value`, `tab_id?` | Set a form element's value directly. `value` is a `string`, `number`, or `boolean`; use a `boolean` for checkboxes and an option's value or visible text for selects. | +| `file_upload` (disabled by default) | `target: RefTarget`, `paths?`, `document_ids?`, `tab_id?` | Set the files on a file-input element from `paths` on the executor's filesystem, `document_ids` your application has staged, or both; at least one is required. See [Upload files](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#upload-files). | + +### Diagnostics and scripting + +| Member | Input | Description | +| --------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `read_console` (disabled by default) | `tab_id?` | Return the tab's console entries (log, warning, and error lines) accumulated since the last read, one line per entry. See [Read console and network activity](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#read-console-and-network-activity). | +| `read_network` (disabled by default) | `tab_id?` | Return the tab's network requests (method, URL, status, MIME type, timing) since the last read, one line per entry. | +| `javascript_exec` (disabled by default) | `text`, `tab_id?` | Run `text` as JavaScript in the page context and return the value of the last expression as text. See [Enable optional members](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#enable-optional-member-tools). | + +### Tab management + +| Member | Input | Description | +| ------------ | ------------------- | -------------------------------------- | +| `new_tab` | (none) | Open a tab and make it the active tab. | +| `list_tabs` | (none) | Report the tab inventory. | +| `switch_tab` | `tab_id` (required) | Make `tab_id` the active tab. | +| `close_tab` | `tab_id` (required) | Close `tab_id`. | + +On success, each of these returns exactly one `browser_state` block and no text or image; see [Tab management results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-management-results). + +## Configure the toolset + +Besides `type`, the toolset entry accepts `configs`, `cache_control`, and `allowed_callers`; the rules these fields share with the computer use toolset are listed under [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets), and this section covers the browser-specific defaults. `configs` is an object keyed by member name, and each member's value accepts two fields: + +| Field | Default | Meaning | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `enabled` | `true`, except `false` for the four [optional members](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#enable-optional-member-tools) | Whether the member is offered to Claude. | +| `defer_loading` | `false` | Whether the toolset's definition is deferred for tool search. Must resolve to the same value on every enabled member. With the four optional members left disabled, deferring the toolset means setting it on the other 27; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). | + +### Enable or disable member tools + +List only the members you want to change in `configs`; every member you omit keeps its default. For example, an executor that implements console reads but not low-level pointer or key-hold control turns `read_console` on and withholds three members: + +```json +{ + "type": "browser_toolset_20260801", + "configs": { + "read_console": { "enabled": true }, + "left_mouse_down": { "enabled": false }, + "left_mouse_up": { "enabled": false }, + "hold_key": { "enabled": false } + } +} +``` + +A disabled member disappears from the definition Claude sees; that doesn't guarantee Claude never names it, so your executor still answers such a call with an [error result](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#return-errors-from-your-executor). + +### Combine with other tools + +Declare the browser use tool alongside your own tools and other Anthropic-provided tools in the same `tools` array. A custom tool may share a member's name (your own `navigate`, for example), because `toolset_name` distinguishes Claude's calls, but no other entry may be named `browser`, and a request may contain only one browser toolset entry. + +You can also declare it alongside the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), either the toolset or an earlier computer use tool version. The two work independently, each in its own coordinate frame (viewport pixels here, desktop screenshot pixels there), and Claude's calls to members that share a name, such as `screenshot` or `key`, are told apart by `toolset_name`. + +## Enable optional members + +Four member tools are disabled by default: `javascript_exec` and `file_upload` because they widen what a manipulated page could make Claude do, and `read_console` and `read_network` because not every browser automation stack can supply those logs and they widen what page-controlled content reaches Claude. Enable each one with `configs` (for example, `"configs": {"file_upload": {"enabled": true}}`) only when your executor implements it and the task needs it. + +### Upload files + +`file_upload` sets the files on an `` element directly, which is more reliable than driving a native file chooser. Its `target` is a reference only, because the call needs the element's identity, and it takes `paths`, `document_ids`, or both: + +* `paths` are file paths on the executor's filesystem, for deployments where the executor can read your application's files directly (the same condition under which you populate a download's `path`). +* `document_ids` are identifiers for files your application has staged for the browser, for deployments where it can't. Your application defines what the identifiers mean; scope their resolution the way you scope `paths`, to files staged for this task. + +```json +{ + "type": "tool_use", + "id": "toolu_01N7gVzFEfZjLjgsYwnrPgrF", + "name": "file_upload", + "toolset_name": "browser", + "input": { + "target": { "type": "ref", "ref": "ref_12" }, + "paths": ["/home/user/uploads/summary.pdf"], + "tab_id": "tab-2" + } +} +``` + +Claude writes these paths while it's reading untrusted pages, so an unrestricted implementation would let a malicious page direct the upload of any file the executor can read to a site the page controls. Enable the member only when your executor resolves each path (following symlinks and `..` segments) and accepts nothing outside a dedicated, allowlisted upload directory that holds only files meant for the task. Don't reuse the browser's download directory for this; if you do, every file a page causes the browser to download becomes uploadable. + +### Run JavaScript in the page + +`javascript_exec` runs the expression Claude writes in the page's context and returns the value of the last expression as text; Claude writes an expression, not a `return` statement. The code runs with the page's full privileges, including its cookies, storage, and same-origin requests. Enable the member only in sessions that hold no credentials, keep the domain allowlist from [Security considerations](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#security-considerations) in force, treat the returned value as untrusted input, and log the code Claude emits. + +### Read console and network activity + +`read_console` returns the tab's console entries and `read_network` returns its network requests, each as text with one line per entry accumulated since the previous read of that tab. A console line carries a log, warning, or error entry; a network line carries the method, URL, status, MIME type, and timing. Entries exist only from the moment your browser automation attached to the tab, so an empty result doesn't mean a tab that was already open had no traffic. + +These members let Claude diagnose a misbehaving page (a failed request behind a spinner, a script error behind a dead button) without repeated screenshots. Console and network entries are page-controlled and often contain secrets such as tokens in request URLs, so redact credential-like values you don't want in Claude's context and truncate very long entries before returning them. + +## Track tabs with `browser_state` + +Claude addresses tabs by `tab_id`, your application is the source of truth for which tabs exist, and you report that state in a `browser_state` content block that Claude never sees directly: the API renders the text Claude reads from it. + +```json +{ + "type": "browser_state", + "tabs": [ + { + "tab_id": "tab-1", + "title": "Documentation", + "url": "https://example.com/docs", + "active": true + }, + { "tab_id": "tab-2", "title": "Pricing", "url": "https://example.com/pricing" } + ] +} +``` + +* `tabs` is the full inventory of open tabs after the call, not a delta. It may be empty; whenever it isn't, exactly one entry carries `"active": true`. +* `state_changes` (not shown here) reports side effects of the call: a `tab_opened` entry for each tab the call opened that's still open when it finishes, whose `tab_id` must also appear in `tabs`, and [download events](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#report-downloads). Omit the field when there's nothing to report; an empty array is rejected. +* Send the block only on results that answer a browser member call, at most once per `tool_result`, and never on a result with `is_error: true`. You express "no tab state to report" by omitting the block. +* The API renders `tabs` into text for Claude as the next two sections describe; download entries in `state_changes` are validated but not rendered. + +**You assign `tab_id` values.** Any stable string works, such as your automation library's page identifier or your own counter, as long as you don't reuse a `tab_id` while a tab with that identifier is still listed as open in an earlier result. The API enforces these limits on the block: + +* Each `tab_id`, `title`, and `url` may be at most 4,096 characters, `tab_id` must be non-empty, and none may contain control characters (including newlines) or Unicode line or paragraph separators. +* A block may list at most 100 tabs and 200 state changes. +* The same limits apply to the `tab_id` Claude passes to `switch_tab` and `close_tab`, because the API renders it into the result text, so answer a call whose `tab_id` violates them with an error result instead of a `browser_state` block. + + + Tab titles and URLs come from the page and render into text Claude reads, so they're a prompt-injection surface. The API renders URLs verbatim, so sanitize page-supplied URLs before populating `tabs`. It escapes double quotes and backslashes in titles when it renders them, so don't pre-escape titles (a pre-escaped title reaches Claude double-escaped); truncating or dropping suspicious titles is still worthwhile. The length and character limits the API enforces are a floor, not a defense. + + +### Tab management results + +For `new_tab`, `switch_tab`, `close_tab`, and `list_tabs`, a successful result's `content` is exactly one `browser_state` block with no text or image, and the API writes the text Claude sees. A `new_tab` result's block must also carry exactly one `tab_opened` state change whose `tab_id` matches the entry marked `active: true`. + +| Member | Text Claude sees | +| ------------ | --------------------------------------------------------------------------------------------------------------------------- | +| `switch_tab` | `Switched to tab {tab_id}`, taken from the call's `input.tab_id` | +| `close_tab` | `Closed tab {tab_id}`, taken from the call's `input.tab_id` | +| `new_tab` | `Created new tab with tab_id: {tab_id}, URL: {url}. It is now the current tab.`, taken from the entry marked `active: true` | +| `list_tabs` | `Available tabs:` followed by one line per tab, or `No tabs available` when `tabs` is empty | + +A `list_tabs` result whose block lists two tabs with the first one active renders as follows, with each line indented two spaces and `(current)` appended to the active tab only: + +```text wrap +Available tabs: + • tab_id tab-1: "Documentation" (https://example.com/docs) (current) + • tab_id tab-2: "Pricing" (https://example.com/pricing) +``` + +An error result for one of these members is the reverse: ordinary error text in `content`, `is_error: true`, and no `browser_state` block. + +For example, when Claude calls `new_tab` (its `input` is empty), your executor opens the tab, makes it active, and returns the inventory with one `tab_opened` entry: + +```json +{ + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_01WvHSbQVV9j5nWGvTmk4vNL", + "toolset_name": "browser", + "content": [ + { + "type": "browser_state", + "tabs": [ + { "tab_id": "tab-1", "title": "Documentation", "url": "https://example.com/docs" }, + { "tab_id": "tab-2", "title": "Pricing", "url": "https://example.com/pricing" }, + { "tab_id": "tab-3", "title": "", "url": "about:blank", "active": true } + ], + "state_changes": [{ "type": "tab_opened", "tab_id": "tab-3" }] + } + ] + } + ] +} +``` + +Claude sees `Created new tab with tab_id: tab-3, URL: about:blank. It is now the current tab.` Report the URL the tab was opened at, as here, not one it later redirects to; later results report the tab's then-current URL. + +### Tab context on other results + +On every other member the block is optional: send it when the set of open tabs, the active tab, or a tab's title or URL changed, or when there are `state_changes` to report, and always include the full `tabs` inventory. When a result carries both text and a `browser_state` block, the API appends a `Tab Context` footer to that result's text, separated from your text by a blank line, so Claude receives the new state without a separate `list_tabs` call: + +```text wrap +Tab Context: +- Executed on tab_id: tab-1 +- Available tabs: + • tab_id tab-1: "Documentation" (https://example.com/docs) + • tab_id tab-2: "Pricing" (https://example.com/pricing) +``` + +`Executed on` names the tab the call ran on, which is its `tab_id` input when present and otherwise the active tab, and the footer's tab lines carry no `(current)` marker. Don't append this text yourself; send the structured block and let the API render it. The footer is deduplicated, so identical tab state isn't rendered again on later results and populating the block liberally costs nothing. + +Three cases render no footer even when the block is present: + +* Any `zoom` result. +* A result with no `text` block (an image-only `screenshot` result, for example). Nothing is rendered or remembered for that result; the tab context appears on the next result that carries both text and a `browser_state` block, so include a short text block alongside the image when you want Claude to see a tab change on that same result. +* A result whose `tabs` list is empty on a call that carried no `tab_id`, because there's no tab to name. + +For example, when Claude clicked the "Pricing" link (`ref_5`) earlier in this session, the page opened it in a new tab Claude didn't ask for, and without a report Claude would have to call `list_tabs` to discover it. Return the click's acknowledgment plus a block whose `state_changes` names the opened tab, marking whichever tab your executor left active: + +```json +{ + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_01EgTXj1FjE2FCTt2zNFWLao", + "toolset_name": "browser", + "content": [ + { "type": "text", "text": "Clicked element ref_5." }, + { + "type": "browser_state", + "tabs": [ + { + "tab_id": "tab-1", + "title": "Documentation", + "url": "https://example.com/docs", + "active": true + }, + { "tab_id": "tab-2", "title": "Pricing", "url": "https://example.com/pricing" } + ], + "state_changes": [{ "type": "tab_opened", "tab_id": "tab-2" }] + } + ] + } + ] +} +``` + +Claude sees `Clicked element ref_5.` followed by the Tab Context footer shown earlier. A tab opened during a call that failed gets no `tab_opened` entry, because error results carry no `browser_state`; it appears in the `tabs` inventory of the next successful result instead. In a batch, attach the block to the result of the call during which the change happened, and give every successful tab-management result its own block even when an earlier result in the same turn reported the same state. + +### Report downloads + +When a click or navigation starts a file download, report it in `state_changes` on the result of the call during which it happened, correlated across results by a `download_id` you assign. Downloads run asynchronously and can span several results, so there are three event types: + +| `type` | Fields | When to send | +| -------------------- | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `download_started` | `download_id`, `url` | On the result of the call during which the download began. `url` is the final URL the file is served from, after redirects. | +| `download_completed` | `download_id`, `url`, `path?`, `size_bytes?` | On the result of whichever later call is running when the download finishes. Include `path` only when another tool in the same environment (for example, the [bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) or `file_upload`) can read the file there; otherwise `download_id` is the download's only identifier. | +| `download_failed` | `download_id`, `url`, `error?` | When the download fails or is canceled, with the reason in `error` if the browser provides one. | + +The API validates these entries but doesn't render them into text Claude sees, so when Claude needs to act on the file, also mention the file name or `path` in the same result's `text` block. + +For example, a click on "Download price list (CSV)" (`ref_8`) in the Pricing tab starts a download, so the click's result carries a `download_started` entry with `download_id` `"dl-1"` and the file's URL. The download finishes while a later `screenshot` call is running, so that result's `content` holds the image, a text block such as `Screenshot captured. Download complete: /home/user/downloads/price-list.csv (48,213 bytes).`, and this `browser_state` block reporting the completion under the same `download_id`: + +```json +{ + "type": "browser_state", + "tabs": [ + { "tab_id": "tab-1", "title": "Documentation", "url": "https://example.com/docs" }, + { + "tab_id": "tab-2", + "title": "Pricing", + "url": "https://example.com/pricing", + "active": true + } + ], + "state_changes": [ + { + "type": "download_completed", + "download_id": "dl-1", + "url": "https://example.com/pricing/price-list.csv", + "path": "/home/user/downloads/price-list.csv", + "size_bytes": 48213 + } + ] +} +``` + +Download reports follow these rules: + +* At most one entry per `download_id` in a single block, so a download that starts and finishes during the same call reports only `download_completed`. +* Never send `state_changes` on an `is_error: true` result; report a download event that occurred during a failed call on the next successful result. +* `state_changes` isn't an inventory of downloads in progress; report each event once. +* Each entry carries only the fields its `type` declares. `size_bytes` is a non-negative integer, `download_id` is non-empty, and `download_id`, `url`, `path`, and `error` are each at most 4,096 characters with no control characters or Unicode line or paragraph separators. The `url` comes from the remote server and often carries signed query-string credentials after redirects, so strip query parameters you don't want in Claude's context and sanitize it before reporting it or using it in a filesystem path. + +## Handle errors + +Report a failed call to Claude as an ordinary error result: `is_error: true`, text content that says what went wrong, `toolset_name` echoed, and no `browser_state` block. + +### Return errors from your executor + +Make error text specific, because Claude reads it and adapts: `Error: Navigation to https://example.com/status timed out after 30 seconds. The page may be unavailable.` gives Claude something to act on where a bare `Error: navigation failed` doesn't. Other common cases: + + + + ```json + { + "type": "tool_result", + "tool_use_id": "toolu_01LeUTyqkhRxBFq1QTG3pkwN", + "toolset_name": "browser", + "is_error": true, + "content": "Error: Navigation refused. Only http and https URLs are allowed." + } + ``` + + + + ```json + { + "type": "tool_result", + "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "toolset_name": "browser", + "is_error": true, + "content": "Error: ref_3 is stale or not found on the current page. Re-read the page to get fresh references." + } + ``` + + + + ```json + { + "type": "tool_result", + "tool_use_id": "toolu_013h2Q55HcNwVyapSpy2s5ZG", + "toolset_name": "browser", + "is_error": true, + "content": "Error: javascript_exec is not enabled in this environment." + } + ``` + + + + When the `left_click` on `ref_3` from [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions) fails with the stale-reference error shown earlier, the `type` and `key` calls after it each get this result: + + ```json + { + "type": "tool_result", + "tool_use_id": "toolu_01FkP8rTz6uYh2mNq4LsXw7v", + "toolset_name": "browser", + "is_error": true, + "content": "Not executed: an earlier action in this turn failed." + } + ``` + + + +### Request errors + +The API validates the toolset entry and every member `tool_use` and `tool_result` block in the conversation. When one is malformed, the API returns an `invalid_request_error` before Claude runs. In the following table, the left column names what you sent. + +| Request | Why it fails and what to do | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| An option or combination the toolset entry doesn't accept, for example, a `name`, `strict: true`, `input_examples`, `defer_loading` on the entry itself, a `configs` key that isn't a member name, a field other than `enabled` or `defer_loading` in a member's `configs` value ([Configure the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#configure-the-toolset)), enabled members whose `defer_loading` values differ ([Configure the toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#configure-the-toolset)), a `configs` that leaves no member enabled, a code execution caller in `allowed_callers`, the legacy `fine-grained-tool-streaming-2025-05-14` beta header on the request, a `tool_choice` of type `tool` naming `browser` or a member, or a second browser toolset entry or another tool named `browser` | These aren't supported on client toolsets. See [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets) for each rule and its alternative. | +| A `tool_result` answering a member call without `"toolset_name": "browser"` or with a different value, or `toolset_name` on a result whose call wasn't a member call | Echo `toolset_name` exactly on member results, and only on them. | +| A member `tool_use` from an earlier turn with no matching `tool_result` | Answer every member call, including the ones you didn't run after a failure. | +| A content block other than `text`, `image`, or `browser_state` in a member result | Member results accept only those three block types. | +| A `browser_state` block that breaks a rule in [Track tabs with `browser_state`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#track-tabs-and-page-state), for example, one on an `is_error: true` result or on a result that doesn't answer a browser member call, more than one in a result, a non-empty `tabs` without exactly one `active: true` entry, a duplicate `tab_id`, an empty `state_changes` array, a `tab_opened` whose `tab_id` isn't in `tabs`, two state changes for one `download_id` or a state-change field its `type` doesn't declare ([Report downloads](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#report-downloads)), or a field over its limits | Fix the block. "Nothing to report" is expressed by omitting the block or the `state_changes` field, never by an empty value. | +| A successful `new_tab`, `switch_tab`, `close_tab`, or `list_tabs` result whose `content` isn't exactly one `browser_state` block, or a `new_tab` result without exactly one `tab_opened` matching the active tab | The API renders these results from the block and needs it in that exact shape; see [Tab management results](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-management-results). | +| An `image` in a result over your model's [image size limits](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size), or over the stricter per-image limit that applies once the request holds [more than 20 images](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits), counting screenshots and `zoom` images in earlier results | The API doesn't downscale toolset images. Resize screenshots before returning them ([Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions)). | +| A `model` that doesn't support `browser_toolset_20260801` | See [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#compatibility) for the supported models. | + +## Limitations + +* **Platform availability:** Browser use is available on the Claude API only. +* **Whole-input streaming only:** When you stream, each member's `input` arrives as one complete `input_json_delta` ([Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets)). +* **Element references are best-effort:** Highly dynamic pages (virtualized lists, canvas-rendered interfaces, pages that re-render on scroll) might not expose stable references, and Claude falls back to screenshots and coordinate clicks there. +* **`read_console` and `read_network` depend on your browser automation:** They report only what it can capture, and only from the moment it attached to a tab. +* **General agent limitations apply:** Latency, vision accuracy, and prompt-injection risks carry over from computer use (see the computer use tool's [Limitations](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#understand-computer-use-limitations)), and its guidance under [Optimize model performance with prompting](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#optimize-model-performance-with-prompting), [Manage screenshot history](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#manage-screenshot-history), and [Follow implementation best practices](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#follow-implementation-best-practices) (action delays, action validation, and logging) applies to browser executors too. + +## Pricing and data retention + +Browser use follows the standard [tool use pricing](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview#pricing). When using the browser use tool: + +**Toolset definition overhead:** Declaring `browser_toolset_20260801` with its default members adds about 6,600 input tokens to a request (about 6,610 on Claude Fable 5, Claude Mythos 5, Claude Opus 5, and Claude Opus 4.8, and about 6,670 on Claude Sonnet 5), which covers the member tool definitions and the tool use system prompt. Enabling all four optional members adds about 880 tokens, and disabling members with `configs` reduces the count. The exact count for a request is reported in the response `usage`, and you can estimate it in advance with the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting). + +**Additional token consumption:** + +* Screenshot and zoom images returned in tool results, billed as image input (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)) +* Text tool results returned to Claude, such as accessibility trees, page text, and console or network entries + + + If you also use the computer use tool, bash tool, text editor tool, or your own tools alongside browser use, those tools have their own token costs as documented on their respective pages. + + +The browser session, downloads, and uploaded files stay in your environment; the screenshots, page text, and tab state you return are part of your API request content and follow the standard retention policy, or your ZDR arrangement if you have one. The browser use tool is ZDR eligible; see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention) for retention periods and eligibility across features. + +## Next steps + + + + Give Claude control of a full desktop when the task leaves the browser; its implementation guidance applies to browser executors too. + + + + Format `tool_result` blocks, return images and errors, and continue the conversation. + + + + Browse client toolsets and every other Anthropic-provided tool, with their versions and parameters. + + diff --git a/content/en/agents-and-tools/tool-use/code-execution-tool.md b/content/en/agents-and-tools/tool-use/code-execution-tool.md index 3825e28f13..5d6deb618e 100644 --- a/content/en/agents-and-tools/tool-use/code-execution-tool.md +++ b/content/en/agents-and-tools/tool-use/code-execution-tool.md @@ -275,11 +275,7 @@ If you want Claude to run code for a borderline request, ask explicitly (for exa ### Upload and analyze your own files -To analyze your own data files (such as CSV, Excel, or images), upload them through the Files API and reference them in your request: - - - This workflow doesn't require a beta header: uploading and downloading files through the Files API and referencing them in `container_upload` blocks are all generally available. The examples on this page send `anthropic-beta: files-api-2025-04-14`, which the API accepts but doesn't require. - +To analyze your own data files (such as CSV, Excel, or images), upload them through the Files API and reference them in your request. The Python environment can process various file types uploaded through the Files API, including: @@ -302,14 +298,12 @@ The Python environment can process various file types uploaded through the Files FILE_ID=$(curl --fail-with-body -sS https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "file=@data.csv" | jq -r '.id') # Then use the file_id with code execution curl --fail-with-body -sS https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -330,13 +324,12 @@ The Python environment can process various file types uploaded through the Files ```bash CLI # First, upload a file and capture the file ID - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file ./data.csv \ --transform id --raw-output) # Then use the file_id with code execution - ant beta:messages create \ - --beta files-api-2025-04-14 < list[str]: + def extract_file_ids(response: Message) -> list[str]: file_ids: list[str] = [] for item in response.content: if item.type == "bash_code_execution_tool_result": @@ -626,8 +611,8 @@ When Claude saves files to its output directory during code execution (see [How # Download the created files for file_id in extract_file_ids(response): - file_metadata = client.beta.files.retrieve_metadata(file_id) - file_content = client.beta.files.download(file_id) + file_metadata = client.files.retrieve_metadata(file_id) + file_content = client.files.download(file_id) file_content.write_to_file(file_metadata.filename) print(f"Downloaded: {file_metadata.filename}") ``` @@ -638,9 +623,8 @@ When Claude saves files to its output directory during code execution (see [How const client = new Anthropic(); // Request code execution that creates files - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", - betas: ["files-api-2025-04-14"], max_tokens: 4096, messages: [ { @@ -663,8 +647,8 @@ When Claude saves files to its output directory during code execution (see [How if (result.type === "bash_code_execution_result") { for (const outputBlock of result.content) { const [fileMetadata, fileResponse] = await Promise.all([ - client.beta.files.retrieveMetadata(outputBlock.file_id), - client.beta.files.download(outputBlock.file_id) + client.files.retrieveMetadata(outputBlock.file_id), + client.files.download(outputBlock.file_id) ]); await writeFile(fileMetadata.filename, await fileResponse.bytes()); console.log(`Downloaded: ${fileMetadata.filename}`); @@ -681,12 +665,11 @@ When Claude saves files to its output directory during code execution (see [How { Model = Model.ClaudeOpus5, MaxTokens = 4096, - Betas = [AnthropicBeta.FilesApi2025_04_14], Messages = [new() { Role = Role.User, Content = "Create a matplotlib visualization and save it as output.png" }], - Tools = [new BetaCodeExecutionTool20250825()] + Tools = [new CodeExecutionTool20250825()] }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); // Collect the file IDs from the tool results List fileIds = []; @@ -694,7 +677,7 @@ When Claude saves files to its output directory during code execution (see [How { if (!block.TryPickBashCodeExecutionToolResult(out var toolResult)) continue; - if (!toolResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var result)) + if (!toolResult.Content.TryPickBashCodeExecutionResultBlock(out var result)) continue; foreach (var output in result.Content) { @@ -705,8 +688,8 @@ When Claude saves files to its output directory during code execution (see [How // Download each created file foreach (var fileId in fileIds) { - var fileMetadata = await client.Beta.Files.RetrieveMetadata(fileId); - using var download = await client.Beta.Files.Download(fileId); + var fileMetadata = await client.Files.RetrieveMetadata(fileId); + using var download = await client.Files.Download(fileId); var downloadStream = await download.ReadAsStream(); await using var target = File.Create(fileMetadata.Filename); await downloadStream.CopyToAsync(target); @@ -718,17 +701,14 @@ When Claude saves files to its output directory during code execution (see [How client := anthropic.NewClient() ctx := context.Background() - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a matplotlib visualization and save it as output.png")), - }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a matplotlib visualization and save it as output.png")), }, - Betas: []anthropic.AnthropicBeta{ - anthropic.AnthropicBetaFilesAPI2025_04_14, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -738,12 +718,12 @@ When Claude saves files to its output directory during code execution (see [How fileIDs := extractFileIDs(response) for _, fileID := range fileIDs { - fileMetadata, err := client.Beta.Files.GetMetadata(ctx, fileID, anthropic.BetaFileGetMetadataParams{}) + fileMetadata, err := client.Files.GetMetadata(ctx, fileID) if err != nil { log.Fatal(err) } - fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(ctx, fileID) if err != nil { log.Fatal(err) } @@ -764,11 +744,11 @@ When Claude saves files to its output directory during code execution (see [How } // ... - func extractFileIDs(response *anthropic.BetaMessage) []string { + func extractFileIDs(response *anthropic.Message) []string { var fileIDs []string for _, item := range response.Content { switch variant := item.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: // Collect the file IDs from the tool result for _, file := range variant.Content.Content { if file.FileID != "" { @@ -787,19 +767,18 @@ When Claude saves files to its output directory during code execution (see [How MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) .maxTokens(4096L) .addUserMessage("Create a matplotlib visualization and save it as output.png") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); List fileIds = extractFileIds(response); for (String fileId : fileIds) { - FileMetadata fileMetadata = client.beta().files().retrieveMetadata(fileId); - try (HttpResponse fileContent = client.beta().files().download(fileId)) { + FileMetadata fileMetadata = client.files().retrieveMetadata(fileId); + try (HttpResponse fileContent = client.files().download(fileId)) { Files.copy( fileContent.body(), Path.of(fileMetadata.filename()), @@ -809,15 +788,15 @@ When Claude saves files to its output directory during code execution (see [How } } - List extractFileIds(BetaMessage response) { + List extractFileIds(Message response) { List fileIds = new ArrayList<>(); // Collect the file IDs from the tool results - for (BetaContentBlock item : response.content()) { + for (ContentBlock item : response.content()) { item.bashCodeExecutionToolResult().ifPresent(toolResult -> { - if (toolResult.content().isBetaBashCodeExecutionResultBlock()) { - BetaBashCodeExecutionResultBlock result = - toolResult.content().asBetaBashCodeExecutionResultBlock(); - for (BetaBashCodeExecutionOutputBlock output : result.content()) { + if (toolResult.content().isBashCodeExecutionResultBlock()) { + BashCodeExecutionResultBlock result = + toolResult.content().asBashCodeExecutionResultBlock(); + for (BashCodeExecutionOutputBlock output : result.content()) { fileIds.add(output.fileId()); } } @@ -828,6 +807,7 @@ When Claude saves files to its output directory during code execution (see [How ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $client = new Client(); // Request code execution that creates files @@ -880,9 +860,8 @@ When Claude saves files to its output directory during code execution (see [How ```ruby Ruby client = Anthropic::Client.new - response = client.beta.messages.create( + response = client.messages.create( model: Anthropic::Model::CLAUDE_OPUS_5, - betas: ["files-api-2025-04-14"], max_tokens: 4096, messages: [ { @@ -917,8 +896,8 @@ When Claude saves files to its output directory during code execution (see [How end extract_file_ids(response).each do |file_id| - file_metadata = client.beta.files.retrieve_metadata(file_id) - file_content = client.beta.files.download(file_id) + file_metadata = client.files.retrieve_metadata(file_id) + file_content = client.files.download(file_id) File.open(file_metadata.filename, "wb") do |f| f.write(file_content.read) @@ -1339,7 +1318,9 @@ Containers expire 30 days after creation. After about 5 minutes of inactivity a // Reuse the container from the first request so the file is still there. response2, err := client.Messages.New(ctx, anthropic.MessageNewParams{ - Container: anthropic.String(response1.Container.ID), + Container: anthropic.MessageCreateParamsContainerUnion{ + OfString: anthropic.String(response1.Container.ID), + }, Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, Messages: []anthropic.MessageParam{ @@ -1549,7 +1530,7 @@ To upgrade, update the tool type in your API requests: ## Data retention -Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.beta.files.download()`) persist until explicitly deleted. +Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.files.download()`) persist until explicitly deleted. For ZDR eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention). diff --git a/content/en/agents-and-tools/tool-use/computer-use-tool.md b/content/en/agents-and-tools/tool-use/computer-use-tool.md index 3abdaf71e2..4e916d5d79 100644 --- a/content/en/agents-and-tools/tool-use/computer-use-tool.md +++ b/content/en/agents-and-tools/tool-use/computer-use-tool.md @@ -1,40 +1,31 @@ --- title: Computer use tool url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool -description: Give Claude screenshot, mouse, and keyboard control of a desktop environment with the computer use tool. +description: Give Claude screenshot, mouse, and keyboard control of a desktop environment with the computer use tool, the computer_toolset_20260801 client toolset. --- ## Compatibility -- Status: Beta -- [Beta header](https://platform.claude.com/docs/en/api/beta-headers): `computer-use-2025-11-24` - [ZDR](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention): eligible (excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements)) -- Supported models: `claude-opus-5`, `claude-sonnet-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-opus-4-5-20251101` -- Platforms: Claude API (beta), Claude Platform on AWS (beta), Amazon Bedrock (beta), Google Cloud (beta), Microsoft Foundry (beta) +- Supported models: `claude-fable-5`, `claude-mythos-5`, `claude-opus-5`, `claude-sonnet-5`, `claude-opus-4-8` +- Platforms: Claude API, Claude Platform on AWS (beta), Amazon Bedrock (beta), Google Cloud (beta), Microsoft Foundry (beta) +- Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5 support computer use only through the earlier `computer_20251124` tool version, which requires a beta header; see [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions). +- Platforms other than the Claude API currently offer only the [earlier beta tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions). Claude can interact with computer environments through the computer use tool, which provides screenshot capabilities and mouse/keyboard control for autonomous desktop interaction. - - On Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), use the earlier `computer-use-2025-01-24` [beta header](https://platform.claude.com/docs/en/api/beta-headers) instead of `computer-use-2025-11-24`. - - Reach out through the [feedback form](https://forms.gle/H6UFuXaaLywri9hz6) to share your feedback on this feature. - +The computer use tool is an Anthropic-defined [client toolset](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets): one `{"type": "computer_toolset_20260801"}` entry in `tools` gives Claude 17 member tools such as `screenshot`, `left_click`, `type`, and `zoom`, and your application runs every call in an environment you control. It isn't currently available in [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/tools). Claude's calls are `tool_use` blocks whose `name` is the member and which carry `"toolset_name": "computer"`, often several per turn (a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions)). -## Overview +For tasks that stay inside webpages, the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) is the closer fit: its member tools read and act on the page itself, and it doesn't need a full desktop environment. -Computer use is a beta feature that enables Claude to interact with desktop environments. This tool provides: - -* **Screenshot capture:** See what's currently displayed on screen -* **Mouse control:** Click, drag, and move the cursor -* **Keyboard input:** Type text and use keyboard shortcuts -* **Desktop automation:** Interact with any application or interface - -While computer use can be augmented with other tools such as bash and text editor for more comprehensive automation workflows, computer use specifically refers to the computer use tool's capability to see and control desktop environments. + + Computer use is generally available on the Claude API as the `computer_toolset_20260801` toolset, with no beta header; see [Compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#compatibility) for the supported models. -For model support, see the [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference). + Existing `computer_20251124` integrations keep working, and earlier tool versions remain available in beta for models and platforms that don't support the toolset. See [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124) to upgrade, or [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) for the beta headers. + ## Security considerations -Computer use is a beta feature with unique risks distinct from standard API features. These risks are heightened when interacting with the internet. +Computer use has unique risks distinct from standard API features. These risks are heightened when interacting with the internet. To minimize risks, consider taking precautions such as: @@ -53,13 +44,9 @@ These precautions remain important even with the classifier defense layer in pla Inform end users of relevant risks and obtain their consent prior to enabling computer use in your own products. - - Get started with the computer use reference implementation that includes a web interface, Docker container, example tool implementations, and an agent loop. - - ## Quick start -Here's how to get started with computer use: +Add the computer use toolset to the `tools` array of a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request as `{"type": "computer_toolset_20260801"}`. The request needs no beta header. This example also declares the [text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) and [bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), which Claude typically uses alongside computer use: ```bash cURL @@ -67,17 +54,12 @@ Here's how to get started with computer use: -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: computer-use-2025-11-24" \ -d '{ "model": "claude-opus-5", "max_tokens": 1024, "tools": [ { - "type": "computer_20251124", - "name": "computer", - "display_width_px": 1024, - "display_height_px": 768, - "display_number": 1 + "type": "computer_toolset_20260801" }, { "type": "text_editor_20250728", @@ -98,15 +80,11 @@ Here's how to get started with computer use: ``` ```bash CLI - ant beta:messages create --beta computer-use-2025-11-24 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 1024 tools: - - type: computer_20251124 - name: computer - display_width_px: 1024 - display_height_px: 768 - display_number: 1 + - type: computer_toolset_20260801 - type: text_editor_20250728 name: str_replace_based_edit_tool - type: bash_20250124 @@ -120,22 +98,15 @@ Here's how to get started with computer use: ```python Python client = anthropic.Anthropic() - response = client.beta.messages.create( - model="claude-opus-5", # or another compatible model + response = client.messages.create( + model="claude-opus-5", max_tokens=1024, tools=[ - { - "type": "computer_20251124", - "name": "computer", - "display_width_px": 1024, - "display_height_px": 768, - "display_number": 1, - }, + {"type": "computer_toolset_20260801"}, {"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"}, {"type": "bash_20250124", "name": "bash"}, ], messages=[{"role": "user", "content": "Save a picture of a cat to my desktop."}], - betas=["computer-use-2025-11-24"], ) print(response) ``` @@ -143,16 +114,12 @@ Here's how to get started with computer use: ```typescript TypeScript const client = new Anthropic(); - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 1024, tools: [ { - type: "computer_20251124", - name: "computer", - display_width_px: 1024, - display_height_px: 768, - display_number: 1 + type: "computer_toolset_20260801" }, { type: "text_editor_20250728", @@ -163,84 +130,65 @@ Here's how to get started with computer use: name: "bash" } ], - messages: [{ role: "user", content: "Save a picture of a cat to my desktop." }], - betas: ["computer-use-2025-11-24"] + messages: [{ role: "user", content: "Save a picture of a cat to my desktop." }] }); console.log(response); ``` ```csharp C# - using Anthropic.Models.Beta.Messages; - using Messages = Anthropic.Models.Messages; - var client = new AnthropicClient(); var parameters = new MessageCreateParams { - Model = Messages::Model.ClaudeOpus5, + Model = Model.ClaudeOpus5, MaxTokens = 1024, - Tools = new BetaToolUnion[] - { - new BetaToolComputerUse20251124 - { - DisplayWidthPx = 1024, - DisplayHeightPx = 768, - DisplayNumber = 1 - }, - new BetaToolTextEditor20250728(), - new BetaToolBash20250124() - }, + Tools = + [ + new ComputerToolset20260801(), + new ToolTextEditor20250728(), + new ToolBash20250124(), + ], Messages = [ - new BetaMessageParam + new MessageParam { Role = Role.User, - Content = "Save a picture of a cat to my desktop." - } + Content = "Save a picture of a cat to my desktop.", + }, ], - Betas = ["computer-use-2025-11-24"] }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); Console.WriteLine(response); ``` ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Tools: []anthropic.BetaToolUnionParam{ - {OfComputerUseTool20251124: &anthropic.BetaToolComputerUse20251124Param{ - DisplayWidthPx: 1024, - DisplayHeightPx: 768, - DisplayNumber: anthropic.Int(1), - }}, - {OfTextEditor20250728: &anthropic.BetaToolTextEditor20250728Param{}}, - {OfBashTool20250124: &anthropic.BetaToolBash20250124Param{}}, - }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Save a picture of a cat to my desktop.")), + Tools: []anthropic.ToolUnionParam{ + {OfComputerToolset20260801: &anthropic.ComputerToolset20260801Param{}}, + {OfTextEditor20250728: &anthropic.ToolTextEditor20250728Param{}}, + {OfBashTool20250124: &anthropic.ToolBash20250124Param{}}, }, - Betas: []anthropic.AnthropicBeta{ - "computer-use-2025-11-24", // no SDK exposes a named constant for this beta yet + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Save a picture of a cat to my desktop.")), }, }) if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java - import com.anthropic.models.beta.messages.BetaMessage; - import com.anthropic.models.beta.messages.BetaToolBash20250124; - import com.anthropic.models.beta.messages.BetaToolComputerUse20251124; - import com.anthropic.models.beta.messages.BetaToolTextEditor20250728; - import com.anthropic.models.beta.messages.MessageCreateParams; - import com.anthropic.models.messages.Model; + import com.anthropic.models.messages.ComputerToolset20260801; + // ... + import com.anthropic.models.messages.ToolBash20250124; + import com.anthropic.models.messages.ToolTextEditor20250728; void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); @@ -248,18 +196,13 @@ Here's how to get started with computer use: MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(1024L) - .addTool(BetaToolComputerUse20251124.builder() - .displayWidthPx(1024L) - .displayHeightPx(768L) - .displayNumber(1L) - .build()) - .addTool(BetaToolTextEditor20250728.builder().build()) - .addTool(BetaToolBash20250124.builder().build()) + .addTool(ComputerToolset20260801.builder().build()) + .addTool(ToolTextEditor20250728.builder().build()) + .addTool(ToolBash20250124.builder().build()) .addUserMessage("Save a picture of a cat to my desktop.") - .addBeta("computer-use-2025-11-24") .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); IO.println(response); } ``` @@ -267,20 +210,14 @@ Here's how to get started with computer use: ```php PHP $client = new Client(); - $response = $client->beta->messages->create( + $response = $client->messages->create( maxTokens: 1024, messages: [ ['role' => 'user', 'content' => 'Save a picture of a cat to my desktop.'], ], model: 'claude-opus-5', tools: [ - [ - 'type' => 'computer_20251124', - 'name' => 'computer', - 'display_width_px' => 1024, - 'display_height_px' => 768, - 'display_number' => 1, - ], + ['type' => 'computer_toolset_20260801'], [ 'type' => 'text_editor_20250728', 'name' => 'str_replace_based_edit_tool', @@ -290,7 +227,6 @@ Here's how to get started with computer use: 'name' => 'bash', ], ], - betas: ['computer-use-2025-11-24'], ); echo $response; @@ -299,17 +235,11 @@ Here's how to get started with computer use: ```ruby Ruby client = Anthropic::Client.new - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, tools: [ - { - type: "computer_20251124", - name: "computer", - display_width_px: 1024, - display_height_px: 768, - display_number: 1 - }, + { type: "computer_toolset_20260801" }, { type: "text_editor_20250728", name: "str_replace_based_edit_tool" @@ -321,19 +251,47 @@ Here's how to get started with computer use: ], messages: [ { role: "user", content: "Save a picture of a cat to my desktop." } - ], - betas: ["computer-use-2025-11-24"] + ] ) puts response ``` - - A beta header is only required for the computer use tool. +When Claude acts on the desktop, the response has a `stop_reason` of `tool_use` and contains one or more member `tool_use` blocks, each naming a member tool and carrying `"toolset_name": "computer"`. Partway through this task, after Claude has seen a screenshot of the desktop, a response might look like this: - The preceding example shows all three tools being used together, which requires the beta header because it includes the computer use tool. - +```json Output +{ + "id": "msg_01UZ3bXcQH8mTqNhVfL9eK2p", + "type": "message", + "role": "assistant", + "model": "claude-opus-5", + "content": [ + { + "type": "text", + "text": "I'll open the web browser to find a picture of a cat." + }, + { + "type": "tool_use", + "id": "toolu_01WkoTUvSHDzTBu2xnGk8Ep8", + "name": "left_click", + "toolset_name": "computer", + "input": { "coordinate": [512, 742] } + }, + { + "type": "tool_use", + "id": "toolu_017nJn3RgSCkTMwuZDb4uUov", + "name": "screenshot", + "toolset_name": "computer", + "input": {} + } + ], + "stop_reason": "tool_use", + "stop_sequence": null +} +``` + +Your application runs each call in order in your own environment, returns one `tool_result` block per `tool_use` block, and calls the API again; [How computer use works](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#how-computer-use-works) describes that loop, and the rest of this page shows how to implement it. *** @@ -341,31 +299,123 @@ Here's how to get started with computer use: - * Add the computer use tool (and optionally other tools) to your API request. + * Add the computer use toolset (and optionally other tools) to the `tools` array of your API request. * Include a user prompt that requires desktop interaction, for example, "Save a picture of a cat to my desktop." - - * Claude assesses if the computer use tool can help with the user's query. - * If yes, Claude constructs a properly formatted tool use request. + + * Claude assesses whether acting on the desktop can help with the user's query. + * If so, Claude responds with one or more member `tool_use` blocks, such as `screenshot`, `left_click`, or `type`, each carrying `"toolset_name": "computer"`. A response with several of these blocks is a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions). * The API response has a `stop_reason` of `tool_use`, signaling a tool use request. - - * On your end, extract the tool name and input from Claude's request. - * Use the tool on a container or virtual machine. - * Continue the conversation with a new `user` message containing a `tool_result` content block. + + * Iterate over every `tool_use` block in the response, in order. For each one, dispatch on the member `name` together with `toolset_name`, and perform that action with the block's `input` on your container or virtual machine. + * Continue the conversation with a new `user` message that contains one `tool_result` block per `tool_use` block, matched by `tool_use_id` and each echoing `"toolset_name": "computer"`. Return an image for `screenshot` and `zoom`; a short text such as `OK` is enough for the other actions. + * If an action fails, return `is_error: true` for that block and answer the rest of the batch as described in [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions). - - * Claude analyzes the tool results to determine if more tool use is needed or the task has been completed. - * If Claude determines another tool is needed, it responds with another `tool_use` `stop_reason` and you should return to step 3. - * Otherwise, it crafts a text response to the user. + + * Claude analyzes the tool results to determine if more actions are needed or the task has been completed. + * If Claude determines more actions are needed, it responds with another `tool_use` `stop_reason` and you should return to step 3. + * Otherwise, it returns a text response to the user. The repetition of steps 3 and 4 without user input is referred to as the "agent loop" (that is, Claude responding with a tool use request and your application responding to Claude with the results of evaluating that request). +### Batch actions + +Claude can plan a short sequence of actions, such as click, type, and then take a screenshot, and return them together in one response. This is called a batch action; it uses the same response shape as [parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use) with one difference: you run the blocks in order rather than concurrently. + +A response with a three-action batch looks like this: + +```json +{ + "role": "assistant", + "content": [ + { + "type": "tool_use", + "id": "toolu_01HqCF3nJ4Vzr8sTkPZ2wxYA", + "name": "left_click", + "toolset_name": "computer", + "input": { "coordinate": [640, 60] } + }, + { + "type": "tool_use", + "id": "toolu_01Ppr3sZ3TnE9m6VUu4RyH2K", + "name": "type", + "toolset_name": "computer", + "input": { "text": "pictures of cats" } + }, + { + "type": "tool_use", + "id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ", + "name": "screenshot", + "toolset_name": "computer", + "input": {} + } + ] +} +``` + +Return one `tool_result` block for each `tool_use` block, matched by `tool_use_id`, all in the next `user` message. Every result for a member tool must carry `"toolset_name": "computer"`; a result that omits it, or that names a different toolset than its `tool_use` block, is rejected. Only `screenshot` and `zoom` results need an image; for the other members, a short text acknowledgment such as `OK` is enough (`cursor_position` returns the coordinates as text): + +```json +{ + "role": "user", + "content": [ + { + "type": "tool_result", + "tool_use_id": "toolu_01HqCF3nJ4Vzr8sTkPZ2wxYA", + "toolset_name": "computer", + "content": [{ "type": "text", "text": "OK" }] + }, + { + "type": "tool_result", + "tool_use_id": "toolu_01Ppr3sZ3TnE9m6VUu4RyH2K", + "toolset_name": "computer", + "content": [{ "type": "text", "text": "OK" }] + }, + { + "type": "tool_result", + "tool_use_id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ", + "toolset_name": "computer", + "content": [ + { + "type": "image", + "source": { + "type": "base64", + "media_type": "image/png", + "data": "iVBORw0KGgo..." + } + } + ] + } + ] +} +``` + +**Run blocks in order and stop at the first failure.** Later actions in a batch usually depend on earlier ones: the `type` in this example enters text into whatever the preceding click focused. Run the blocks sequentially in the order they appear in `content`, and if one fails, don't run the rest. Every `tool_use` block still needs a `tool_result`, so answer the batch as follows: + +* For each action that succeeded, return its normal result. +* For the action that failed, return `is_error: true` with a text description of what went wrong. +* For every later action in the batch, return `is_error: true` with exactly this text (the browser use tool uses its own [halt text](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions)): + +```json +{ + "type": "tool_result", + "tool_use_id": "toolu_01Xf5W1sD8Q9aBcJ7kLmN2pQ", + "toolset_name": "computer", + "is_error": true, + "content": "Not executed: an earlier computer action in this turn failed." +} +``` + +Claude then sees which actions succeeded, which one failed, and which were skipped, and replans on its next turn. A request that leaves any `tool_use` block in the batch unanswered is rejected with an `invalid_request_error`, so an agent loop that reads only the first block fails on its next call. If your application asks a human to confirm consequential actions, make that check before each block runs, because a batch can complete a multistep action within one turn. + +Claude typically finishes a batch with `screenshot` so it can observe the outcome before deciding what to do next. When a batch doesn't end with one, your application can attach a screenshot as an extra `image` block on the last result in the batch so that Claude always sees the current state of the screen, which saves a round trip compared with waiting for Claude to ask. You can also prompt Claude to end every batch with a screenshot (see [Optimize model performance with prompting](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#optimize-model-performance-with-prompting)). + ### The computing environment Computer use requires a sandboxed computing environment where Claude can safely interact with applications and the web. This environment includes: @@ -393,54 +443,40 @@ For security and isolation, the reference implementation runs all of this inside ## How to implement computer use -### Start with the reference implementation - -A [reference implementation](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) is available that includes everything you need to get started with computer use: +Upgrading an existing `computer_20251124` integration? Start with [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124); the rest of this section applies to both new and migrated integrations. -* A [containerized environment](https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo/Dockerfile) suitable for computer use with Claude -* Implementations of [the computer use tools](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo/computer_use_demo/tools) -* An [agent loop](https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo/computer_use_demo/loop.py) that interacts with the Claude API and runs the computer use tools -* A web interface to interact with the container, agent loop, and tools. + + The [computer use reference implementation](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) is a complete working example: a [containerized environment](https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo/Dockerfile) suitable for computer use, implementations of [the computer use tools](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo/computer_use_demo/tools), an [agent loop](https://github.com/anthropics/anthropic-quickstarts/blob/main/computer-use-demo/computer_use_demo/loop.py) that calls the Claude API and runs the tools, and a web interface for the container, loop, and tools. + ### Understand the agent loop -The core of computer use is the "agent loop": a cycle where Claude requests tool actions, your application runs them, and returns results to Claude. The loop uses the client you created in the [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#quick-start), a tool list shaped like the Quick start's `tools` array, and the tool-call processing helper defined in [Process Claude's tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#implement-the-computer-use-tool). Here's a simplified example: - - - ```bash cURL - # The agent loop is a stateful, multi-turn pattern that doesn't translate to a - # one-off shell command. See the SDK tabs for the implementation. - ``` - - ```bash CLI - # The agent loop is a stateful, multi-turn pattern that doesn't translate to a - # one-off shell command. See the SDK tabs for the implementation. - ``` +The core of computer use is the "agent loop": a cycle where Claude requests tool actions, your application runs them, and returns results to Claude. The loop uses the client you created in the [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#quick-start), a `tools` array that declares only the computer use toolset, and the tool-call processing helper under [Implement the computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#implement-the-computer-use-tool). If you also declare other tools, such as the Quick start's bash and text editor tools, dispatch their `tool_use` blocks in the same pass; the helper answers only computer use member calls, and the loop treats a turn with no answered calls as finished. Here's a simplified example: + ```python Python - def sampling_loop(model, messages, max_iterations=10): + def sampling_loop(model: str, messages: list[MessageParam], max_iterations: int = 10): """ Run the computer-use agent loop until Claude stops requesting tools or the iteration limit is reached. """ for _ in range(max_iterations): - response = client.beta.messages.create( + response = client.messages.create( model=model, max_tokens=4096, messages=messages, tools=TOOLS, - betas=["computer-use-2025-11-24"], ) # Add Claude's response to the conversation history messages.append({"role": "assistant", "content": response.content}) - # Run any tools Claude requested and collect results + # Run the actions Claude requested, in order, and collect the results tool_results = process_tool_calls(response) if not tool_results: return messages # No more tool use; task complete - # Send tool results back to Claude for the next iteration + # Send every result back to Claude in a single user message messages.append({"role": "user", "content": tool_results}) return messages @@ -449,18 +485,17 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool ```typescript TypeScript async function samplingLoop( model: string, - messages: Anthropic.Beta.BetaMessageParam[], + messages: Anthropic.MessageParam[], maxIterations = 10, - ): Promise { + ): Promise { // Run the computer-use agent loop until Claude stops requesting tools // or the iteration limit is reached. for (let i = 0; i < maxIterations; i++) { - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model, max_tokens: 4096, messages, tools, - betas: ["computer-use-2025-11-24"], }); // Add Claude's response to the conversation history @@ -481,9 +516,9 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool ``` ```csharp C# - async Task> SamplingLoop( + async Task> SamplingLoop( Model model, - List messages, + List messages, int maxIterations = 10 ) { @@ -491,14 +526,13 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool // or the iteration limit is reached. for (var i = 0; i < maxIterations; i++) { - var response = await client.Beta.Messages.Create( + var response = await client.Messages.Create( new MessageCreateParams { Model = model, MaxTokens = 4096, Messages = messages, Tools = tools, - Betas = ["computer-use-2025-11-24"], } ); @@ -508,7 +542,7 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool { Role = Role.Assistant, Content = response - .Content.Select(block => new BetaContentBlockParam(block.Json)) + .Content.Select(block => new ContentBlockParam(block.Json)) .ToList(), } ); @@ -531,14 +565,13 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool ```go Go // samplingLoop runs the computer-use agent loop until Claude stops // requesting tools or the iteration limit is reached. - func samplingLoop(ctx context.Context, model anthropic.Model, messages []anthropic.BetaMessageParam, maxIterations int) ([]anthropic.BetaMessageParam, error) { + func samplingLoop(ctx context.Context, model anthropic.Model, messages []anthropic.MessageParam, maxIterations int) ([]anthropic.MessageParam, error) { for range maxIterations { - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(ctx, anthropic.MessageNewParams{ Model: model, MaxTokens: 4096, Messages: messages, Tools: tools, - Betas: []anthropic.AnthropicBeta{"computer-use-2025-11-24"}, }) if err != nil { return nil, err @@ -547,17 +580,14 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool // Add Claude's response to the conversation history messages = append(messages, response.ToParam()) - // Run any tools Claude requested and collect results + // Run the actions Claude requested, in order, and collect the results toolResults := processToolCalls(response) if len(toolResults) == 0 { return messages, nil // No more tool use; task complete } - // Send tool results back to Claude for the next iteration - messages = append(messages, anthropic.BetaMessageParam{ - Role: anthropic.BetaMessageParamRoleUser, - Content: toolResults, - }) + // Send every result back to Claude in a single user message + messages = append(messages, anthropic.NewUserMessage(toolResults...)) } return messages, nil } @@ -569,33 +599,31 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool * Run the computer-use agent loop until Claude stops requesting tools * or the iteration limit is reached. */ - List samplingLoop(Model model, List messages, int maxIterations) { + List samplingLoop(Model model, List messages, int maxIterations) { for (int i = 0; i < maxIterations; i++) { - BetaMessage response = client.beta().messages().create(MessageCreateParams.builder() + Message response = client.messages().create(MessageCreateParams.builder() .model(model) .maxTokens(4096) .messages(messages) - .addTool(COMPUTER_TOOL) - .addBeta("computer-use-2025-11-24") + .addTool(COMPUTER_TOOLSET) .build()); // Add Claude's response to the conversation history - messages.add(BetaMessageParam.builder() - .role(BetaMessageParam.Role.ASSISTANT) - .contentOfBetaContentBlockParams( - response.content().stream().map(BetaContentBlock::toParam).toList()) + messages.add(MessageParam.builder() + .role(MessageParam.Role.ASSISTANT) + .contentOfBlockParams(response.content().stream().map(ContentBlock::toParam).toList()) .build()); // Run any tools Claude requested and collect results - List toolResults = processToolCalls(response); + List toolResults = processToolCalls(response); if (toolResults.isEmpty()) { return messages; // No more tool use; task complete } // Send tool results back to Claude for the next iteration - messages.add(BetaMessageParam.builder() - .role(BetaMessageParam.Role.USER) - .contentOfBetaContentBlockParams(toolResults) + messages.add(MessageParam.builder() + .role(MessageParam.Role.USER) + .contentOfBlockParams(toolResults) .build()); } return messages; @@ -612,16 +640,15 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool global $client, $tools; for ($i = 0; $i < $maxIterations; $i++) { - $response = $client->beta->messages->create( + $response = $client->messages->create( model: $model, maxTokens: 4096, messages: $messages, tools: $tools, - betas: ['computer-use-2025-11-24'], ); // Add Claude's response to the conversation history - $messages[] = BetaMessageParam::with(role: Role::ASSISTANT, content: $response->content); + $messages[] = MessageParam::with(role: Role::ASSISTANT, content: $response->content); // Run any tools Claude requested and collect results $toolResults = processToolCalls($response); @@ -630,7 +657,7 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool } // Send tool results back to Claude for the next iteration - $messages[] = BetaMessageParam::with(role: Role::USER, content: $toolResults); + $messages[] = MessageParam::with(role: Role::USER, content: $toolResults); } return $messages; @@ -642,23 +669,22 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool # or the iteration limit is reached. def sampling_loop(model, messages, max_iterations: 10) max_iterations.times do - response = CLIENT.beta.messages.create( + response = CLIENT.messages.create( model: model, max_tokens: 4096, messages: messages, - tools: TOOLS, - betas: ["computer-use-2025-11-24"] + tools: TOOLS ) # Add Claude's response to the conversation history - messages << {role: "assistant", content: response.content} + messages << { role: "assistant", content: response.content } - # Run any tools Claude requested and collect results + # Run the actions Claude requested, in order, and collect the results tool_results = process_tool_calls(response) return messages if tool_results.empty? # No more tool use; task complete - # Send tool results back to Claude for the next iteration - messages << {role: "user", content: tool_results} + # Send every result back to Claude in a single user message + messages << { role: "user", content: tool_results } end messages @@ -668,19 +694,16 @@ The core of computer use is the "agent loop": a cycle where Claude requests tool The loop continues until either Claude responds without requesting any tools (task completion) or the maximum iteration limit is reached. This safeguard prevents potential infinite loops that could result in unexpected API costs. -Try the reference implementation out before reading the rest of this documentation. - ### Optimize model performance with prompting -Here are some tips on how to get the best quality outputs: - 1. Specify simple, well-defined tasks and provide explicit instructions for each step. 2. Claude sometimes assumes outcomes of its actions without explicitly checking their results. To prevent this you can prompt Claude with `After each step, take a screenshot and carefully evaluate if you have achieved the right outcome. Explicitly show your thinking: "I have evaluated step X..." If not correct, try again. Only when you confirm a step was executed correctly should you move on to the next one.` 3. Some UI elements (such as dropdowns and scrollbars) might be tricky for Claude to manipulate using mouse movements. If you experience this, try prompting the model to use keyboard shortcuts. 4. For repeatable tasks or UI interactions, include example screenshots and tool calls of successful outcomes in your prompt. 5. If you need the model to log in, provide it with the username and password in your prompt inside XML tags such as ``. Using computer use within applications that require login increases the risk of bad outcomes as a result of prompt injection. Review [Mitigate jailbreaks and prompt injections](https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/mitigate-jailbreaks) before providing the model with login credentials. 6. When constructing a user turn's `content` array, place the instruction text *before* the screenshot image. Providing the target description before the image is processed improves click accuracy. -7. When using `computer_20251124` with `enable_zoom: true` set, Claude zooms in on a region when asked about small text or specific UI elements that aren't legible at the screenshot's default resolution, such as file names in a sidebar, tab titles, status-bar text, line numbers, or button labels. If Claude isn't zooming when you expect, ask about a specific region or element rather than the screen as a whole. +7. Claude uses the `zoom` action to inspect a region at full resolution when asked about small text or specific UI elements that aren't legible at the screenshot's default resolution, such as file names in a sidebar, tab titles, status-bar text, line numbers, or button labels. If Claude isn't zooming when you expect, ask about a specific region or element rather than the screen as a whole. +8. If you want every [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions) to end with a screenshot, say so in the system prompt, for example, `End each group of actions with a screenshot so you can verify the result before continuing.` If you repeatedly encounter a clear set of issues or know in advance the tasks Claude will need to complete, use the system prompt to provide Claude with explicit tips or instructions on how to do the tasks successfully. @@ -692,7 +715,7 @@ Here are some tips on how to get the best quality outputs: ### System prompts -When one of the Anthropic-schema tools is requested through the Claude API, a computer use-specific system prompt is generated. It's similar to the [tool use system prompt](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#tool-use-system-prompt) but starts with: +When you include the computer use tool in a request, the API generates a computer use-specific system prompt. It's similar to the [tool use system prompt](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#tool-use-system-prompt) but starts with: > You have access to a set of functions you can use to answer the user's question. This includes access to a sandboxed computing environment. You do NOT currently have the ability to inspect files or interact with external resources, except by invoking the below functions. @@ -700,148 +723,152 @@ As with regular tool use, the user-provided `system` parameter is still respecte ### Available actions -The computer use tool supports these actions: - -**Basic actions (all versions)** - -* **screenshot:** Capture the current display -* **left\_click:** Click at coordinates `[x, y]` -* **type:** Type text string -* **key:** Press key or key combination (for example, "ctrl+s") -* **mouse\_move:** Move cursor to coordinates - -**Enhanced actions (`computer_20250124` and later)** Available in `computer_20250124` and `computer_20251124`: - -* **scroll:** Scroll in any direction with amount control -* **left\_click\_drag:** Click and drag between coordinates -* **right\_click**, **middle\_click:** Additional mouse buttons -* **double\_click**, **triple\_click:** Multiple clicks -* **left\_mouse\_down**, **left\_mouse\_up:** Fine-grained click control -* **hold\_key:** Hold down a key for a specified duration (in seconds) -* **wait:** Pause between actions - -**Enhanced actions (`computer_20251124`)** Available in Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5: - -* All actions from `computer_20250124` -* **zoom:** View a specific region of the screen at full resolution. Requires `enable_zoom: true` in tool definition. Takes a `region` parameter with coordinates `[x1, y1, x2, y2]` defining top-left and bottom-right corners of the area to inspect. +Each action is a member tool of the computer use toolset: Claude names the member in a `tool_use` block that carries `"toolset_name": "computer"`, and the block's `input` holds only that member's parameters, with no `action` field. The toolset has 17 member tools: + +| Member | Input | Description | +| ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `screenshot` | None (`{}`) | Capture the full display and return it as an image. | +| `zoom` | `region`: `[x0, y0, x1, y1]`, the top-left and bottom-right corners of the area to inspect | Capture only that region of the display at full resolution and return it as an image, scaled to fit within your usual screenshot dimensions with its aspect ratio preserved. This lets Claude read small text or dense UI that isn't legible in a downscaled full screenshot. | +| `left_click` | `coordinate` (optional): `[x, y]`; `text` (optional): modifier keys to hold during the click: `shift`, `ctrl`, `alt`, `super` (the Command or Windows key), or a `+`-joined combination such as `ctrl+shift` | Click the left mouse button at `coordinate`, or at the current cursor position when `coordinate` is omitted. | +| `right_click`, `middle_click`, `double_click`, `triple_click` | Same as `left_click` | Other mouse buttons and multiple clicks. | +| `left_click_drag` | `start_coordinate`: `[x, y]`; `coordinate`: `[x, y]`; `text` (optional): modifier keys | Press at `start_coordinate`, drag to `coordinate`, and release. | +| `mouse_move` | `coordinate`: `[x, y]` | Move the cursor without clicking, for example, to hover. | +| `left_mouse_down`, `left_mouse_up` | None (`{}`) | Press or release the left mouse button at the current cursor position, for drags that `left_click_drag` can't express. Move the cursor with `mouse_move` first. | +| `cursor_position` | None (`{}`) | Report the cursor's current `[x, y]` position as text. | +| `scroll` | `scroll_direction`: `"up"`, `"down"`, `"left"`, or `"right"`; `scroll_amount`: number of scroll-wheel clicks; `coordinate` (optional): `[x, y]`; `text` (optional): modifier keys | Scroll at `coordinate`, or at the current cursor position. | +| `type` | `text`: the string to type | Type literal text at the current keyboard focus. | +| `key` | `text`: a key or a `+`-joined combination such as `"Return"`, `"ctrl+s"`, or `"alt+Tab"`; `repeat` (optional): 1 to 100, default 1 | Press a key or key combination, `repeat` times. | +| `hold_key` | `text`: a key or combination; `duration`: seconds, up to 300 | Hold a key down for the given duration. | +| `wait` | `duration`: seconds, up to 300 | Pause before the next action, for example, while an application loads. | + +Keep the following in mind when implementing the members: + +* **Coordinates are in screenshot pixels.** Every `coordinate`, `start_coordinate`, and `region` value, and the position that `cursor_position` reports, is in the pixel space of the full-display screenshots you return, with the origin at the top left. Zoom images don't change this: after a `zoom`, Claude still expresses coordinates in the full screenshot's space, never relative to the zoomed image. If you scale screenshots down before returning them, scale Claude's coordinates back up before applying them to the real display (see [Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions)). +* **All members are enabled by default, including `zoom`.** If your environment can't produce zoom images, withhold the member with `configs` (see [Tool parameters](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#tool-parameters)) rather than leaving it enabled and returning errors. If Claude calls a member that you have withheld or don't implement, return a `tool_result` with `is_error: true` for that block. +* **Dispatch on the pair (`toolset_name`, `name`).** `toolset_name` is what marks a block as a computer action: a custom tool in the same request can share a member's name, and a later toolset version can add members (see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets)). - Take a screenshot: - - ```json - { - "action": "screenshot" - } - ``` + Each example is a complete `tool_use` block as it appears in Claude's response. - Click at position: + Shift+click at a position, for example, to extend a selection. Unlike `hold_key`, `text` holds the modifiers only for the duration of that click or scroll: ```json { - "action": "left_click", - "coordinate": [500, 300] + "type": "tool_use", + "id": "toolu_01Qg8m3XqC5aRy7tD2eS4jUg", + "name": "left_click", + "toolset_name": "computer", + "input": { "coordinate": [500, 300], "text": "shift" } } ``` - Type text: + Drag from one point to another: ```json { - "action": "type", - "text": "Hello, world!" + "type": "tool_use", + "id": "toolu_01Ed6j9VnA3yPw5rB8cQ2gSe", + "name": "left_click_drag", + "toolset_name": "computer", + "input": { + "start_coordinate": [200, 300], + "coordinate": [600, 300] + } } ``` - Scroll down: + Scroll down three clicks of the wheel: ```json { - "action": "scroll", - "coordinate": [500, 400], - "scroll_direction": "down", - "scroll_amount": 3 + "type": "tool_use", + "id": "toolu_01Yc5h8UmZ2xNv4qA7bP9fRd", + "name": "scroll", + "toolset_name": "computer", + "input": { + "coordinate": [500, 400], + "scroll_direction": "down", + "scroll_amount": 3 + } } ``` - Zoom to view region in detail (Claude Opus 5, Sonnet 5, Opus 4.8, Opus 4.7, Opus 4.6, Sonnet 4.6, and Opus 4.5): + Press Tab four times: ```json { - "action": "zoom", - "region": [100, 200, 400, 350] + "type": "tool_use", + "id": "toolu_01Sb4g7TkY9wLu3pX6zM8eQc", + "name": "key", + "toolset_name": "computer", + "input": { "text": "Tab", "repeat": 4 } } ``` - - - To hold modifier keys (such as Shift, Ctrl, or Alt) while performing click or scroll actions, use the `text` parameter on those actions. This is different from `hold_key`, which holds a key for a duration without performing other actions. - - Shift+click (for example, to select a range of items): + Zoom in to inspect a region at full resolution: ```json { - "action": "left_click", - "coordinate": [500, 300], - "text": "shift" + "type": "tool_use", + "id": "toolu_01Kf7k2WpB4zQx6sC9dR3hTf", + "name": "zoom", + "toolset_name": "computer", + "input": { "region": [100, 200, 400, 350] } } ``` - Ctrl+click (for example, to multi-select on Windows/Linux): + Report the cursor position. Answer this call with a short text result that gives the position in screenshot pixels, for example, `X=512, Y=384`: ```json { - "action": "left_click", - "coordinate": [500, 300], - "text": "ctrl" + "type": "tool_use", + "id": "toolu_01Ekh3vqB6yTs2mNc4Rw8pLd", + "name": "cursor_position", + "toolset_name": "computer", + "input": {} } ``` + - Cmd+click (for example, to multi-select on macOS): +### Tool parameters - ```json - { - "action": "left_click", - "coordinate": [500, 300], - "text": "super" - } - ``` +The toolset entry in the `tools` array accepts four parameters; the rules they share with the browser use toolset are listed under [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). - Shift+scroll (for example, to scroll horizontally): +| Parameter | Required | Description | +| ----------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `type` | Yes | `computer_toolset_20260801` | +| `configs` | No | Per-member settings keyed by member name; each member accepts `enabled` (default `true` for all 17, including `zoom`) and `defer_loading` (default `false`, for [tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#deferred-tool-loading)), and members you omit keep their defaults. | +| `cache_control` | No | [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) breakpoint at the toolset definition; entry only. A breakpoint on any `tool_use` or `tool_result` block in a batch takes effect at the end of that batch; see [Tool use with prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching#cache-control-on-tool-definitions). | +| `allowed_callers` | No | `["direct"]` only. | - ```json - { - "action": "scroll", - "coordinate": [500, 400], - "scroll_direction": "down", - "scroll_amount": 3, - "text": "shift" - } - ``` +For example, this entry withholds `zoom` for an environment that doesn't implement it and sets a cache breakpoint at the toolset definition: - The `text` parameter in click/scroll actions accepts modifier keys such as `shift`, `ctrl`, `alt`, and `super` (for the Command/Windows key). - +```json +{ + "type": "computer_toolset_20260801", + "configs": { + "zoom": { "enabled": false } + }, + "cache_control": { "type": "ephemeral" } +} +``` -### Tool parameters +If your agent loop can run only one action per round trip, set `disable_parallel_tool_use` to `true` in `tool_choice`; Claude then returns at most one member `tool_use` block per turn (see [Disable parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use#disable-parallel-tool-use)). -| Parameter | Required | Description | -| ------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `type` | Yes | Tool version (`computer_20251124` or `computer_20250124`) | -| `name` | Yes | Must be "computer" | -| `display_width_px` | Yes | Display width in pixels | -| `display_height_px` | Yes | Display height in pixels | -| `display_number` | No | Display number for X11 environments | -| `enable_zoom` | No | Enable zoom action (`computer_20251124` only). Set to `true` to allow Claude to zoom into specific screen regions. Default: `false` | +The entry rejects these parameters from earlier tool versions, and a request that includes any of them returns an `invalid_request_error`: - - **Important:** Your application must explicitly run the computer use tool; Claude cannot run it directly. You are responsible for implementing the screenshot capture, mouse movements, keyboard inputs, and other actions based on Claude's requests. - +* `name`: member names are fixed by the toolset version. +* `display_width_px`, `display_height_px`, and `display_number`: coordinates are always in the pixel space of the screenshots you return. +* `enable_zoom`: zoom is a member tool that you control through `configs`. + +The entry also can't be declared in the same request as a `computer_20251124` entry or another tool named `computer`. For `strict`, `input_examples`, `defer_loading` placement, `tool_choice`, streaming, and caller restrictions, see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). ### Combining with thinking For combining computer use with thinking, see [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking). - For computer use specifically, internal benchmarking suggests these `effort` settings: + For the earlier `computer_20251124` tool, internal benchmarking on the models that use it suggests these `effort` settings: * **Claude Opus 4.7:** use `high` as the default; use `low` for high-throughput or cost-sensitive workloads. * **Claude Sonnet 4.6 and Claude Opus 4.6:** use `medium` as the default (best accuracy-to-cost ratio). Avoid `max`, which adds token cost without improving accuracy on UI tasks. On these models, `low` uses *fewer* output tokens than disabling thinking entirely (fewer mistakes mean fewer retries), making it a strong option for cost-sensitive loops. @@ -851,16 +878,18 @@ For combining computer use with thinking, see [Thinking](https://platform.claude To add other tools alongside computer use, include them in the same `tools` array. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#quick-start) section shows this pattern with the [bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) and [text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool). You can add your own [custom tool definitions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools) the same way. +For tasks that stay inside webpages, you can also [declare the browser use tool in the same request](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#combine-with-other-tools): the two toolsets work independently, each in its own coordinate frame, and calls to members that share a name, such as `screenshot` or `key`, are told apart by `toolset_name`. + ### Build a custom computer use environment The [reference implementation](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) is meant to help you get started with computer use. It includes all of the components needed to have Claude use a computer. However, you can build your own environment for computer use to suit your needs. You'll need: * A virtualized or containerized environment suitable for computer use with Claude -* An implementation of at least one of the Anthropic-schema computer use tools +* An implementation of the computer use tool's actions * An agent loop that interacts with the Claude API and runs the `tool_use` results using your tool implementations * An API or UI that allows user input to start the agent loop -#### Implement the computer use tool +### Implement the computer use tool The computer use tool is implemented as a schema-less tool. When using this tool, you don't need to provide an input schema as with other tools; the schema is built into Claude's model and can't be modified. @@ -872,23 +901,26 @@ The computer use tool is implemented as a schema-less tool. When using this tool Create functions to handle each action type that Claude might request: - - ```bash cURL - # This is application-side helper code with no API request. See the SDK tabs - # for the pattern. - ``` + + ```python Python + # Placeholder image data; a real executor captures the screen and returns the PNG bytes + PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" - ```bash CLI - # This is application-side helper code with no API request. See the SDK tabs - # for the pattern. - ``` - ```python Python - def capture_screenshot(): - return "" + def capture_screenshot() -> list[ImageBlockParam]: + # screenshot answers with an image block rather than text: return the result content list + return [ + { + "type": "image", + "source": {"type": "base64", "media_type": "image/png", "data": PLACEHOLDER_PNG}, + } + ] - def click_at(x, y): + def click(coordinate=None): + if coordinate is None: + return "clicked at current cursor" + x, y = coordinate return f"clicked at ({x}, {y})" @@ -896,136 +928,251 @@ The computer use tool is implemented as a schema-less tool. When using this tool return f"typed: {text}" - def handle_computer_action(action_type, params): - if action_type == "screenshot": + def handle_computer_action(name, tool_input): + if name == "screenshot": return capture_screenshot() - elif action_type == "left_click": - x, y = params["coordinate"] - return click_at(x, y) - elif action_type == "type": - return type_text(params["text"]) + elif name == "left_click": + # coordinate is optional; without it, click where the cursor already is + return click(tool_input.get("coordinate")) + elif name == "type": + return type_text(tool_input["text"]) # Handle other actions as needed - return f"unhandled action: {action_type}" + raise ValueError(f"Unknown or unimplemented member: {name}") ``` ```typescript TypeScript - function captureScreenshot(): string { - return ""; + // Placeholder image data; a real executor captures the screen as PNG bytes + const PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + function captureScreenshot(): Anthropic.ImageBlockParam[] { + // screenshot answers with an image block rather than text + return [ + { + type: "image", + source: { + type: "base64", + media_type: "image/png", + data: PLACEHOLDER_PNG, + }, + }, + ]; } function clickAt(x: number, y: number): string { return `clicked at (${x}, ${y})`; } + function clickAtCursor(): string { + return "clicked at the current cursor position"; + } + function typeText(text: string): string { return `typed: ${text}`; } function handleComputerAction( - actionType: string, - params: Record, - ): string { - if (actionType === "screenshot") { + action: string, + input: unknown, + ): string | Anthropic.ImageBlockParam[] { + const params: object = + typeof input === "object" && input !== null ? input : {}; + if (action === "screenshot") { return captureScreenshot(); - } else if (actionType === "left_click") { - const [x, y] = params.coordinate as [number, number]; - return clickAt(x, y); - } else if (actionType === "type") { - return typeText(params.text as string); + } else if (action === "left_click") { + // coordinate is optional on the toolset; without one, click at the cursor + if ("coordinate" in params && Array.isArray(params.coordinate)) { + const [x, y] = params.coordinate; + return clickAt(x, y); + } + return clickAtCursor(); + } else if (action === "type" && "text" in params) { + return typeText(String(params.text)); } // Handle other actions as needed - return `unhandled action: ${actionType}`; + throw new Error(`Unknown or unimplemented member: ${action}`); } ``` ```csharp C# - string CaptureScreenshot() => ""; + // Placeholder image data; a real executor captures the screen and returns the PNG bytes + const string PlaceholderPng = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + // screenshot answers with an image block rather than text: return the result content list + List CaptureScreenshot() => + [ + new ImageBlockParam( + new Base64ImageSource { Data = PlaceholderPng, MediaType = MediaType.ImagePng } + ), + ]; string ClickAt(int x, int y) => $"clicked at ({x}, {y})"; + string ClickAtCursor() => "clicked at the current cursor position"; + string TypeText(string text) => $"typed: {text}"; - string HandleComputerAction(string actionType, IReadOnlyDictionary input) => - actionType switch + ToolResultBlockParamContent HandleComputerAction( + string action, + IReadOnlyDictionary input + ) => + action switch { "screenshot" => CaptureScreenshot(), - "left_click" => ClickAt( - input["coordinate"][0].GetInt32(), - input["coordinate"][1].GetInt32() + // coordinate is optional on click members; without it, click where the cursor is + "left_click" when input.TryGetValue("coordinate", out var xy) => ClickAt( + xy[0].GetInt32(), + xy[1].GetInt32() ), + "left_click" => ClickAtCursor(), "type" => TypeText(input["text"].GetString()!), // Handle other actions as needed - _ => $"unhandled action: {actionType}", + _ => throw new NotSupportedException($"Unknown or unimplemented member: {action}"), }; ``` ```go Go - func captureScreenshot() string { - return "" + // placeholderPNG stands in for a real capture: an executor returns the + // screen as base64-encoded PNG data. + const placeholderPNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" + + // captureScreenshot returns an image block rather than text. + func captureScreenshot() []anthropic.ToolResultBlockParamContentUnion { + return []anthropic.ToolResultBlockParamContentUnion{{ + OfImage: &anthropic.ImageBlockParam{ + Source: anthropic.ImageBlockParamSourceUnion{ + OfBase64: &anthropic.Base64ImageSourceParam{ + MediaType: anthropic.Base64ImageSourceMediaTypeImagePNG, + Data: placeholderPNG, + }, + }, + }, + }} + } + + // textContent wraps text as tool_result content. + func textContent(text string) []anthropic.ToolResultBlockParamContentUnion { + return []anthropic.ToolResultBlockParamContentUnion{ + {OfText: &anthropic.TextBlockParam{Text: text}}, + } } func clickAt(x, y int) string { return fmt.Sprintf("clicked at (%d, %d)", x, y) } + func clickAtCursor() string { + return "clicked at the current cursor position" + } + func typeText(text string) string { return fmt.Sprintf("typed: %s", text) } - func handleComputerAction(actionType string, params map[string]any) string { - switch actionType { + func handleComputerAction(action string, params map[string]any) ([]anthropic.ToolResultBlockParamContentUnion, error) { + switch action { case "screenshot": - return captureScreenshot() + return captureScreenshot(), nil case "left_click": - coord := params["coordinate"].([]any) - return clickAt(int(coord[0].(float64)), int(coord[1].(float64))) + // coordinate is optional; without it, click where the cursor already is + coord, ok := params["coordinate"].([]any) + if !ok { + return textContent(clickAtCursor()), nil + } + if len(coord) == 2 { + x, xok := coord[0].(float64) + y, yok := coord[1].(float64) + if xok && yok { + return textContent(clickAt(int(x), int(y))), nil + } + } case "type": - return typeText(params["text"].(string)) + if text, ok := params["text"].(string); ok { + return textContent(typeText(text)), nil + } // Handle other actions as needed default: - return fmt.Sprintf("unhandled action: %s", actionType) + return nil, fmt.Errorf("unknown or unimplemented member: %s", action) } + // Reached when a member's input is missing a field or a field has the wrong type + return nil, fmt.Errorf("invalid input for %s", action) } ``` ```java Java - String captureScreenshot() { - return ""; + /** Placeholder pixels; a real executor captures the screen and base64-encodes the PNG. */ + static final String PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=="; + + ToolResultBlockParam.Content captureScreenshot() { + ImageBlockParam image = ImageBlockParam.builder() + .source(Base64ImageSource.builder() + .mediaType(Base64ImageSource.MediaType.IMAGE_PNG) + .data(PLACEHOLDER_PNG) + .build()) + .build(); + return ToolResultBlockParam.Content.ofBlocks( + List.of(ToolResultBlockParam.Content.Block.ofImage(image))); } String clickAt(long x, long y) { return "clicked at (" + x + ", " + y + ")"; } + String clickAtCursor() { + return "clicked at current cursor"; + } + String typeText(String text) { return "typed: " + text; } - String handleComputerAction(String actionType, Map params) { - return switch (actionType) { - case "screenshot" -> captureScreenshot(); + /** Runs one computer toolset member; {@code action} is the tool_use block's name. */ + ToolResultBlockParam.Content handleComputerAction(String action, Map input) { + if (action.equals("screenshot")) { + return captureScreenshot(); // the one member here that answers with an image block + } + String output = switch (action) { case "left_click" -> { - List coordinate = (List) params.get("coordinate").asArray().get(); - long x = ((Number) coordinate.get(0).asNumber().get()).longValue(); - long y = ((Number) coordinate.get(1).asNumber().get()).longValue(); + JsonValue coordinate = input.get("coordinate"); // optional on the toolset + if (coordinate == null) { + yield clickAtCursor(); + } + List point = (List) coordinate.asArray().get(); + long x = ((Number) point.get(0).asNumber().get()).longValue(); + long y = ((Number) point.get(1).asNumber().get()).longValue(); yield clickAt(x, y); } - case "type" -> typeText(params.get("text").asStringOrThrow()); + case "type" -> typeText(input.get("text").asStringOrThrow()); // Handle other actions as needed - default -> "unhandled action: " + actionType; + default -> throw new UnsupportedOperationException("Unknown or unimplemented member: " + action); }; + return ToolResultBlockParam.Content.ofString(output); } ``` ```php PHP - function captureScreenshot(): string + // Stand-in for real PNG bytes; a real executor captures the screen + const PLACEHOLDER_PNG = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg=='; + + function captureScreenshot(): array { - return ''; + // screenshot answers with an image block rather than text, so return the result content list + $image = [ + 'type' => 'image', + 'source' => ['type' => 'base64', 'media_type' => 'image/png', 'data' => PLACEHOLDER_PNG], + ]; + + return [$image]; } - function clickAt(int $x, int $y): string + function clickAt(?array $coordinate): string { + // left_click may omit coordinate, in which case the click lands where the cursor already is + if ($coordinate === null) { + return 'clicked at current cursor'; + } + [$x, $y] = $coordinate; + return "clicked at ({$x}, {$y})"; } @@ -1034,24 +1181,36 @@ The computer use tool is implemented as a schema-less tool. When using this tool return "typed: {$text}"; } - function handleComputerAction(string $actionType, array $params): string + function handleComputerAction(string $name, array $input): string|array { - return match ($actionType) { + return match ($name) { 'screenshot' => captureScreenshot(), - 'left_click' => clickAt(...$params['coordinate']), - 'type' => typeText($params['text']), + 'left_click' => clickAt($input['coordinate'] ?? null), + 'type' => typeText($input['text']), // Handle other actions as needed - default => "unhandled action: {$actionType}", + default => throw new RuntimeException("Unknown or unimplemented member: {$name}"), }; } ``` ```ruby Ruby + # Stand-in image data; a real executor captures the screen as a PNG. + PLACEHOLDER_PNG = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==" + + # screenshot answers with an image block rather than text def capture_screenshot - "" + [ + { + type: "image", + source: { type: "base64", media_type: "image/png", data: PLACEHOLDER_PNG } + } + ] end - def click_at(x, y) + def click(coordinate = nil) + return "clicked at current cursor" if coordinate.nil? + + x, y = coordinate "clicked at (#{x}, #{y})" end @@ -1059,18 +1218,18 @@ The computer use tool is implemented as a schema-less tool. When using this tool "typed: #{text}" end - def handle_computer_action(action_type, params) - case action_type + def handle_computer_action(name, input) + case name when "screenshot" capture_screenshot when "left_click" - x, y = params[:coordinate] - click_at(x, y) + # coordinate is optional; without it, click where the cursor already is + click(input[:coordinate]) when "type" - type_text(params[:text]) + type_text(input[:text]) # Handle other actions as needed else - "unhandled action: #{action_type}" + raise ArgumentError, "Unknown or unimplemented member: #{name}" end end ``` @@ -1080,49 +1239,88 @@ The computer use tool is implemented as a schema-less tool. When using this tool Extract and run tool calls from Claude's responses: - - ```bash cURL - # This is application-side helper code with no API request. See the SDK tabs - # for the pattern. - ``` + + ```python Python + NOT_EXECUTED = "Not executed: an earlier computer action in this turn failed." - ```bash CLI - # This is application-side helper code with no API request. See the SDK tabs - # for the pattern. - ``` - ```python Python - def process_tool_calls(response): - tool_results = [] + def process_tool_calls(response: Message) -> list[ToolResultBlockParam]: + """ + Run the computer actions in Claude's response in order and answer each + one. After the first failure the rest are skipped, because Claude planned + them assuming the earlier actions succeeded. + """ + tool_results: list[ToolResultBlockParam] = [] + failed = False for block in response.content: - if block.type == "tool_use": - action = block.input["action"] - result = handle_computer_action(action, block.input) - tool_results.append( - { - "type": "tool_result", - "tool_use_id": block.id, - "content": result, - } - ) + # Only the computer toolset is declared; route other tools here if you add them + if block.type != "tool_use" or block.toolset_name != "computer": + continue + result: ToolResultBlockParam = { + "type": "tool_result", + "tool_use_id": block.id, + "toolset_name": "computer", + } + if failed: + result["content"] = NOT_EXECUTED + result["is_error"] = True + else: + try: + # A string, or a list of content blocks such as the screenshot image + result["content"] = handle_computer_action(block.name, block.input) + except Exception as err: + result["content"] = f"Error: {err}" + result["is_error"] = True + failed = True + tool_results.append(result) return tool_results ``` ```typescript TypeScript + const HALT_TEXT = + "Not executed: an earlier computer action in this turn failed."; + + function computerResult( + toolUseId: string, + content: string | Anthropic.ImageBlockParam[], + isError?: boolean, + ): Anthropic.ToolResultBlockParam { + return { + type: "tool_result", + tool_use_id: toolUseId, + toolset_name: "computer", + content, + is_error: isError, + }; + } + function processToolCalls( - response: Anthropic.Beta.BetaMessage, - ): Anthropic.Beta.BetaToolResultBlockParam[] { - const toolResults: Anthropic.Beta.BetaToolResultBlockParam[] = []; + response: Anthropic.Message, + ): Anthropic.ToolResultBlockParam[] { + const toolResults: Anthropic.ToolResultBlockParam[] = []; + let failed = false; for (const block of response.content) { - if (block.type === "tool_use") { - const input = block.input as Record; - const action = input.action as string; - const result = handleComputerAction(action, input); - toolResults.push({ - type: "tool_result", - tool_use_id: block.id, - content: result, - }); + if (block.type !== "tool_use") { + continue; + } + if (block.toolset_name !== "computer") { + // This example declares only the computer toolset; route other tools + // here if you add them. + continue; + } + if (failed) { + // A batch stops at its first failure; answer later actions unexecuted + toolResults.push(computerResult(block.id, HALT_TEXT, true)); + continue; + } + try { + // A string, or the image block list that screenshot returns + const result = handleComputerAction(block.name, block.input); + toolResults.push(computerResult(block.id, result)); + } catch (error) { + failed = true; + const message = error instanceof Error ? error.message : String(error); + toolResults.push(computerResult(block.id, `Error: ${message}`, true)); } } return toolResults; @@ -1130,16 +1328,59 @@ The computer use tool is implemented as a schema-less tool. When using this tool ``` ```csharp C# - List ProcessToolCalls(BetaMessage response) + const string HaltText = "Not executed: an earlier computer action in this turn failed."; + + List ProcessToolCalls(Message response) { - List toolResults = []; + List toolResults = []; + var failed = false; foreach (var block in response.Content) { - if (block.TryPickToolUse(out var toolUse)) + if (!block.TryPickToolUse(out var toolUse)) { - var action = toolUse.Input["action"].GetString()!; - var result = HandleComputerAction(action, toolUse.Input); - toolResults.Add(new BetaToolResultBlockParam(toolUse.ID) { Content = result }); + continue; + } + + if (toolUse.ToolsetName != "computer") + { + // This example declares only the computer toolset; route other tools + // here if you add them. + continue; + } + + if (failed) + { + // A batch stops at its first failure; answer later actions without running them + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) + { + Content = HaltText, + IsError = true, + ToolsetName = "computer", + } + ); + continue; + } + + try + { + // A string, or the image block list that screenshot returns + var result = HandleComputerAction(toolUse.Name, toolUse.Input); + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) { Content = result, ToolsetName = "computer" } + ); + } + catch (Exception e) + { + failed = true; + toolResults.Add( + new ToolResultBlockParam(toolUse.ID) + { + Content = $"Error: {e.Message}", + IsError = true, + ToolsetName = "computer", + } + ); } } return toolResults; @@ -1147,15 +1388,51 @@ The computer use tool is implemented as a schema-less tool. When using this tool ``` ```go Go - func processToolCalls(response *anthropic.BetaMessage) []anthropic.BetaContentBlockParamUnion { - var toolResults []anthropic.BetaContentBlockParamUnion + const notExecuted = "Not executed: an earlier computer action in this turn failed." + + // computerToolResult builds the result for one computer action. Unlike an + // ordinary tool result, it must echo the toolset name. + func computerToolResult(toolUseID string, content []anthropic.ToolResultBlockParamContentUnion, isError bool) anthropic.ContentBlockParamUnion { + result := anthropic.ToolResultBlockParam{ + ToolUseID: toolUseID, + ToolsetName: anthropic.String("computer"), + Content: content, + } + if isError { + result.IsError = anthropic.Bool(true) + } + return anthropic.ContentBlockParamUnion{OfToolResult: &result} + } + + // processToolCalls runs the computer actions in Claude's response in order and + // builds one tool_result per tool_use block. After the first failure it skips + // the rest: Claude planned them assuming the earlier actions succeeded. + func processToolCalls(response *anthropic.Message) []anthropic.ContentBlockParamUnion { + var toolResults []anthropic.ContentBlockParamUnion + failed := false for _, block := range response.Content { switch variant := block.AsAny().(type) { - case anthropic.BetaToolUseBlock: - input := variant.Input.(map[string]any) - action := input["action"].(string) - result := handleComputerAction(action, input) - toolResults = append(toolResults, anthropic.NewBetaToolResultBlock(variant.ID, result, false)) + case anthropic.ToolUseBlock: + // This example declares only the computer toolset; route other tools here if you add them. + if variant.ToolsetName != "computer" { + continue + } + if failed { + toolResults = append(toolResults, computerToolResult(variant.ID, textContent(notExecuted), true)) + continue + } + var input map[string]any + var content []anthropic.ToolResultBlockParamContentUnion + err := json.Unmarshal(variant.Input, &input) + if err == nil { + // Text, or the image block that screenshot returns + content, err = handleComputerAction(variant.Name, input) + } + if err != nil { + failed = true + content = textContent("Error: " + err.Error()) + } + toolResults = append(toolResults, computerToolResult(variant.ID, content, err != nil)) } } return toolResults @@ -1164,57 +1441,110 @@ The computer use tool is implemented as a schema-less tool. When using this tool ``` ```java Java - List processToolCalls(BetaMessage response) { - List toolResults = new ArrayList<>(); - for (BetaContentBlock block : response.content()) { - if (block.isToolUse()) { - BetaToolUseBlock toolUse = block.asToolUse(); - Map input = - (Map) toolUse._input().asObject().get(); - String action = input.get("action").asStringOrThrow(); - String result = handleComputerAction(action, input); - toolResults.add(BetaContentBlockParam.ofToolResult( - BetaToolResultBlockParam.builder() - .toolUseId(toolUse.id()) - .content(result) - .build())); + /** The exact text the toolset contract prescribes for member calls skipped after a failure. */ + static final String HALT_TEXT = "Not executed: an earlier computer action in this turn failed."; + + /** Every result answering a computer toolset member echoes toolset_name. */ + ToolResultBlockParam.Builder computerResult(ToolUseBlock toolUse) { + return ToolResultBlockParam.builder() + .toolUseId(toolUse.id()) + .toolsetName("computer"); + } + + /** + * Run the computer actions in Claude's response in order and build one + * tool_result per tool_use block. After the first failure, skip the rest: + * Claude planned them assuming the earlier actions succeeded. + */ + List processToolCalls(Message response) { + List toolResults = new ArrayList<>(); + boolean failed = false; + for (ContentBlock block : response.content()) { + // This example declares only the computer toolset; route other tools here if you add them. + if (!block.isToolUse() || !block.asToolUse().toolsetName().equals(Optional.of("computer"))) { + continue; } + ToolUseBlock toolUse = block.asToolUse(); + ToolResultBlockParam result; + if (failed) { + result = computerResult(toolUse).content(HALT_TEXT).isError(true).build(); + } else { + try { + Map input = + (Map) toolUse._input().asObject().get(); + // A string, or the image block that screenshot returns + ToolResultBlockParam.Content output = handleComputerAction(toolUse.name(), input); + result = computerResult(toolUse).content(output).build(); + } catch (RuntimeException e) { + failed = true; + result = computerResult(toolUse).content("Error: " + e.getMessage()).isError(true).build(); + } + } + toolResults.add(ContentBlockParam.ofToolResult(result)); } return toolResults; } ``` ```php PHP - function processToolCalls(BetaMessage $response): array + const HALT_TEXT = 'Not executed: an earlier computer action in this turn failed.'; + + function processToolCalls(Message $response): array { $toolResults = []; + $failed = false; foreach ($response->content as $block) { - if ($block instanceof BetaToolUseBlock) { - $action = $block->input['action']; - $result = handleComputerAction($action, $block->input); - $toolResults[] = BetaToolResultBlockParam::with( - toolUseID: $block->id, - content: $result, - ); + // This example declares only the computer toolset; route other tools here if you add them. + // Read toolset_name through array access: the SDK keeps it as raw data until a release types it. + if (!($block instanceof ToolUseBlock) || ($block['toolsetName'] ?? $block['toolset_name'] ?? null) !== 'computer') { + continue; + } + $result = ['type' => 'tool_result', 'tool_use_id' => $block->id, 'toolset_name' => 'computer']; + if ($failed) { + // A batch stops at its first failure; the remaining actions are answered without running + $toolResults[] = [...$result, 'content' => HALT_TEXT, 'is_error' => true]; + continue; + } + try { + // A string, or the image block list that screenshot returns + $toolResults[] = [...$result, 'content' => handleComputerAction($block->name, $block->input)]; + } catch (Throwable $e) { + $failed = true; + $toolResults[] = [...$result, 'content' => 'Error: ' . $e->getMessage(), 'is_error' => true]; } } + return $toolResults; } ``` ```ruby Ruby + NOT_EXECUTED = "Not executed: an earlier computer action in this turn failed." + + # Run the computer actions in Claude's response in order and build one + # tool_result per tool_use block. After the first failure, skip the rest: + # Claude planned them assuming the earlier actions succeeded. def process_tool_calls(response) tool_results = [] + failed = false response.content.each do |block| - next unless block.type == :tool_use - - action = block.input[:action] - result = handle_computer_action(action, block.input) - tool_results << { - type: "tool_result", - tool_use_id: block.id, - content: result - } + # This example declares only the computer toolset; route other tools here + # if you add them. + next unless block.type == :tool_use && block.toolset_name == "computer" + + result = { type: "tool_result", tool_use_id: block.id, toolset_name: "computer" } + if failed + result.update(content: NOT_EXECUTED, is_error: true) + else + begin + # A String, or the image content blocks that screenshot returns + result[:content] = handle_computer_action(block.name, block.input) + rescue => e + result.update(content: "Error: #{e.message}", is_error: true) + failed = true + end + end + tool_results << result end tool_results end @@ -1223,354 +1553,49 @@ The computer use tool is implemented as a schema-less tool. When using this tool - Create a loop that continues until Claude completes the task: - - - ```bash cURL - # The agent loop is a stateful, multi-turn pattern that doesn't translate to a - # one-off shell command. See the SDK tabs for the implementation. - ``` - - ```bash CLI - # The agent loop is a stateful, multi-turn pattern that doesn't translate to a - # one-off shell command. See the SDK tabs for the implementation. - ``` - - ```python Python - def sampling_loop(model, messages, max_iterations=10): - """ - Run the computer-use agent loop until Claude stops requesting tools - or the iteration limit is reached. - """ - for _ in range(max_iterations): - response = client.beta.messages.create( - model=model, - max_tokens=4096, - messages=messages, - tools=TOOLS, - betas=["computer-use-2025-11-24"], - ) - - # Add Claude's response to the conversation history - messages.append({"role": "assistant", "content": response.content}) - - # Run any tools Claude requested and collect results - tool_results = process_tool_calls(response) - if not tool_results: - return messages # No more tool use; task complete - - # Send tool results back to Claude for the next iteration - messages.append({"role": "user", "content": tool_results}) - - return messages - ``` - - ```typescript TypeScript - async function samplingLoop( - model: string, - messages: Anthropic.Beta.BetaMessageParam[], - maxIterations = 10, - ): Promise { - // Run the computer-use agent loop until Claude stops requesting tools - // or the iteration limit is reached. - for (let i = 0; i < maxIterations; i++) { - const response = await client.beta.messages.create({ - model, - max_tokens: 4096, - messages, - tools, - betas: ["computer-use-2025-11-24"], - }); - - // Add Claude's response to the conversation history - messages.push({ role: "assistant", content: response.content }); - - // Run any tools Claude requested and collect results - const toolResults = processToolCalls(response); - if (toolResults.length === 0) { - return messages; // No more tool use; task complete - } - - // Send tool results back to Claude for the next iteration - messages.push({ role: "user", content: toolResults }); - } - - return messages; - } - ``` - - ```csharp C# - async Task> SamplingLoop( - Model model, - List messages, - int maxIterations = 10 - ) - { - // Run the computer-use agent loop until Claude stops requesting tools - // or the iteration limit is reached. - for (var i = 0; i < maxIterations; i++) - { - var response = await client.Beta.Messages.Create( - new MessageCreateParams - { - Model = model, - MaxTokens = 4096, - Messages = messages, - Tools = tools, - Betas = ["computer-use-2025-11-24"], - } - ); - - // Add Claude's response to the conversation history - messages.Add( - new() - { - Role = Role.Assistant, - Content = response - .Content.Select(block => new BetaContentBlockParam(block.Json)) - .ToList(), - } - ); - - // Run any tools Claude requested and collect results - var toolResults = ProcessToolCalls(response); - if (toolResults.Count == 0) - { - return messages; // No more tool use; task complete - } - - // Send tool results back to Claude for the next iteration - messages.Add(new() { Role = Role.User, Content = toolResults }); - } - - return messages; - } - ``` - - ```go Go - // samplingLoop runs the computer-use agent loop until Claude stops - // requesting tools or the iteration limit is reached. - func samplingLoop(ctx context.Context, model anthropic.Model, messages []anthropic.BetaMessageParam, maxIterations int) ([]anthropic.BetaMessageParam, error) { - for range maxIterations { - response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{ - Model: model, - MaxTokens: 4096, - Messages: messages, - Tools: tools, - Betas: []anthropic.AnthropicBeta{"computer-use-2025-11-24"}, - }) - if err != nil { - return nil, err - } - - // Add Claude's response to the conversation history - messages = append(messages, response.ToParam()) - - // Run any tools Claude requested and collect results - toolResults := processToolCalls(response) - if len(toolResults) == 0 { - return messages, nil // No more tool use; task complete - } - - // Send tool results back to Claude for the next iteration - messages = append(messages, anthropic.BetaMessageParam{ - Role: anthropic.BetaMessageParamRoleUser, - Content: toolResults, - }) - } - return messages, nil - } - - ``` - - ```java Java - /** - * Run the computer-use agent loop until Claude stops requesting tools - * or the iteration limit is reached. - */ - List samplingLoop(Model model, List messages, int maxIterations) { - for (int i = 0; i < maxIterations; i++) { - BetaMessage response = client.beta().messages().create(MessageCreateParams.builder() - .model(model) - .maxTokens(4096) - .messages(messages) - .addTool(COMPUTER_TOOL) - .addBeta("computer-use-2025-11-24") - .build()); - - // Add Claude's response to the conversation history - messages.add(BetaMessageParam.builder() - .role(BetaMessageParam.Role.ASSISTANT) - .contentOfBetaContentBlockParams( - response.content().stream().map(BetaContentBlock::toParam).toList()) - .build()); - - // Run any tools Claude requested and collect results - List toolResults = processToolCalls(response); - if (toolResults.isEmpty()) { - return messages; // No more tool use; task complete - } - - // Send tool results back to Claude for the next iteration - messages.add(BetaMessageParam.builder() - .role(BetaMessageParam.Role.USER) - .contentOfBetaContentBlockParams(toolResults) - .build()); - } - return messages; - } - ``` - - ```php PHP - /** - * Run the computer-use agent loop until Claude stops requesting tools - * or the iteration limit is reached. - */ - function samplingLoop(string $model, array $messages, int $maxIterations = 10): array - { - global $client, $tools; - - for ($i = 0; $i < $maxIterations; $i++) { - $response = $client->beta->messages->create( - model: $model, - maxTokens: 4096, - messages: $messages, - tools: $tools, - betas: ['computer-use-2025-11-24'], - ); - - // Add Claude's response to the conversation history - $messages[] = BetaMessageParam::with(role: Role::ASSISTANT, content: $response->content); - - // Run any tools Claude requested and collect results - $toolResults = processToolCalls($response); - if ($toolResults === []) { - return $messages; // No more tool use; task complete - } - - // Send tool results back to Claude for the next iteration - $messages[] = BetaMessageParam::with(role: Role::USER, content: $toolResults); - } - - return $messages; - } - ``` - - ```ruby Ruby - # Run the computer-use agent loop until Claude stops requesting tools - # or the iteration limit is reached. - def sampling_loop(model, messages, max_iterations: 10) - max_iterations.times do - response = CLIENT.beta.messages.create( - model: model, - max_tokens: 4096, - messages: messages, - tools: TOOLS, - betas: ["computer-use-2025-11-24"] - ) - - # Add Claude's response to the conversation history - messages << {role: "assistant", content: response.content} - - # Run any tools Claude requested and collect results - tool_results = process_tool_calls(response) - return messages if tool_results.empty? # No more tool use; task complete - - # Send tool results back to Claude for the next iteration - messages << {role: "user", content: tool_results} - end - - messages - end - ``` - + Wrap the two previous steps in a loop that sends the results back and repeats until Claude returns no member tool calls; [Understand the agent loop](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#understanding-the-agentic-loop) shows this loop in each language. -#### Handle errors +### Handle errors -When implementing the computer use tool, various errors might occur. Here's how to handle them: +Report a failed action to Claude as a `tool_result` with `is_error: true` and a short description, and include `"toolset_name": "computer"` as on any other member result. If the failed action was part of a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), answer the remaining blocks in the batch with the halt text shown there instead of running them. - - - If screenshot capture fails, return an appropriate error message: +For example, when screenshot capture fails: - ```json +```json +{ + "role": "user", + "content": [ { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": "toolu_01A09q90qw90lq917835lq9", - "content": "Error: Failed to capture screenshot. Display may be locked or unavailable.", - "is_error": true - } - ] + "type": "tool_result", + "tool_use_id": "toolu_01A09q90qw90lq917835lq9", + "toolset_name": "computer", + "content": "Error: Failed to capture screenshot. Display may be locked or unavailable.", + "is_error": true } - ``` - + ] +} +``` - - If Claude provides coordinates outside the display bounds: - - ```json - { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": "toolu_01A09q90qw90lq917835lq9", - "content": "Error: Coordinates (1200, 900) are outside display bounds (1024x768).", - "is_error": true - } - ] - } - ``` - - - - If an action fails to run: - - ```json - { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": "toolu_01A09q90qw90lq917835lq9", - "content": "Error: Failed to perform click action. The application may be unresponsive.", - "is_error": true - } - ] - } - ``` - - +Use the same shape for coordinates outside the display bounds and for actions that fail to run, with a message that says what went wrong. -#### Size screenshots to fit image limits +### Size screenshots to fit image limits -Screenshots sent to the computer tool should fit within Claude's image size limits (see [image size limits](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)). The API downscales oversized images before Claude sees them, and Claude returns coordinates for the image it sees, so relying on the server-side downscale leaves you without the scale factor you need to map those coordinates back to your screen. Only images over the API's separate [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits) (for example, more than 8,000 px on a side) are rejected with a validation error rather than downscaled. +Screenshots and zoom images that you return to the computer use toolset must already fit within your model's [image size limits](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size): the toolset takes no display dimensions and the API doesn't downscale for you, so an oversized `tool_result` image is rejected with a validation error. Because Claude returns coordinates in the pixel space of the image it sees, keep the scale factor you used so you can map those coordinates back to your screen. - Limits vary by model. Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, and Claude Opus 4.7 accept up to 2576 pixels on the long edge; earlier models accept up to 1568 pixels on the long edge and approximately 1.15 megapixels total. The following example uses the earlier-model 1568 px / 1.15 MP limits; substitute your model's limit. + Limits vary by model. Claude Opus 4.7 and later models, including every model that supports `computer_toolset_20260801`, accept up to 2576 pixels on the long edge and 4784 visual tokens total (`⌈width / 28⌉ × ⌈height / 28⌉`, approximately 3.75 megapixels); earlier models accept up to 1568 pixels on the long edge and approximately 1.15 megapixels total (see [Resolution and token cost](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size) for each model's tier). The following example uses the earlier-model 1568 px / 1.15 MP limits. For a high-resolution-tier model, size to the visual-token limit rather than a pixel total, for example with the resize helper in [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading). -If your screen is larger than the limit, resize the screenshot before sending it, set `display_width_px`/`display_height_px` to the resized dimensions, and scale Claude's returned coordinates back to the original screen space: - - - ```bash cURL - # Coordinate scaling and screenshot resizing happen in your application code, not - # in the API request. See the SDK tabs for the helper pattern. - ``` - - ```bash CLI - # Coordinate scaling and screenshot resizing happen in your application code, not - # in the API request. See the SDK tabs for the helper pattern. - ``` +If your screen is larger than the limit, resize each screenshot before returning it and scale Claude's returned coordinates back to the original screen space. Because the toolset takes no display dimensions, the resize and the coordinate scaling in your application code are all you need: + ```python Python import math + screen_width, screen_height = 1512, 982 + def get_scale_factor(width, height): """Calculate scale factor to meet API constraints.""" @@ -1600,6 +1625,8 @@ If your screen is larger than the limit, resize the screenshot before sending it ``` ```typescript TypeScript + const screenWidth = 1512; + const screenHeight = 982; const MAX_LONG_EDGE = 1568; const MAX_PIXELS = 1_150_000; @@ -1630,6 +1657,8 @@ If your screen is larger than the limit, resize the screenshot before sending it ``` ```csharp C# + int screenWidth = 1512, screenHeight = 982; + double GetScaleFactor(int width, int height) { // Calculate scale factor to meet API constraints. @@ -1667,6 +1696,8 @@ If your screen is larger than the limit, resize the screenshot before sending it } // ... + screenWidth, screenHeight := 1512, 982 + // When capturing screenshot scale := getScaleFactor(screenWidth, screenHeight) scaledWidth := int(float64(screenWidth) * scale) @@ -1693,7 +1724,8 @@ If your screen is larger than the limit, resize the screenshot before sending it } void main() { - // ... + int screenWidth = 1512, screenHeight = 982; + // When capturing screenshot double scale = getScaleFactor(screenWidth, screenHeight); int scaledWidth = (int)(screenWidth * scale); @@ -1718,7 +1750,10 @@ If your screen is larger than the limit, resize the screenshot before sending it sqrt(1_150_000 / ($width * $height)), ); } - // ... + + $screenWidth = 1512; + $screenHeight = 982; + // When capturing screenshot $scale = getScaleFactor($screenWidth, $screenHeight); $scaledWidth = (int)($screenWidth * $scale); @@ -1735,7 +1770,9 @@ If your screen is larger than the limit, resize the screenshot before sending it def get_scale_factor(width, height) [1.0, 1568.0 / [width, height].max, Math.sqrt(1_150_000.0 / (width * height))].min end - # ... + + screen_width, screen_height = 1512, 982 + # When capturing screenshot scale = get_scale_factor(screen_width, screen_height) scaled_width = (screen_width * scale).to_i @@ -1753,86 +1790,45 @@ If your screen is larger than the limit, resize the screenshot before sending it **macOS Retina displays** capture screenshots at a device pixel ratio of 2, so the image is twice the resolution of the logical screen coordinates. Either downscale the screenshot by 2x before sending, or halve the coordinates Claude returns before issuing the click. -#### Diagnose click issues +When you choose a display resolution and return screenshots: -If clicks miss their targets, the cause is usually one of the following: +* For general desktop tasks, use 1024x768 or 1280x720; for web applications, use 1280x800 or 1366x768. +* Avoid resolutions above 1920x1080 to prevent performance issues. +* Encode screenshots as base64 PNG or JPEG, and consider compressing large screenshots to improve performance. +* Include relevant metadata such as timestamp or display state. +* If you use higher resolutions, ensure coordinates are accurately scaled. -| Symptom | Likely cause | Try | -| ------------------------------------------------- | --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | -| Clicks consistently offset in one direction | `display_width_px`/`display_height_px` don't match the image dimensions actually sent | Ensure display dimensions exactly match the screenshot you send | -| Clicks land in the right area but miss the target | Target is very small, detail was lost downscaling a 4K+ source, or aspect ratio was distorted | Set `enable_zoom: true`; capture at lower DPI or crop to the relevant region; preserve aspect ratio when resizing | -| Claude clicks the wrong element entirely | Ambiguous instruction, or visually similar elements nearby | Use positional prompts ("the blue Submit button in the bottom-right"); break the interaction into smaller steps | -| Accuracy is consistently poor | Resolution too low | Try 1280x720 as a baseline | +### Manage screenshot history - - **Model choice affects click precision.** Claude Sonnet 4.6 is more mechanically precise at clicking than Claude Opus 4.6 and is more robust when screenshots require heavy downscaling. Claude Opus 4.7 narrows that gap: its click precision is roughly comparable to Sonnet 4.6, and its higher resolution limit means less downscaling is needed. - +Long agent loops accumulate screenshots quickly (roughly 1,000–1,800 input tokens each). The API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits) also apply. Once a single request carries more than 20 images, every image in it is held to a stricter per-side limit. A loop that keeps its screenshot history reaches that count within a few dozen turns, so either resize each screenshot so that neither side exceeds 2000 px or prune older screenshots to keep 20 or fewer in the request. -#### Follow implementation best practices +To keep [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) effective while bounding context: - - - Set display dimensions that match your use case while staying within recommended limits: +* Place one `cache_control` breakpoint after the system prompt and tool definitions, and up to three more on the last `tool_result` block of each of the most recent turns, advancing them each turn. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), markers on several blocks act as a single breakpoint but each still counts toward the limit of four, so use one per turn. +* Prune old screenshots in *batches*, not one each turn. Dropping a screenshot every turn changes the prefix every turn and invalidates the cache. A reasonable default is to keep the last three screenshots and prune every 25 turns, so the prefix stays byte-identical between prune events; if your screenshots exceed 2000 px on either side, choose an interval that keeps each request at 20 or fewer images. - * For general desktop tasks: 1024x768 or 1280x720 - * For web applications: 1280x800 or 1366x768 - * Avoid resolutions above 1920x1080 to prevent performance issues - +### Diagnose click issues - - When returning screenshots to Claude: - - * Encode screenshots as base64 PNG or JPEG - * Consider compressing large screenshots to improve performance - * Include relevant metadata such as timestamp or display state - * If using higher resolutions, ensure coordinates are accurately scaled - - A screenshot goes back as an image content block inside the `tool_result` content array (see [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls)): +If clicks miss their targets, the cause is usually one of the following: - ```json - { - "role": "user", - "content": [ - { - "type": "tool_result", - "tool_use_id": "toolu_01A09q90qw90lq917835lq9", - "content": [ - { - "type": "image", - "source": { - "type": "base64", - "media_type": "image/png", - "data": "iVBORw0KGgo..." - } - } - ] - } - ] - } - ``` - +| Symptom | Likely cause | Try | +| ------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Clicks consistently offset in one direction | Claude's coordinates, which are in the pixel space of the screenshots you return, are being applied to a display of a different size without scaling | Scale each coordinate by the ratio of your screen size to your screenshot size before clicking (see [Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions)); on macOS Retina displays, account for the 2x device pixel ratio | +| Clicks land in the right area but miss the target | Target is very small, detail was lost downscaling a 4K+ source, or aspect ratio was distorted | Keep the `zoom` member enabled and implement it so Claude can inspect the region at full resolution; capture at lower DPI or crop to the relevant region; preserve aspect ratio when resizing | +| Claude clicks the wrong element entirely | Ambiguous instruction, or visually similar elements nearby | Use positional prompts ("the blue Submit button in the bottom-right"); break the interaction into smaller steps | +| Accuracy is consistently poor | Resolution too low | Try 1280x720 as a baseline | - - Long agent loops accumulate screenshots quickly (roughly 1,000–1,800 input tokens each). To keep [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) effective while bounding context: + + **Model choice affects click precision.** Among the models that use the earlier `computer_20251124` tool, Claude Sonnet 4.6 is more mechanically precise at clicking than Claude Opus 4.6 and is more robust when screenshots require heavy downscaling. Claude Opus 4.7 narrows that gap: its click precision is roughly comparable to Sonnet 4.6, and its higher resolution limit means less downscaling is needed. + - * Place one `cache_control` breakpoint after the system prompt and tool definitions, and up to three more on the most recent `tool_result` blocks, advancing them each turn. - * Prune old screenshots in *batches*, not one each turn. Dropping a screenshot every turn changes the prefix every turn and invalidates the cache. A reasonable default is to keep the last three screenshots and prune every 25 turns, so the prefix stays byte-identical between prune events. - +### Follow implementation best practices + Some applications need time to respond to actions: - - ```bash cURL - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` - - ```bash CLI - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` - + ```python Python def click_and_wait(x, y, wait_time=0.5): click_at(x, y) @@ -1896,34 +1892,30 @@ If clicks miss their targets, the cause is usually one of the following: Check that requested actions are safe and valid: - - ```bash cURL - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` + + ```python Python + display_width, display_height = 1024, 768 - ```bash CLI - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` - ```python Python def validate_action(action_type, params): - if action_type == "left_click": - x, y = params.get("coordinate", (0, 0)) + if action_type == "left_click" and "coordinate" in params: + x, y = params["coordinate"] if not (0 <= x < display_width and 0 <= y < display_height): return False, "Coordinates out of bounds" return True, None ``` ```typescript TypeScript + const displayWidth = 1024; + const displayHeight = 768; + interface ActionParams { coordinate?: [number, number]; } function validateAction(actionType: string, params: ActionParams): [boolean, string | null] { - if (actionType === "left_click") { - const [x, y] = params.coordinate ?? [0, 0]; + if (actionType === "left_click" && params.coordinate) { + const [x, y] = params.coordinate; if (!(x >= 0 && x < displayWidth && y >= 0 && y < displayHeight)) { return [false, "Coordinates out of bounds"]; } @@ -1938,10 +1930,10 @@ If clicks miss their targets, the cause is usually one of the following: // ... static (bool IsValid, string? Error) ValidateAction(string actionType, IReadOnlyDictionary parameters) { - if (actionType == "left_click") + if (actionType == "left_click" && parameters.TryGetValue("coordinate", out JsonElement coordinate)) { - int x = parameters["coordinate"][0].GetInt32(); - int y = parameters["coordinate"][1].GetInt32(); + int x = coordinate[0].GetInt32(); + int y = coordinate[1].GetInt32(); if (x is < 0 or >= DisplayWidth || y is < 0 or >= DisplayHeight) { return (false, "Coordinates out of bounds"); @@ -1958,8 +1950,9 @@ If clicks miss their targets, the cause is usually one of the following: ) func validateAction(actionType string, params map[string]any) (bool, string) { - if actionType == "left_click" { - coord, ok := params["coordinate"].([]any) + raw, hasCoordinate := params["coordinate"] + if actionType == "left_click" && hasCoordinate { + coord, ok := raw.([]any) if !ok || len(coord) != 2 { return false, "Invalid coordinate" } @@ -1979,7 +1972,7 @@ If clicks miss their targets, the cause is usually one of the following: record Validation(boolean valid, String error) {} Validation validateAction(String actionType, Map params) { - if (actionType.equals("left_click")) { + if (actionType.equals("left_click") && params.containsKey("coordinate")) { List coord = (List) params.get("coordinate").asArray().get(); long x = ((Number) coord.get(0).asNumber().get()).longValue(); long y = ((Number) coord.get(1).asNumber().get()).longValue(); @@ -1998,8 +1991,8 @@ If clicks miss their targets, the cause is usually one of the following: /** @return array{bool, ?string} */ function validateAction(string $actionType, array $params): array { - if ($actionType === 'left_click') { - [$x, $y] = $params['coordinate'] ?? [0, 0]; + if ($actionType === 'left_click' && isset($params['coordinate'])) { + [$x, $y] = $params['coordinate']; if (!(0 <= $x && $x < DISPLAY_WIDTH && 0 <= $y && $y < DISPLAY_HEIGHT)) { return [false, 'Coordinates out of bounds']; } @@ -2013,8 +2006,8 @@ If clicks miss their targets, the cause is usually one of the following: DISPLAY_HEIGHT = 768 def validate_action(action_type, params) - if action_type == "left_click" - x, y = params.fetch(:coordinate, [0, 0]) + if action_type == "left_click" && params.key?(:coordinate) + x, y = params[:coordinate] unless (0...DISPLAY_WIDTH).cover?(x) && (0...DISPLAY_HEIGHT).cover?(y) return [false, "Coordinates out of bounds"] end @@ -2028,17 +2021,7 @@ If clicks miss their targets, the cause is usually one of the following: Keep a log of all actions for troubleshooting: - - ```bash cURL - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` - - ```bash CLI - # This is application-side helper code with no API request. See the SDK tabs for - # the pattern. - ``` - + ```python Python import logging @@ -2107,28 +2090,84 @@ If clicks miss their targets, the cause is usually one of the following: *** -## Understand computer use limitations - -Computer use is in beta. Keep the following limitations in mind: +## Migrate from `computer_20251124` + +Upgrading from `computer_20251124` to the toolset is optional: the models listed for `computer_20251124` under [Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) keep accepting it with its beta header, so an existing integration keeps working until you change it. To upgrade, make the following changes together: + +1. **Remove the beta header.** Drop `anthropic-beta: computer-use-2025-11-24` from your requests. In the SDKs, remove the `betas` parameter and call the Messages API through the standard client rather than the beta namespace. +2. **Change the `tools` entry.** Set `type` to `computer_toolset_20260801` and delete `name`, `display_width_px`, `display_height_px`, `display_number`, and `enable_zoom`. The toolset rejects each of these fields. +3. **Choose whether to keep zoom enabled.** Zoom is enabled by default on the toolset, whereas `enable_zoom` defaults to `false`. If your environment doesn't implement zoom, add `"configs": {"zoom": {"enabled": false}}` to keep the previous behavior; otherwise implement it (see [Available actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#available-actions)). +4. **Handle every block in a turn.** Update your agent loop to iterate over every `tool_use` block in a response rather than reading only the first, and to dispatch on the block's `name` together with `toolset_name` instead of on `input.action`. Member inputs no longer contain an `action` field; the remaining fields are unchanged. +5. **Run blocks in order and use the halt text.** Run the blocks sequentially, stop at the first failure, and answer the remaining blocks with `Not executed: an earlier computer action in this turn failed.` as described in [Batch actions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions). If your loop can't run batches yet, [Tool parameters](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#tool-parameters) explains how to limit Claude to one action per turn. +6. **Echo `toolset_name` on results.** Add `"toolset_name": "computer"` to every `tool_result` that answers a member call. Results may contain only `text` and `image` content. +7. **Support `repeat` on `key`.** The `key` member accepts an optional `repeat` count from 1 to 100. A handler that ignores unrecognized fields would press the key once, so make your `key` handler honor `repeat`. +8. **Resize screenshots yourself.** The toolset rejects a screenshot or zoom image that exceeds the model's image limits instead of downscaling it. Resize before returning the image and keep scaling coordinates as described in [Size screenshots to fit image limits](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions). +9. **Remove unsupported options.** Move any `defer_loading` from the entry into `configs`, with the same value on every enabled member. The other options not supported on toolset entries are listed under [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). + +This is the `tools` entry before the change, sent with the `anthropic-beta: computer-use-2025-11-24` header: + +```json +{ + "type": "computer_20251124", + "name": "computer", + "display_width_px": 1024, + "display_height_px": 768, + "display_number": 1 +} +``` + +This is the `tools` entry after the change, sent with no beta header. The `configs` object keeps zoom off to match the earlier entry, which doesn't set `enable_zoom`; omit `configs` entirely to accept the default and let Claude zoom: + +```json +{ + "type": "computer_toolset_20260801", + "configs": { + "zoom": { "enabled": false } + } +} +``` + +The following pair shows a `tool_use` block before and after the change. The action name moves from `input.action` to `name`, and the block gains `toolset_name`: + +```json +{ + "type": "tool_use", + "id": "toolu_01A9r5kQm2LxWc7vT3nZ4bJs", + "name": "computer", + "input": { "action": "left_click", "coordinate": [500, 300] } +} +``` + +```json +{ + "type": "tool_use", + "id": "toolu_01A9r5kQm2LxWc7vT3nZ4bJs", + "name": "left_click", + "toolset_name": "computer", + "input": { "coordinate": [500, 300] } +} +``` + +## Earlier tool versions + +Two earlier versions of the computer use tool remain available in beta for existing integrations, for models that don't support the toolset, and on platforms where the toolset isn't currently available. Each requires its [beta header](https://platform.claude.com/docs/en/api/beta-headers) on every request, and their parameters are documented in the [beta Messages API reference](https://platform.claude.com/docs/en/api/beta/messages/create). In the SDKs, pass the header through the `betas` parameter and use the beta namespace; only the computer use tool needs the header, not the bash or text editor tools in the same request. + +| Tool version | Beta header | Use with | Parameters | +| ------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | +| `computer_20251124` | `computer-use-2025-11-24` | Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 4.6, and Claude Opus 4.5 | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | +| `computer_20250124` | `computer-use-2025-01-24` | Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.1 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), Claude Sonnet 4 ([retired, except on Bedrock and Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)), and Claude Opus 4 ([retired, except on Google Cloud](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | [API reference](https://platform.claude.com/docs/en/api/beta/messages/create) | -1. **Latency:** The current computer use latency for human-AI interactions might be too slow compared to regular human-directed computer actions. Focus on use cases where speed isn't critical (for example, background information gathering, automated software testing) in trusted environments. +*** -2. **Computer vision accuracy and reliability:** Claude might make mistakes or hallucinate when outputting specific coordinates while generating actions. Extended thinking can help you understand the model's reasoning and identify potential issues. +## Limitations +1. **Latency:** The current computer use latency for human-AI interactions might be too slow compared to regular human-directed computer actions. Focus on use cases where speed isn't critical (for example, background information gathering, automated software testing) in trusted environments. +2. **Computer vision accuracy and reliability:** Claude might make mistakes or hallucinate when outputting specific coordinates while generating actions. Claude's [summarized thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#summarized-thinking) output can help you understand the model's reasoning and identify potential issues; set `display: "summarized"` on the thinking configuration, because the models that support the toolset omit thinking text by default. 3. **Tool selection accuracy and reliability:** Claude might make mistakes or hallucinate when selecting tools while generating actions or take unexpected actions to solve problems. Additionally, reliability might be lower when interacting with niche applications or multiple applications at once. Prompt the model carefully when requesting complex tasks. - 4. **Scrolling reliability:** The scroll action supports direction control (up, down, left, right) and a specified amount. In applications where scrolling doesn't take effect, keyboard alternatives such as Page Down can help. - 5. **Spreadsheet interaction:** Use the fine-grained mouse control actions (`left_mouse_down`, `left_mouse_up`) and modifier-key combinations to select individual cells. Complex spreadsheet operations might still require multiple attempts. - -6. **Account creation and content generation on social and communications platforms:** While Claude will visit websites, Claude's ability to create accounts or generate and share content or otherwise engage in human impersonation across social media websites and platforms is limited. This capability might be updated in the future. - -7. **Vulnerabilities:** Vulnerabilities such as jailbreaking or prompt injection might persist across frontier AI systems, including the beta computer use API. In some circumstances, Claude will follow commands found in content, sometimes even when they conflict with your instructions. For example, instructions on webpages or contained in images might override your instructions or cause Claude to make mistakes. Consider the following: - - * Limiting computer use to trusted environments such as virtual machines or containers with minimal privileges - * Avoiding giving computer use access to sensitive accounts or data without strict oversight - * Informing end users of relevant risks and obtaining their consent before enabling or requesting permissions necessary for computer use features in your applications - +6. **Account creation and content generation on social and communications platforms:** Although Claude visits websites, its ability to create accounts, generate and share content, or otherwise engage in human impersonation across social media websites and platforms is limited. +7. **Vulnerabilities:** Jailbreaks and prompt injection can affect computer use as they can any frontier AI system, including through instructions embedded in webpages or images; apply the precautions in [Security considerations](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#security-considerations). 8. **Inappropriate or illegal actions:** Under Anthropic's Terms of Service, you must not employ computer use to violate any laws or the Acceptable Use Policy. Always carefully review and verify Claude's computer use actions and logs. Do not use Claude for tasks requiring perfect precision or sensitive user information without human oversight. @@ -2143,17 +2182,16 @@ Because your application controls where and how computer use data is stored, com Computer use follows the standard [tool use pricing](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview#pricing). When using the computer use tool: -**System prompt overhead:** The computer use beta adds 466–499 tokens to the system prompt +**Toolset definition overhead:** Declaring `computer_toolset_20260801` with its default members adds about 4,500 input tokens to a request (about 4,520 on Claude Fable 5, Claude Mythos 5, Claude Opus 5, and Claude Opus 4.8, and about 4,590 on Claude Sonnet 5), which covers the member tool definitions and the tool use system prompt. Disabling `zoom` with `configs` removes about 410 of those tokens. The exact count for a request is reported in the response `usage`, and you can estimate it in advance with the [token counting endpoint](https://platform.claude.com/docs/en/build-with-claude/token-counting). -**Computer use tool token usage:** +**Earlier tool versions:** The following figures apply to the `computer_20251124` and `computer_20250124` tool versions, not to `computer_toolset_20260801`: -| Model | Input tokens per tool definition | -| ----------------- | -------------------------------- | -| Claude 4.x models | 735 tokens | +* System prompt overhead: 466–499 tokens added to the system prompt +* Tool definition: about 735 input tokens per tool definition (measured with `computer_20250124`) **Additional token consumption:** -* Screenshot images (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision)) +* Screenshot and zoom images returned in tool results, billed as image input (see [Vision pricing](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size)) * Tool execution results returned to Claude @@ -2178,4 +2216,8 @@ Computer use follows the standard [tool use pricing](https://platform.claude.com Benchmarked recommendations for resolution, thinking effort, and context management + + + Let Claude navigate, read, and interact with webpages in your own browser environment, for tasks that stay inside the browser. + diff --git a/content/en/agents-and-tools/tool-use/define-tools.md b/content/en/agents-and-tools/tool-use/define-tools.md index eaea37f04d..a77b8eee2b 100644 --- a/content/en/agents-and-tools/tool-use/define-tools.md +++ b/content/en/agents-and-tools/tool-use/define-tools.md @@ -21,7 +21,7 @@ Use Claude Haiku models for straightforward tools, but note they may infer missi ## Specifying client tools -Client tools (both Anthropic-schema and user-defined) are specified in the `tools` top-level parameter of the API request. Each tool definition includes: +Client tools are specified in the `tools` top-level parameter of the API request. Anthropic-schema client tools, such as the bash and text editor tools, are declared by a date-versioned `type`; see each tool's page, linked from the [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference), for the fields it accepts. The computer use and browser use tools are [client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets): a single entry with no `name` that declares a fixed set of member tools. A user-defined tool definition includes: | Parameter | Description | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -30,7 +30,7 @@ Client tools (both Anthropic-schema and user-defined) are specified in the `tool | `input_schema` | A [JSON Schema](https://json-schema.org/) object defining the expected parameters for the tool. | | `input_examples` | (Optional) An array of example input objects to help Claude understand how to use the tool. See [Providing tool use examples](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples). | -For the full set of optional properties available on any tool definition, including `cache_control`, `strict`, `defer_loading`, and `allowed_callers`, see the [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#tool-definition-properties). +For the full set of optional properties available on any single tool definition, including `cache_control`, `strict`, `defer_loading`, and `allowed_callers`, see the [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#tool-definition-properties). A client toolset entry accepts `cache_control` and `allowed_callers` on the entry and sets `defer_loading` per member; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). ```json JSON @@ -400,7 +400,7 @@ Add an optional `input_examples` field to your tool definition with an array of if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -551,7 +551,7 @@ Examples are included in the prompt alongside your tool schema, showing Claude c ### Requirements and limitations * **Schema validation** - Each example must be valid according to the tool's `input_schema`. Invalid examples return a 400 error -* **Not supported for server-side tools** - Input examples work on user-defined and Anthropic-schema client tools, but not on server tools such as web search or code execution +* **Not supported for server-side tools or client toolsets** - Input examples work on user-defined and Anthropic-schema client tools other than the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets, but not on server tools such as web search or code execution * **Token cost** - Examples add to prompt tokens: \~20–50 tokens for simple examples, \~100–200 tokens for complex nested objects ## Controlling Claude's output @@ -738,7 +738,7 @@ In some cases, you may want Claude to use a specific tool to answer the user's q if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java diff --git a/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md b/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md index f521f7f097..b2e85f2c57 100644 --- a/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md +++ b/content/en/agents-and-tools/tool-use/fine-grained-tool-streaming.md @@ -18,7 +18,7 @@ Fine-grained tool streaming delivers a tool's input to your client as Claude gen All models support fine-grained tool streaming on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). To use it, set `eager_input_streaming` to `true` on any user-defined tool where you want fine-grained streaming enabled, and enable streaming on your request. -The `eager_input_streaming` field is optional. Setting it to `true` turns on fine-grained streaming for that tool, and omitting it gives you standard buffered streaming, in which the API buffers and validates each parameter value before streaming it back. The exception is a request that still sends the legacy `fine-grained-tool-streaming-2025-05-14` beta header, which turns fine-grained streaming on for tools that leave the field unset. The per-tool field replaces that header, and an explicit `false` keeps buffered streaming for a tool even when a request still sends it. See [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference) for the field definition. +The `eager_input_streaming` field is optional. Setting it to `true` turns on fine-grained streaming for that tool, and omitting it gives you standard buffered streaming, in which the API buffers and validates each parameter value before streaming it back. The exception is a request that still sends the legacy `fine-grained-tool-streaming-2025-05-14` beta header, which turns fine-grained streaming on for tools that leave the field unset. The per-tool field replaces that header, and an explicit `false` keeps buffered streaming for a tool even when a request still sends it. The legacy header cannot be combined with a [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) or [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entry: the API rejects a request that sends both, so remove the header and set `eager_input_streaming` on the user-defined tools that need it. See [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference) for the field definition. The following example turns on fine-grained streaming for a `make_file` tool and asks Claude for a long poem, so the tool input is large enough to watch it stream in: diff --git a/content/en/agents-and-tools/tool-use/handle-tool-calls.md b/content/en/agents-and-tools/tool-use/handle-tool-calls.md index e2edda5ba9..f6df736e76 100644 --- a/content/en/agents-and-tools/tool-use/handle-tool-calls.md +++ b/content/en/agents-and-tools/tool-use/handle-tool-calls.md @@ -20,6 +20,8 @@ The response will have a `stop_reason` of `tool_use` and one or more `tool_use` * `name`: The name of the tool being used. * `input`: An object containing the input being passed to the tool, conforming to the tool's `input_schema`. +A `tool_use` block for a member of the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) or [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset also carries a `toolset_name` field (`"computer"` or `"browser"`). Its `name` is the member tool Claude is calling, such as `screenshot` or `navigate`, so dispatch those blocks on both fields. + ```json JSON { @@ -55,6 +57,8 @@ When you receive a tool use response for a client tool, you should: * `content` (optional): The result of the tool, as a string (for example, `"content": "15 degrees"`), a list of nested content blocks (for example, `"content": [{"type": "text", "text": "15 degrees"}]`), or a list of document blocks (for example, `"content": [{"type": "document", "source": {"type": "text", "media_type": "text/plain", "data": "15 degrees"}}]`). These content blocks can use the `text`, `image`, `document`, or [`search_result`](https://platform.claude.com/docs/en/build-with-claude/search-results) types. * `is_error` (optional): Set to `true` if the tool execution resulted in an error. +A `tool_result` that answers a computer use or browser use member block must also echo the same `toolset_name` value as the `tool_use` block; a member result that omits it is rejected. Its `content` is also narrower: a member result may contain only `text` and `image` blocks, and a browser use result may add one [`browser_state`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#track-tabs-and-page-state) block (the [tab-management members](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#tab-management-results) return only that block). + **Important formatting requirements:** diff --git a/content/en/agents-and-tools/tool-use/how-tool-use-works.md b/content/en/agents-and-tools/tool-use/how-tool-use-works.md index 14ad318e66..514c5792a0 100644 --- a/content/en/agents-and-tools/tool-use/how-tool-use-works.md +++ b/content/en/agents-and-tools/tool-use/how-tool-use-works.md @@ -24,7 +24,7 @@ When Claude calls one of your tools, the API response contains a `tool_use` bloc ### Anthropic-schema tools (client-executed) -For a handful of common operations (managing scratchpad memory, running shell commands, editing files, controlling a browser), Anthropic publishes the tool schema and your application handles execution. The tools in this category are [`memory`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool), [`bash`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), [`text_editor`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool), and [`computer`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool). +For a handful of common operations (managing scratchpad memory, running shell commands, editing files, controlling a desktop or a browser), Anthropic publishes the tool schema and your application handles execution. The tools in this category are [`memory`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool), [`bash`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool), [`text_editor`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool), [`computer`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), and [`browser`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool). The execution model is identical to user-defined tools: the response contains a `tool_use` block, your code runs the operation, and you send back a `tool_result`. The reason to use an Anthropic-schema tool instead of defining your own equivalent is that these schemas are trained-in. Claude has been optimized on thousands of successful trajectories that use these exact tool signatures, so it calls them more reliably and recovers from errors more gracefully than it would with a custom tool that does the same thing. The schema is the interface the model already expects. @@ -77,11 +77,11 @@ Tool use doesn't fit when: ## Choosing between approaches -| Approach | When to use it | What to expect | Learn more | -| ----------------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | -| User-defined client tools | Custom business logic, internal APIs, proprietary data | You handle execution and the agentic loop | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools) | -| Anthropic-schema client tools | Standard dev operations (bash, file editing, browser control) | You handle execution; Claude calls the tool reliably because the schema is trained-in | [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference) | -| Server-executed tools | Web search, code sandbox, web fetch | Anthropic handles execution; you read the results instead of producing them | [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) | +| Approach | When to use it | What to expect | Learn more | +| ----------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | +| User-defined client tools | Custom business logic, internal APIs, proprietary data | You handle execution and the agentic loop | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools) | +| Anthropic-schema client tools | Standard dev operations (bash, file editing, desktop and browser control) | You handle execution; Claude calls the tool reliably because the schema is trained-in | [Tool reference](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference) | +| Server-executed tools | Web search, code sandbox, web fetch | Anthropic handles execution; you read the results instead of producing them | [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) | ## Next steps diff --git a/content/en/agents-and-tools/tool-use/overview.md b/content/en/agents-and-tools/tool-use/overview.md index 0a42d595b7..075e7a3c0c 100644 --- a/content/en/agents-and-tools/tool-use/overview.md +++ b/content/en/agents-and-tools/tool-use/overview.md @@ -4,7 +4,7 @@ url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview description: Connect Claude to external tools and APIs. See where tools execute, when Claude calls them, and which tool fits your task. --- -Tool use lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools). +Tool use (also called function calling) lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools). Here's a minimal example using a server tool, the [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool), which Anthropic executes for you: @@ -175,8 +175,9 @@ Here's that round trip in full for a client tool. The first request defines a `g echo "Claude called $(echo "$TOOL_USE" | jq -r '.name') with $(echo "$TOOL_USE" | jq -c '.input')" # Run the tool, then send the result back in a tool_result block. + # Claude uses the result to answer the original question. WEATHER="15 degrees Celsius, partly cloudy" - FOLLOWUP=$(curl -s https://api.anthropic.com/v1/messages \ + curl -s https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/json" \ @@ -198,10 +199,7 @@ Here's that round trip in full for a client tool. The first request defines a `g {type: "tool_result", tool_use_id: $tool_use_id, content: $weather} ]} ] - }')") - - # Claude uses the result to answer the original question. - echo "$FOLLOWUP" | jq -r '.content[] | select(.type == "text") | .text' + }')" ``` ```bash CLI @@ -246,10 +244,9 @@ Here's that round trip in full for a client tool. The first request defines a `g {type: "tool_result", tool_use_id: $tool_use_id, content: $weather} ]} ]' <<<"$MESSAGES") - FOLLOWUP=$(call_api) # Claude uses the result to answer the original question. - jq -r '.content[] | select(.type == "text") | .text' <<<"$FOLLOWUP" + call_api ``` ```python Python @@ -809,6 +806,10 @@ Anthropic publishes the schema and trains Claude on it. Your application still e Take screenshots and control the mouse and keyboard in a desktop environment. + + + Navigate, read, and interact with webpages in your own browser environment. + ### Server tools @@ -816,7 +817,7 @@ Anthropic publishes the schema and trains Claude on it. Your application still e Server tools run on Anthropic's infrastructure, with no handler code in your application. See [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools) for the mechanics they share. - + Search the web for information beyond the knowledge cutoff, with cited sources. diff --git a/content/en/agents-and-tools/tool-use/parallel-tool-use.md b/content/en/agents-and-tools/tool-use/parallel-tool-use.md index 14efbac23a..88bb39a314 100644 --- a/content/en/agents-and-tools/tool-use/parallel-tool-use.md +++ b/content/en/agents-and-tools/tool-use/parallel-tool-use.md @@ -23,6 +23,8 @@ Whichever strategy you use, return one `tool_result` for each `tool_use` block, } ``` +The [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions) and the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions) are stricter. When Claude returns several of their member tool calls in one turn (a batch action), run them sequentially in the order they appear and stop at the first failure; each tool defines the exact text to return for the calls you skip. + ## Test parallel tool calls @@ -1567,7 +1569,7 @@ To verify parallel tool calls are working: **4. Calls in a batch appear to depend on each other** -Execution order is your choice. If your tools have ordering dependencies, running the batch sequentially and stopping on the first failure is a valid strategy: return `is_error: true` for any call you didn't run. If you run in parallel and a call fails because its prerequisite hadn't completed, return `is_error: true` with the natural error message. Claude will reissue the call on the next turn. To reduce dependent calls appearing together, add this to your system prompt: "Only batch tool calls that are independent of each other." +Execution order is your choice. If your tools have ordering dependencies, running the batch sequentially and stopping on the first failure is a valid strategy (and the required one for the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions) tools): return `is_error: true` for any call you didn't run. If you run in parallel and a call fails because its prerequisite hadn't completed, return `is_error: true` with the natural error message. Claude will reissue the call on the next turn. To reduce dependent calls appearing together, add this to your system prompt: "Only batch tool calls that are independent of each other." ## Next steps diff --git a/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md b/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md index 7b1c0af334..76a5b6dafb 100644 --- a/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md +++ b/content/en/agents-and-tools/tool-use/programmatic-tool-calling.md @@ -249,7 +249,7 @@ Here's an example where Claude programmatically queries a database multiple time if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -874,7 +874,7 @@ Send the full conversation history plus your tool result. Three details matter o response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 4096, - Container: anthropic.MessageNewParamsContainerUnion{ + Container: anthropic.MessageCreateParamsContainerUnion{ OfString: anthropic.String("container_xyz789"), }, Messages: []anthropic.MessageParam{ @@ -936,7 +936,7 @@ Send the full conversation history plus your tool result. Three details matter o if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -1367,6 +1367,7 @@ To work around this, do one of the following: The following tools cannot be called programmatically: * Tools provided by an [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) +* The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801`), whose `allowed_callers` field accepts only `"direct"` ### Message formatting restrictions diff --git a/content/en/agents-and-tools/tool-use/server-tools.md b/content/en/agents-and-tools/tool-use/server-tools.md index ed270b1f69..8a4b2f6939 100644 --- a/content/en/agents-and-tools/tool-use/server-tools.md +++ b/content/en/agents-and-tools/tool-use/server-tools.md @@ -45,13 +45,13 @@ Here's how to handle the `pause_turn` stop reason: } ], "tools": [{"type": "web_search_20250305", "name": "web_search", "max_uses": 10}] - }' | jq '{stop_reason, content}' + }' ``` ```bash CLI # Initial request. If "stop_reason" in the output is "pause_turn", re-run with # the assistant content appended to messages (see the SDK tabs). - ant messages create --format json <<'YAML' | jq '{stop_reason, content}' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 1024 tools: @@ -530,14 +530,14 @@ The following example enables web fetch together with a user-defined `run_comman } } ] - }' | jq '{stop_reason, content}' + }' ``` ```bash CLI # If "stop_reason" is "tool_use" and a server_tool_use block has no matching # result block, run the client tools and re-run with a user message of only # their tool_result blocks appended (see the SDK tabs). - ant messages create --format json <<'YAML' | jq '{stop_reason, content}' + ant messages create <<'YAML' model: claude-opus-4-8 max_tokens: 1024 messages: @@ -1064,7 +1064,7 @@ When using domain filters: Invalid domain formats are rejected at request time with a 400 `invalid_request_error`. - Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. Domains your organization blocks are removed from a request-level allowed list rather than returning an error. + Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. A request-level allowed list that includes a domain your organization blocks is rejected with a `400` error that names the conflicting entries. @@ -1102,7 +1102,7 @@ Common batch workloads include enriching a dataset with information from the web Fix the most common tool-use errors with symptom-to-fix diagnostic tables. - + Search the web and cite results. diff --git a/content/en/agents-and-tools/tool-use/strict-tool-use.md b/content/en/agents-and-tools/tool-use/strict-tool-use.md index c4298c1e23..2743c7746a 100644 --- a/content/en/agents-and-tools/tool-use/strict-tool-use.md +++ b/content/en/agents-and-tools/tool-use/strict-tool-use.md @@ -380,6 +380,8 @@ For example, suppose a booking system needs `passengers: int`. Without strict mo +The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entries (`computer_toolset_20260801` and `browser_toolset_20260801`) don't accept `strict: true`; a request that sets it on either entry is rejected. + ## Common use cases @@ -577,7 +579,7 @@ For example, suppose a booking system needs `passengers: int`. Without strict mo if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -962,7 +964,7 @@ For example, suppose a booking system needs `passengers: int`. Without strict mo if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java diff --git a/content/en/agents-and-tools/tool-use/tool-combinations.md b/content/en/agents-and-tools/tool-use/tool-combinations.md index 4f6dc883d6..b9d5a57157 100644 --- a/content/en/agents-and-tools/tool-use/tool-combinations.md +++ b/content/en/agents-and-tools/tool-use/tool-combinations.md @@ -53,7 +53,7 @@ Search surfaces candidate URLs; fetch retrieves full page content for the releva This pairing is useful when the answer lives in long-form content (documentation pages, articles, specifications) that a search snippet can't fully capture. Fetch pulls the complete page so Claude can cite specific passages. -## Long-running agent: memory + any toolset +## Long-running agent: memory + any other tools Memory persists state across conversations; the other tools do the work. Add memory to any agent that needs to remember prior sessions, such as a support agent that recalls a customer's earlier issues or a project assistant that tracks decisions made last week. @@ -65,7 +65,7 @@ Memory persists state across conversations; the other tools do the work. Add mem Add your other tools alongside `memory` in the same array. -Memory is orthogonal to the rest of your toolset. It doesn't change how other tools behave; it gives Claude a place to write down and later retrieve facts that would otherwise be lost when the context window resets. See [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) for the storage model. +Memory is orthogonal to your other tools. It doesn't change how they behave; it gives Claude a place to write down and later retrieve facts that would otherwise be lost when the context window resets. See [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) for the storage model. ## All-in-one: computer\_use @@ -73,18 +73,25 @@ The computer use tool subsumes most others by operating a full desktop. Claude s ```json { - "tools": [ - { - "type": "computer_20250124", - "name": "computer", - "display_width_px": 1280, - "display_height_px": 800 - } - ] + "tools": [{ "type": "computer_toolset_20260801" }] +} +``` + +The toolset entry takes no `name` or display dimensions: coordinates are expressed in the pixel space of the screenshots you return, and you can turn individual actions off through the entry's `configs` field. + +Computer use is the most general option and also the slowest, because Claude typically needs a fresh screenshot after each batch of actions. Prefer narrower tools when they cover your use case, and reach for computer use when nothing else fits. If the task stays inside a web browser, use the browser agent pattern in the next section. See [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) for the sandbox setup. + +## Browser agent: browser\_use + +When the whole task happens inside webpages (filling forms, reading page content, working across tabs), the browser use tool is a closer fit than computer use. Your application drives a browser it controls and returns screenshots or page state; Claude calls page-aware member tools such as `read_page`, `find`, `form_input`, and `get_page_text` alongside clicks and typing, so it can act on element references in addition to pixel coordinates. + +```json +{ + "tools": [{ "type": "browser_toolset_20260801" }] } ``` -Computer use is the most general option and also the slowest, because every action requires a screenshot roundtrip. Prefer narrower tools when they cover your use case, and reach for computer use when nothing else fits. See [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) for the sandbox setup. +Like the computer use toolset, the entry takes no `name`, and you turn individual member tools off through its `configs` field. See [Browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) for the execution contract. ## Next steps diff --git a/content/en/agents-and-tools/tool-use/tool-reference.md b/content/en/agents-and-tools/tool-use/tool-reference.md index e51453311e..8a2e45f659 100644 --- a/content/en/agents-and-tools/tool-use/tool-reference.md +++ b/content/en/agents-and-tools/tool-use/tool-reference.md @@ -1,7 +1,7 @@ --- title: Tool reference url: https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference -description: Directory of Anthropic-provided tools and reference for optional tool definition properties. +description: Directory of Anthropic-provided server tools, client tools, and client toolsets, plus reference for optional tool definition properties. --- This page is a reference for the tools Anthropic provides and the optional properties you can set on any tool definition. For a conceptual introduction to tool use, see [Tool use with Claude](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview). For guidance on implementing tool use in your application, see [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools). @@ -10,18 +10,19 @@ This page is a reference for the tools Anthropic provides and the optional prope Anthropic provides two kinds of tools: **server tools** that execute on Anthropic's infrastructure, and **client tools** where Anthropic defines the schema but your application handles execution. Both kinds appear in your request's `tools` array alongside any user-defined tools. -| Tool | `type` | Execution | Status | -| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------- | --------------------------------------------------------- | -| [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | `web_search_20260318` `web_search_20260209` `web_search_20250305` | Server | GA | -| [Web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `web_fetch_20260318` `web_fetch_20260309` `web_fetch_20260209` `web_fetch_20250910` | Server | GA | -| [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) | `code_execution_20260521` `code_execution_20260120` `code_execution_20250825` | Server | GA | -| [Advisor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool) | `advisor_20260301` | Server | Beta: `advisor-tool-2026-03-01` | -| [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | `tool_search_tool_regex_20251119` `tool_search_tool_bm25_20251119` | Server | GA | -| [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) | `mcp_toolset` | Server | Beta: `mcp-client-2025-11-20` | -| [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | `memory_20250818` | Client | GA | -| [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | `bash_20250124` | Client | GA | -| [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | `text_editor_20250728` `text_editor_20250124` | Client | GA | -| [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | `computer_20251124` `computer_20250124` | Client | Beta: `computer-use-2025-11-24` `computer-use-2025-01-24` | +| Tool | `type` | Execution | Status | +| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------ | +| [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | `web_search_20260318` `web_search_20260209` `web_search_20250305` | Server | GA | +| [Web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `web_fetch_20260318` `web_fetch_20260309` `web_fetch_20260209` `web_fetch_20250910` | Server | GA | +| [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) | `code_execution_20260521` `code_execution_20260120` `code_execution_20250825` | Server | GA | +| [Advisor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool) | `advisor_20260301` | Server | Beta: `advisor-tool-2026-03-01` | +| [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | `tool_search_tool_regex_20251119` `tool_search_tool_bm25_20251119` | Server | GA | +| [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) | `mcp_toolset` | Server | Beta: `mcp-client-2025-11-20` | +| [Memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | `memory_20250818` | Client | GA | +| [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | `bash_20250124` | Client | GA | +| [Text editor tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | `text_editor_20250728` `text_editor_20250124` | Client | GA | +| [Computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | `computer_toolset_20260801` `computer_20251124` `computer_20250124` | Client | GA Beta: `computer-use-2025-11-24` Beta: `computer-use-2025-01-24` | +| [Browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | `browser_toolset_20260801` | Client | GA | For model compatibility, see each tool's page. Supported models vary by tool and by tool version. @@ -39,21 +40,60 @@ When a tool has multiple active versions, the relationship between them varies: * **Model-keyed:** `text_editor_20250728` is for Claude 4 and later models and `text_editor_20250124` is for earlier models. The version you use depends on the model you target. * **Variant, not version:** `tool_search_tool_regex_20251119` and `tool_search_tool_bm25_20251119` are two search algorithms released together. Neither supersedes the other. * **Legacy:** `code_execution_20250522` supports only Python. `code_execution_20250825` adds Bash and file operations. +* **Successor:** `computer_toolset_20260801` is the generally available successor to the beta `computer_20251124` and `computer_20250124` versions, which remain available for existing integrations and for models that don't support the toolset ([Earlier tool versions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions)). `browser_toolset_20260801` is the first version of the browser use tool. Both are [client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). The `mcp_toolset` type is not date-versioned; versioning is carried in the `anthropic-beta` header instead. +### Client toolsets + +The [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) are Anthropic-defined client toolsets: one entry in `tools` declares a fixed set of member tools whose names, descriptions, and input schemas Anthropic defines, and your application executes every call. The entry takes no `name`, because the dated `type` fixes the member names. `configs`, `cache_control`, and `allowed_callers` (which accepts only `["direct"]`) are optional. + +Client toolsets are Messages API tools. They aren't currently available as agent tools in [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/tools), which provides its own built-in agent toolset, MCP toolsets, and custom tools. + +```json +{ + "type": "browser_toolset_20260801", + "configs": { + "javascript_exec": { "enabled": true } + }, + "cache_control": { "type": "ephemeral" } +} +``` + +`configs` adjusts individual members: + +* Keys are member names, and each value accepts only `enabled` and `defer_loading`. +* A member you omit keeps its defaults. An absent value, `{}`, and a restated default are equivalent. +* An unknown member name or any other field in a member's value is rejected, as is a `configs` that disables every member (omit the entry instead). +* A disabled member is removed from the tools Claude sees. If Claude still names it, return an error `tool_result`. + +Set `defer_loading` per member, never on the entry, and give every enabled member the same value: under [tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#deferred-tool-loading) the toolset loads and expands as one definition. When every enabled member defers, only a [tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) that isn't itself deferred can surface the toolset, so declare one in the same request. Don't put `cache_control` on a toolset entry whose members defer; set the breakpoint on a non-deferred tool instead, because deferred definitions are not part of the cached prefix. + +`cache_control` goes on the entry only; for where the breakpoint lands, including markers inside a batch action, see [Tool use with prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching#cache-control-on-tool-definitions). + +**Handle member tool calls.** Claude calls a member with a `tool_use` block whose `name` is the member name and whose `toolset_name` is `computer` or `browser`; `input` holds that member's parameters and no `action` field. Dispatch on the `toolset_name` and `name` pair, because a custom tool may share a member's name and the two toolsets share names such as `screenshot`. Only member results echo `toolset_name`. Several member calls in one turn form a batch action that you run in order ([computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#batch-actions)). New members arrive only with a new dated `type`. + +**Not supported on toolset entries.** The API rejects each of these with an `invalid_request_error`: + +* `strict: true` or `input_examples`. +* `defer_loading` on the entry, or enabled members whose `defer_loading` values differ (set it per member in `configs`, all to the same value). +* A code execution caller in `allowed_callers` (no [programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling)). +* The legacy `fine-grained-tool-streaming-2025-05-14` beta header. When you stream, each member's `input` arrives as one complete `input_json_delta`. +* A `tool_choice` of type `tool` that names the toolset or a member (use `auto`, `any`, or `none`). +* Two entries of the same toolset, or another tool that carries that toolset's name: a tool named `computer` alongside `computer_toolset_20260801`, or a tool named `browser` alongside `browser_toolset_20260801`. The two toolsets can be declared together. + ## Tool definition properties Every tool in the `tools` array, including user-defined tools, accepts optional properties that control how the tool is loaded, who can call it, and how its inputs are validated. These properties compose: you can set `defer_loading` and `cache_control` and `strict` on the same tool. -| Property | Purpose | Available on | Detailed guide | -| ----------------------- | --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `cache_control` | Set a prompt-cache breakpoint at this tool definition | All tools | [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | -| `strict` | Guarantee schema validation on tool names and inputs | All tools except `mcp_toolset` | [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) | -| `defer_loading` | Exclude the tool from the initial system prompt; load it on demand when tool search returns a `tool_reference` for it | All tools (for `mcp_toolset`, see [tool configuration](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector#mcp-toolset-configuration)) | [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | -| `allowed_callers` | Restrict which callers can call the tool | All tools except `mcp_toolset` | [Programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#the-allowed-callers-field) | -| `input_examples` | Provide example input objects to help Claude understand how to call the tool | User-defined and Anthropic-schema client tools. Not available on server tools. | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples) | -| `eager_input_streaming` | Enable fine-grained input streaming (`true`) or keep standard buffered streaming (`false`) for this tool | User-defined tools only | [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) | +| Property | Purpose | Available on | Detailed guide | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| `cache_control` | Set a prompt-cache breakpoint at this tool definition | All tools (on `computer_toolset_20260801` and `browser_toolset_20260801`, set it on the toolset entry itself, not inside member `configs`) | [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) | +| `strict` | Guarantee schema validation on tool names and inputs | All tools except `mcp_toolset`, `computer_toolset_20260801`, and `browser_toolset_20260801` | [Strict tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) | +| `defer_loading` | Exclude the tool from the initial system prompt; load it on demand when tool search returns a `tool_reference` for it | All tools (for `mcp_toolset`, see [tool configuration](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector#mcp-toolset-configuration)). On the computer use and browser use toolsets, set it per member inside `configs`; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets). | [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | +| `allowed_callers` | Restrict which callers can call the tool | All tools except `mcp_toolset` (on `computer_toolset_20260801` and `browser_toolset_20260801`, only `["direct"]` is accepted; see [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets)) | [Programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#the-allowed-callers-field) | +| `input_examples` | Provide example input objects to help Claude understand how to call the tool | User-defined and Anthropic-schema client tools, except `computer_toolset_20260801` and `browser_toolset_20260801`. Not available on server tools. | [Define tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples) | +| `eager_input_streaming` | Enable fine-grained input streaming (`true`) or keep standard buffered streaming (`false`) for this tool | User-defined tools only | [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) | ### `allowed_callers` values diff --git a/content/en/agents-and-tools/tool-use/tool-search-tool.md b/content/en/agents-and-tools/tool-use/tool-search-tool.md index 0d844b9b34..265765fd70 100644 --- a/content/en/agents-and-tools/tool-use/tool-search-tool.md +++ b/content/en/agents-and-tools/tool-use/tool-search-tool.md @@ -365,7 +365,7 @@ The following example includes the tool search tool and two deferred tools: if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -593,6 +593,8 @@ Mark tools for on-demand loading by adding `defer_loading: true`: * Never set `defer_loading: true` on the tool search tool itself. * Keep your 3–5 most frequently used tools non-deferred so Claude can call them without searching first. +The computer use and browser use toolsets (`computer_toolset_20260801` and `browser_toolset_20260801`) take `defer_loading` per member tool inside the entry's `configs` object, not on the entry itself; a request that sets it at the entry level is rejected. Because a toolset defers and expands as a unit, `defer_loading` must resolve to the same value on every enabled member, and when Claude discovers the toolset through search, every enabled member loads at once. See [Client toolsets](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#client-toolsets) for the `configs` format. + Both tool search variants (`regex` and `bm25`) search tool names, descriptions, argument names, and argument descriptions. Internally, the API excludes deferred tools from the system-prompt prefix. When Claude discovers a deferred tool through tool search, the API appends a `tool_reference` block inline in the conversation, then expands it into the full tool definition before passing it to Claude. The prefix is untouched, so prompt caching is preserved. The grammar for [strict mode](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use) (the rules that constrain tool-call output to match your schemas) builds from the full toolset, so `defer_loading` and strict mode compose without grammar recompilation. diff --git a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md index 6b18d70aa2..780b737cd3 100644 --- a/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md +++ b/content/en/agents-and-tools/tool-use/tool-use-with-prompt-caching.md @@ -42,6 +42,8 @@ Place `cache_control: {"type": "ephemeral"}` on the last tool in your `tools` ar For `mcp_toolset`, the `cache_control` breakpoint lands on the last tool in the set. You don't control tool order within an MCP toolset, so place the breakpoint on the `mcp_toolset` entry itself and the API applies it to the final expanded tool. +The [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolset entries follow the same rule: place `cache_control` on the toolset entry itself, and the breakpoint lands after the toolset's definition. It isn't accepted inside a member's `configs` entry, because the toolset's members load as one definition. Within a [batch action](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#batch-actions), a `cache_control` marker on any of the turn's member `tool_use` or `tool_result` blocks is accepted and takes effect at the end of that batch, so several markers in one batch act as a single breakpoint. Each marker still counts toward the request's limit of [four breakpoints](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#when-to-use-multiple-breakpoints), so use one per turn. + ## defer\_loading and cache preservation Deferred tools are not included in the system-prompt prefix. When the model discovers a deferred tool through [tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), the definition is appended inline as a `tool_reference` block in the conversation history. The prefix is untouched, so prompt caching is preserved. @@ -78,16 +80,17 @@ This behavior only applies when your request already has at least one `cache_con ## Per-tool interaction table -| Tool | Caching considerations | -| --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | -| [Web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | Enabling or disabling invalidates the system and messages caches | -| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | Enabling or disabling invalidates the system and messages caches | -| [Code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) | Container state is independent of prompt cache | -| [Tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | Discovered tools load as `tool_reference` blocks, preserving prefix cache | -| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | Screenshot presence affects messages cache | -| [Text editor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | Standard client tool, no special caching interaction | -| [Bash](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | Standard client tool, no special caching interaction | -| [Memory](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | Standard client tool, no special caching interaction | +| Tool | Caching considerations | +| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | Enabling or disabling invalidates the system and messages caches | +| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | Enabling or disabling invalidates the system and messages caches | +| [Code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) | Container state is independent of prompt cache | +| [Tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | Discovered tools load as `tool_reference` blocks, preserving prefix cache | +| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | Screenshot presence affects messages cache; `cache_control` goes on the toolset entry (see [cache\_control on tool definitions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching#cache-control-on-tool-definitions)) | +| [Browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | Screenshot presence affects messages cache; `cache_control` goes on the toolset entry (see [cache\_control on tool definitions](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching#cache-control-on-tool-definitions)) | +| [Text editor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | Standard client tool, no special caching interaction | +| [Bash](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | Standard client tool, no special caching interaction | +| [Memory](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | Standard client tool, no special caching interaction | ## Next steps diff --git a/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md b/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md index 4a357f43a8..c6ad43fae6 100644 --- a/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md +++ b/content/en/agents-and-tools/tool-use/troubleshooting-tool-use.md @@ -37,12 +37,12 @@ Symptom-to-fix tables for the most common tool-use errors. Each fix cross-refere ## Errors at request time -| Error | Cause | Fix | -| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). | -| `was found without a corresponding _tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). | -| `Input schema is not compatible with strict mode: string patterns are not supported` | Using `pattern` with `strict: true` | Remove the pattern or drop `strict: true`. The `pattern` keyword is not in the supported JSON Schema subset yet. | -| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. | +| Error | Cause | Fix | +| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). | +| `was found without a corresponding _tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). | +| `Unsupported regex feature in pattern field: ...` | A `pattern` in a strict tool's `input_schema` uses a regex feature that strict mode can't compile, such as a backreference, a lookaround, a word boundary, or a large `{n,m}` range | Simplify the pattern. Anchored patterns with basic quantifiers, character classes, and groups are supported; see [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). | +| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. | ## Error: thinking blocks cannot be modified @@ -74,6 +74,6 @@ See [Thinking blocks cannot be modified](https://platform.claude.com/docs/en/api - Full directory of Anthropic-schema tools and their version strings. + Full directory of Anthropic-provided tools and their version strings. diff --git a/content/en/agents-and-tools/tool-use/web-fetch-tool.md b/content/en/agents-and-tools/tool-use/web-fetch-tool.md index fe4fc5471e..5dd4c60e46 100644 --- a/content/en/agents-and-tools/tool-use/web-fetch-tool.md +++ b/content/en/agents-and-tools/tool-use/web-fetch-tool.md @@ -50,7 +50,7 @@ When you add the web fetch tool to your API request: 4. Claude analyzes the fetched content and provides a response with optional citations. - The web fetch tool currently does not support websites dynamically rendered with JavaScript. + The web fetch tool currently does not support websites dynamically rendered with JavaScript. For pages that need a real browser (JavaScript rendering, clicking, or filling forms), consider the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), a client tool where your application drives the browser and returns page text or screenshots to Claude as tool results. ### When Claude fetches @@ -183,7 +183,7 @@ To enable dynamic filtering, use `web_fetch_20260209` or any later version. The if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -348,7 +348,7 @@ Provide the web fetch tool in your API request: if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java @@ -800,7 +800,7 @@ When both the web search and web fetch tools are enabled, and the user names a s if err != nil { log.Fatal(err) } - fmt.Println(response) + fmt.Println(response.RawJSON()) ``` ```java Java diff --git a/content/en/api/beta-headers.md b/content/en/api/beta-headers.md index 949d94cd5f..6aba8cb784 100644 --- a/content/en/api/beta-headers.md +++ b/content/en/api/beta-headers.md @@ -24,14 +24,14 @@ content-type: application/json Each feature's documentation states the exact beta name to send. The [API overview](https://platform.claude.com/docs/en/api/overview) lists the APIs currently in beta. -The following examples show the same request with cURL, the `ant` CLI, and the SDKs. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: +The following examples show the same request with cURL, the `ant` CLI, and the SDKs, using the [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) beta as the example. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you: ```bash cURL curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ + -H "anthropic-beta: context-management-2025-06-27" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -44,7 +44,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S ```bash CLI ant beta:messages create \ - --beta files-api-2025-04-14 \ + --beta context-management-2025-06-27 \ --model claude-opus-5 \ --max-tokens 1024 \ --message '{role: user, content: "Hello, Claude"}' @@ -57,7 +57,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S model="claude-opus-5", max_tokens=1024, messages=[{"role": "user", "content": "Hello, Claude"}], - betas=["files-api-2025-04-14"], + betas=["context-management-2025-06-27"], ) print(response.content) @@ -70,7 +70,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S model: "claude-opus-5", max_tokens: 1024, messages: [{ role: "user", content: "Hello, Claude" }], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] }); console.log(msg.content); @@ -85,7 +85,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S Model = "claude-opus-5", MaxTokens = 1024, Messages = [new() { Role = Role.User, Content = "Hello, Claude" }], - Betas = ["files-api-2025-04-14"], + Betas = ["context-management-2025-06-27"], } ); @@ -101,7 +101,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S Messages: []anthropic.BetaMessageParam{ anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Hello, Claude")), }, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, + Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaContextManagement2025_06_27}, }) if err != nil { panic(err) @@ -117,7 +117,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S .model(Model.CLAUDE_OPUS_5) .maxTokens(1024) .addUserMessage("Hello, Claude") - .addBeta(AnthropicBeta.FILES_API_2025_04_14) + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) .build(); BetaMessage message = client.beta().messages().create(params); @@ -131,7 +131,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], model: 'claude-opus-5', - betas: ['files-api-2025-04-14'], + betas: ['context-management-2025-06-27'], ); echo $message; @@ -144,7 +144,7 @@ The following examples show the same request with cURL, the `ant` CLI, and the S model: "claude-opus-5", max_tokens: 1024, messages: [{role: "user", content: "Hello, Claude"}], - betas: ["files-api-2025-04-14"] + betas: ["context-management-2025-06-27"] ) puts(message.content) diff --git a/content/en/api/beta.md b/content/en/api/beta.md index 61efddaee6..68e24d3cbc 100644 --- a/content/en/api/beta.md +++ b/content/en/api/beta.md @@ -9,11 +9,11 @@ url: https://platform.claude.com/docs/en/api/beta ### Anthropic Beta -- `AnthropicBeta = string or "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` +- `AnthropicBeta = string or "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -59,6 +59,8 @@ url: https://platform.claude.com/docs/en/api/beta - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -387,7 +389,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -433,6 +435,8 @@ The Models API response can be used to determine which models are available for - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -617,7 +621,7 @@ curl https://api.anthropic.com/v1/models \ { "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -682,8 +686,8 @@ curl https://api.anthropic.com/v1/models \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" @@ -717,7 +721,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -763,6 +767,8 @@ The Models API response can be used to determine information about a specific mo - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -933,7 +939,7 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ ```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -998,8 +1004,8 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" @@ -1380,7 +1386,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1426,6 +1432,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1658,7 +1666,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -1704,6 +1712,18 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -1742,7 +1762,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -1834,7 +1854,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -1880,7 +1900,11 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -1892,15 +1916,15 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -1920,8 +1944,135 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -2501,141 +2652,104 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -3606,6 +3720,412 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -3836,6 +4356,248 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -4788,7 +5550,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -4830,6 +5592,10 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -6119,7 +6885,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ { @@ -6199,14 +6965,14 @@ curl https://api.anthropic.com/v1/messages \ "type": "model_changed" } }, - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber", "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "claude-sonnet-4-6", + "recommended_model": "claude-opus-4-8", "type": "refusal" }, "stop_reason": "end_turn", @@ -6272,7 +7038,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -6318,6 +7084,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -6540,7 +7308,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -6586,6 +7354,18 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -6624,7 +7404,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -6716,7 +7496,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -6762,7 +7542,11 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -6774,15 +7558,15 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -6802,8 +7586,135 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -7383,141 +8294,104 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -7968,7 +8842,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"none"` -- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` +- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` Definitions of tools that the model may use. @@ -8316,6 +9190,412 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -8546,6 +9826,248 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -9285,7 +10807,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.", @@ -10095,6 +11617,1605 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"bash_code_execution_tool_result_error"` +### Beta Browser Close Tab Config + +- `BetaBrowserCloseTabConfig object { defer_loading, enabled }` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Double Click Config + +- `BetaBrowserDoubleClickConfig object { defer_loading, enabled }` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser File Upload Config + +- `BetaBrowserFileUploadConfig object { defer_loading, enabled }` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Find Config + +- `BetaBrowserFindConfig object { defer_loading, enabled }` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Form Input Config + +- `BetaBrowserFormInputConfig object { defer_loading, enabled }` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Get Page Text Config + +- `BetaBrowserGetPageTextConfig object { defer_loading, enabled }` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Hold Key Config + +- `BetaBrowserHoldKeyConfig object { defer_loading, enabled }` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Hover Config + +- `BetaBrowserHoverConfig object { defer_loading, enabled }` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Javascript Exec Config + +- `BetaBrowserJavascriptExecConfig object { defer_loading, enabled }` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Key Config + +- `BetaBrowserKeyConfig object { defer_loading, enabled }` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Left Click Config + +- `BetaBrowserLeftClickConfig object { defer_loading, enabled }` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Left Click Drag Config + +- `BetaBrowserLeftClickDragConfig object { defer_loading, enabled }` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Left Mouse Down Config + +- `BetaBrowserLeftMouseDownConfig object { defer_loading, enabled }` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Left Mouse Up Config + +- `BetaBrowserLeftMouseUpConfig object { defer_loading, enabled }` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser List Tabs Config + +- `BetaBrowserListTabsConfig object { defer_loading, enabled }` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Middle Click Config + +- `BetaBrowserMiddleClickConfig object { defer_loading, enabled }` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Mouse Move Config + +- `BetaBrowserMouseMoveConfig object { defer_loading, enabled }` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Navigate Config + +- `BetaBrowserNavigateConfig object { defer_loading, enabled }` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser New Tab Config + +- `BetaBrowserNewTabConfig object { defer_loading, enabled }` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Read Console Config + +- `BetaBrowserReadConsoleConfig object { defer_loading, enabled }` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Read Network Config + +- `BetaBrowserReadNetworkConfig object { defer_loading, enabled }` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Read Page Config + +- `BetaBrowserReadPageConfig object { defer_loading, enabled }` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Right Click Config + +- `BetaBrowserRightClickConfig object { defer_loading, enabled }` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Screenshot Config + +- `BetaBrowserScreenshotConfig object { defer_loading, enabled }` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Scroll Config + +- `BetaBrowserScrollConfig object { defer_loading, enabled }` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Scroll To Config + +- `BetaBrowserScrollToConfig object { defer_loading, enabled }` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser State Block Param + +- `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Beta Browser State Change + +- `BetaBrowserStateChange = BetaBrowserStateChangeTabOpened or BetaBrowserStateChangeDownloadStarted or BetaBrowserStateChangeDownloadCompleted or BetaBrowserStateChangeDownloadFailed` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Beta Browser State Change Download Completed + +- `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + +### Beta Browser State Change Download Failed + +- `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Beta Browser State Change Download Started + +- `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + +### Beta Browser State Change Tab Opened + +- `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + +### Beta Browser State Tab Entry + +- `BetaBrowserStateTabEntry object { tab_id, title, url, active }` + + One open browser tab reported in a `browser_state` block's `tabs` + inventory. + + `tab_id` is the caller-assigned identifier for the tab; `title` and + `url` describe the page the tab is currently showing and may be empty + strings (a blank tab legitimately has both empty). `active` marks the + tab that is active after this call; whenever `tabs` is non-empty, + exactly one entry is marked. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + +### Beta Browser Switch Tab Config + +- `BetaBrowserSwitchTabConfig object { defer_loading, enabled }` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Toolset 20260801 + +- `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Toolset Configs + +- `BetaBrowserToolsetConfigs object { close_tab, double_click, file_upload, 28 more }` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Triple Click Config + +- `BetaBrowserTripleClickConfig object { defer_loading, enabled }` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Type Config + +- `BetaBrowserTypeConfig object { defer_loading, enabled }` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Wait Config + +- `BetaBrowserWaitConfig object { defer_loading, enabled }` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Browser Zoom Config + +- `BetaBrowserZoomConfig object { defer_loading, enabled }` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + ### Beta Cache Control Ephemeral - `BetaCacheControlEphemeral object { type, ttl }` @@ -11406,67 +14527,783 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `content: optional string or null` + - `content: optional string or null` + + Summary of previously compacted content, or null if compaction failed + + - `encrypted_content: optional string or null` + + Opaque metadata from prior compaction, to be round-tripped verbatim + +### Beta Compaction Content Block Delta + +- `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + + - `content: string or null` + + - `encrypted_content: string or null` + + Opaque metadata from prior compaction, to be round-tripped verbatim + + - `type: "compaction_delta"` + + - `"compaction_delta"` + +### Beta Compaction Iteration Usage + +- `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + + Token usage for a compaction iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `ephemeral_1h_input_tokens: number` + + The number of input tokens used to create the 1 hour cache entry. + + - `ephemeral_5m_input_tokens: number` + + The number of input tokens used to create the 5 minute cache entry. + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "compaction"` + + Usage for a compaction iteration + + - `"compaction"` + +### Beta Computer Cursor Position Config + +- `BetaComputerCursorPositionConfig object { defer_loading, enabled }` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Double Click Config + +- `BetaComputerDoubleClickConfig object { defer_loading, enabled }` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Hold Key Config + +- `BetaComputerHoldKeyConfig object { defer_loading, enabled }` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Key Config + +- `BetaComputerKeyConfig object { defer_loading, enabled }` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Left Click Config + +- `BetaComputerLeftClickConfig object { defer_loading, enabled }` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Left Click Drag Config + +- `BetaComputerLeftClickDragConfig object { defer_loading, enabled }` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Left Mouse Down Config + +- `BetaComputerLeftMouseDownConfig object { defer_loading, enabled }` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Left Mouse Up Config + +- `BetaComputerLeftMouseUpConfig object { defer_loading, enabled }` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Middle Click Config + +- `BetaComputerMiddleClickConfig object { defer_loading, enabled }` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Mouse Move Config + +- `BetaComputerMouseMoveConfig object { defer_loading, enabled }` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Right Click Config + +- `BetaComputerRightClickConfig object { defer_loading, enabled }` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Screenshot Config + +- `BetaComputerScreenshotConfig object { defer_loading, enabled }` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Scroll Config + +- `BetaComputerScrollConfig object { defer_loading, enabled }` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Toolset 20260801 + +- `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `configs: optional BetaComputerToolsetConfigs or null` - Summary of previously compacted content, or null if compaction failed + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `encrypted_content: optional string or null` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - Opaque metadata from prior compaction, to be round-tripped verbatim + `cursor_position`'s config overrides. -### Beta Compaction Content Block Delta + - `defer_loading: optional boolean or null` -- `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: string or null` + - `enabled: optional boolean or null` - - `encrypted_content: string or null` + 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. - Opaque metadata from prior compaction, to be round-tripped verbatim + - `double_click: optional BetaComputerDoubleClickConfig or null` - - `type: "compaction_delta"` + `double_click`'s config overrides. - - `"compaction_delta"` + - `defer_loading: optional boolean or null` -### Beta Compaction Iteration Usage + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `enabled: optional boolean or null` - Token usage for a compaction iteration. + 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. - - `cache_creation: BetaCacheCreation or null` + - `hold_key: optional BetaComputerHoldKeyConfig or null` - Breakdown of cached tokens by TTL + `hold_key`'s config overrides. - - `ephemeral_1h_input_tokens: number` + - `defer_loading: optional boolean or null` - The number of input tokens used to create the 1 hour cache entry. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ephemeral_5m_input_tokens: number` + - `enabled: optional boolean or null` - The number of input tokens used to create the 5 minute cache entry. + 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. - - `cache_creation_input_tokens: number` + - `key: optional BetaComputerKeyConfig or null` - The number of input tokens used to create the cache entry. + `key`'s config overrides. - - `cache_read_input_tokens: number` + - `defer_loading: optional boolean or null` - The number of input tokens read from the cache. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `input_tokens: number` + - `enabled: optional boolean or null` - The number of input tokens which were used. + 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. - - `output_tokens: number` + - `left_click: optional BetaComputerLeftClickConfig or null` - The number of output tokens which were used. + `left_click`'s config overrides. - - `type: "compaction"` + - `defer_loading: optional boolean or null` - Usage for a compaction iteration + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"compaction"` + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Toolset Configs + +- `BetaComputerToolsetConfigs object { cursor_position, double_click, hold_key, 14 more }` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Triple Click Config + +- `BetaComputerTripleClickConfig object { defer_loading, enabled }` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Type Config + +- `BetaComputerTypeConfig object { defer_loading, enabled }` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Wait Config + +- `BetaComputerWaitConfig object { defer_loading, enabled }` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Beta Computer Zoom Config + +- `BetaComputerZoomConfig object { defer_loading, enabled }` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. ### Beta Container @@ -11742,7 +15579,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -11784,6 +15621,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -12490,7 +16331,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Content Block Param -- `BetaContentBlockParam = BetaTextBlockParam or BetaImageBlockParam or BetaRequestDocumentBlock or 21 more` +- `BetaContentBlockParam = BetaTextBlockParam or BetaImageBlockParam or BetaRequestDocumentBlock or 20 more` Regular text content. @@ -12631,7 +16472,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -12677,6 +16518,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -12715,7 +16568,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -12807,7 +16660,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -12853,7 +16706,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -12865,15 +16722,15 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -12893,8 +16750,135 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -13474,141 +17458,104 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -13862,7 +17809,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -13908,6 +17855,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -14053,7 +18012,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -14099,6 +18058,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + ### Beta Context Management Config - `BetaContextManagementConfig object { edits }` @@ -15546,7 +19517,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Image Block Param -- `BetaImageBlockParam object { source, type, cache_control }` +- `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -15611,6 +19582,32 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + +### Beta Image Transformations Param + +- `BetaImageTransformationsParam object { oversized_image }` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + ### Beta Input JSON Delta - `BetaInputJSONDelta object { partial_json, type }` @@ -16663,7 +20660,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -16705,6 +20702,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -18592,7 +22593,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -18638,6 +22639,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -18676,7 +22689,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -18768,7 +22781,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -18814,7 +22827,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -18826,15 +22843,15 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -18854,8 +22871,135 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -19435,141 +23579,104 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -19710,262 +23817,6 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ 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. -### Beta Mid Conversation System Block Param - -- `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `text: string` - - - `type: "text"` - - - `"text"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "ephemeral"` - - - `"ephemeral"` - - - `ttl: optional "5m" or "1h"` - - The time-to-live for the cache control breakpoint. - - This may be one the following values: - - - `5m`: 5 minutes - - `1h`: 1 hour - - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - - `"5m"` - - - `"1h"` - - - `citations: optional array of BetaTextCitationParam or null` - - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - - `document_index: number` - - - `document_title: string or null` - - - `end_char_index: number` - - - `start_char_index: number` - - - `type: "char_location"` - - - `"char_location"` - - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - - `document_index: number` - - - `document_title: string or null` - - - `end_page_number: number` - - - `start_page_number: number` - - - `type: "page_location"` - - - `"page_location"` - - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - The full text of the cited block range, concatenated. - - 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. - - - `document_index: number` - - - `document_title: string or null` - - - `end_block_index: number` - - Exclusive 0-based end index of the cited block range in the source's `content` array. - - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - - `start_block_index: number` - - 0-based index of the first cited block in the source's `content` array. - - - `type: "content_block_location"` - - - `"content_block_location"` - - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - - `cited_text: string` - - - `encrypted_index: string` - - - `title: string or null` - - - `type: "web_search_result_location"` - - - `"web_search_result_location"` - - - `url: string` - - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - - `cited_text: string` - - The full text of the cited block range, concatenated. - - 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. - - - `end_block_index: number` - - Exclusive 0-based end index of the cited block range in the source's `content` array. - - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - - `search_result_index: number` - - 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. - - Counted separately from `document_index`; server-side web search results are not included in this count. - - - `source: string` - - - `start_block_index: number` - - 0-based index of the first cited block in the source's `content` array. - - - `title: string or null` - - - `type: "search_result_location"` - - - `"search_result_location"` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `name: string` - - - `server_name: string` - - - `type: "mcp_tool_reference"` - - - `"mcp_tool_reference"` - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `server_name: string` - - - `type: "mcp_toolset_reference"` - - - `"mcp_toolset_reference"` - - - `type: "tool_addition"` - - - `"tool_addition"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeToolReference object { name, type }` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - ### Beta Output Config - `BetaOutputConfig object { effort, format, task_budget }` @@ -20563,7 +24414,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -20605,6 +24456,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -22104,7 +25959,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -22146,6 +26001,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -23662,7 +27521,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -23704,6 +27563,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -25078,7 +28941,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `BetaRedactedThinkingBlock object { data, type }` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `BetaServerToolUseBlock object { id, input, name, 2 more }` @@ -25512,7 +29375,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -25558,6 +29421,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -27984,7 +31859,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Tool Result Block Param -- `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` +- `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -28015,11 +31890,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` @@ -28139,7 +32014,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -28185,6 +32060,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - `content: array of BetaTextBlockParam` @@ -28253,7 +32140,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -28303,8 +32190,135 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + ### Beta Tool Search Tool Bm25 20251119 - `BetaToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` @@ -28875,7 +32889,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Tool Union -- `BetaToolUnion = BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` +- `BetaToolUnion = BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). @@ -29182,6 +33196,412 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -29232,19 +33652,200 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs - - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - - `name: "memory"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. + - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` + + - `name: "memory"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"memory"` + + - `type: "memory_20250818"` + + - `"memory_20250818"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` + + - `display_height_px: number` + + The height of the display in pixels. + + - `display_width_px: number` + + The width of the display in pixels. + + - `name: "computer"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"computer"` + + - `type: "computer_20250124"` + + - `"computer_20250124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `display_number: optional number or null` + + The X11 display number (e.g. 0, 1) for the display. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + + - `name: "str_replace_editor"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"str_replace_editor"` + + - `type: "text_editor_20241022"` + + - `"text_editor_20241022"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` + + - `display_height_px: number` + + The height of the display in pixels. + + - `display_width_px: number` + + The width of the display in pixels. + + - `name: "computer"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"computer"` + + - `type: "computer_20251124"` + + - `"computer_20251124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `display_number: optional number or null` + + The X11 display number (e.g. 0, 1) for the display. + + - `enable_zoom: optional boolean` + + Whether to enable an action to take a zoomed-in screenshot of the screen. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"memory"` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - - `type: "memory_20250818"` + - `type: "computer_toolset_20260801"` - - `"memory_20250818"` + - `"computer_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -29260,157 +33861,218 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `configs: optional BetaComputerToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `input_examples: optional array of map[unknown]` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - - `strict: optional boolean` + `cursor_position`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `display_height_px: number` + - `enabled: optional boolean or null` - The height of the display in pixels. + 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. - - `display_width_px: number` + - `double_click: optional BetaComputerDoubleClickConfig or null` - The width of the display in pixels. + `double_click`'s config overrides. - - `name: "computer"` + - `defer_loading: optional boolean or null` - Name of the tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This is how the tool will be called by the model and in `tool_use` blocks. + - `enabled: optional boolean or null` - - `"computer"` + 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. - - `type: "computer_20250124"` + - `hold_key: optional BetaComputerHoldKeyConfig or null` - - `"computer_20250124"` + `hold_key`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `key: optional BetaComputerKeyConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `key`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `defer_loading: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `enabled: optional boolean or null` - - `display_number: optional number or null` + 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. - The X11 display number (e.g. 0, 1) for the display. + - `left_click: optional BetaComputerLeftClickConfig or null` - - `input_examples: optional array of map[unknown]` + `left_click`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + - `enabled: optional boolean or null` - - `name: "str_replace_editor"` + 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. - Name of the tool. + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `left_click_drag`'s config overrides. - - `"str_replace_editor"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_20241022"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_20241022"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` - - `"code_execution_20250825"` + `left_mouse_down`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `left_mouse_up`'s config overrides. - - `input_examples: optional array of map[unknown]` + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` - - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` + 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. - - `display_height_px: number` + - `middle_click: optional BetaComputerMiddleClickConfig or null` - The height of the display in pixels. + `middle_click`'s config overrides. - - `display_width_px: number` + - `defer_loading: optional boolean or null` - The width of the display in pixels. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "computer"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `mouse_move: optional BetaComputerMouseMoveConfig or null` - - `"computer"` + `mouse_move`'s config overrides. - - `type: "computer_20251124"` + - `defer_loading: optional boolean or null` - - `"computer_20251124"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `right_click: optional BetaComputerRightClickConfig or null` - - `"code_execution_20260120"` + `right_click`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `screenshot: optional BetaComputerScreenshotConfig or null` - - `display_number: optional number or null` + `screenshot`'s config overrides. - The X11 display number (e.g. 0, 1) for the display. + - `defer_loading: optional boolean or null` - - `enable_zoom: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Whether to enable an action to take a zoomed-in screenshot of the screen. + - `enabled: optional boolean or null` - - `input_examples: optional array of map[unknown]` + 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. - - `strict: optional boolean` + - `scroll: optional BetaComputerScrollConfig or null` - When true, guarantees schema validation on tool names and inputs + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` @@ -30193,7 +34855,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Tool Use Block -- `BetaToolUseBlock object { id, input, name, 2 more }` +- `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -30235,9 +34897,13 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + ### Beta Tool Use Block Param -- `BetaToolUseBlockParam object { id, input, name, 3 more }` +- `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -30302,6 +34968,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + ### Beta Tool Uses Keep - `BetaToolUsesKeep object { type, value }` @@ -30980,7 +35650,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -31026,6 +35696,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -31739,7 +36421,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -31785,6 +36467,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -32601,7 +37295,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -32647,6 +37341,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -32895,7 +37591,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -32941,6 +37637,18 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -32979,7 +37687,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -33071,7 +37779,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -33117,7 +37825,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -33129,15 +37841,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -33157,8 +37869,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -33738,141 +38577,104 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -34843,6 +39645,412 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -34893,19 +40101,200 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs - - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` + + - `name: "memory"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"memory"` + + - `type: "memory_20250818"` + + - `"memory_20250818"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` + + - `display_height_px: number` + + The height of the display in pixels. + + - `display_width_px: number` + + The width of the display in pixels. + + - `name: "computer"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"computer"` + + - `type: "computer_20250124"` + + - `"computer_20250124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `display_number: optional number or null` + + The X11 display number (e.g. 0, 1) for the display. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + + - `name: "str_replace_editor"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"str_replace_editor"` + + - `type: "text_editor_20241022"` + + - `"text_editor_20241022"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` + + - `display_height_px: number` + + The height of the display in pixels. + + - `display_width_px: number` + + The width of the display in pixels. + + - `name: "computer"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"computer"` + + - `type: "computer_20251124"` + + - `"computer_20251124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `display_number: optional number or null` + + The X11 display number (e.g. 0, 1) for the display. + + - `enable_zoom: optional boolean` + + Whether to enable an action to take a zoomed-in screenshot of the screen. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `name: "memory"` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - Name of the tool. + - `type: "computer_toolset_20260801"` - This is how the tool will be called by the model and in `tool_use` blocks. - - - `"memory"` - - - `type: "memory_20250818"` - - - `"memory_20250818"` + - `"computer_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -34921,157 +40310,218 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `configs: optional BetaComputerToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `input_examples: optional array of map[unknown]` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - - `strict: optional boolean` + `cursor_position`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `display_height_px: number` + - `enabled: optional boolean or null` - The height of the display in pixels. + 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. - - `display_width_px: number` + - `double_click: optional BetaComputerDoubleClickConfig or null` - The width of the display in pixels. + `double_click`'s config overrides. - - `name: "computer"` + - `defer_loading: optional boolean or null` - Name of the tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This is how the tool will be called by the model and in `tool_use` blocks. + - `enabled: optional boolean or null` - - `"computer"` + 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. - - `type: "computer_20250124"` + - `hold_key: optional BetaComputerHoldKeyConfig or null` - - `"computer_20250124"` + `hold_key`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `key: optional BetaComputerKeyConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `key`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `defer_loading: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `enabled: optional boolean or null` - - `display_number: optional number or null` + 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. - The X11 display number (e.g. 0, 1) for the display. + - `left_click: optional BetaComputerLeftClickConfig or null` - - `input_examples: optional array of map[unknown]` + `left_click`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + - `enabled: optional boolean or null` - - `name: "str_replace_editor"` + 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. - Name of the tool. + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `left_click_drag`'s config overrides. - - `"str_replace_editor"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_20241022"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_20241022"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` - - `"code_execution_20250825"` + `left_mouse_down`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `left_mouse_up`'s config overrides. - - `input_examples: optional array of map[unknown]` + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` - - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` + 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. - - `display_height_px: number` + - `middle_click: optional BetaComputerMiddleClickConfig or null` - The height of the display in pixels. + `middle_click`'s config overrides. - - `display_width_px: number` + - `defer_loading: optional boolean or null` - The width of the display in pixels. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "computer"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `mouse_move: optional BetaComputerMouseMoveConfig or null` - - `"computer"` + `mouse_move`'s config overrides. - - `type: "computer_20251124"` + - `defer_loading: optional boolean or null` - - `"computer_20251124"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `right_click: optional BetaComputerRightClickConfig or null` - - `"code_execution_20260120"` + `right_click`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `screenshot: optional BetaComputerScreenshotConfig or null` - - `display_number: optional number or null` + `screenshot`'s config overrides. - The X11 display number (e.g. 0, 1) for the display. + - `defer_loading: optional boolean or null` - - `enable_zoom: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Whether to enable an action to take a zoomed-in screenshot of the screen. + - `enabled: optional boolean or null` - - `input_examples: optional array of map[unknown]` + 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. - - `strict: optional boolean` + - `scroll: optional BetaComputerScrollConfig or null` - When true, guarantees schema validation on tool names and inputs + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` @@ -35908,7 +41358,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] @@ -35960,7 +41410,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -36006,6 +41456,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -36182,7 +41634,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -36228,6 +41680,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -36415,7 +41869,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -36461,6 +41915,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -36630,7 +42086,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -36676,6 +42132,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -36757,7 +42215,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -36803,6 +42261,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -37070,7 +42530,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -37112,6 +42572,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -38957,7 +44421,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -38999,6 +44463,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -40643,7 +46111,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -40685,6 +46153,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -42291,7 +47763,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -42333,6 +47805,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -43626,7 +49102,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -43672,6 +49148,8 @@ Create Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -43698,7 +49176,7 @@ Create Agent - `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -44509,7 +49987,7 @@ curl https://api.anthropic.com/v1/agents \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ - "model": "claude-sonnet-4-6", + "model": "claude-opus-5", "name": "My First Agent", "description": "A general-purpose starter agent.", "metadata": { @@ -44543,7 +50021,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -44636,7 +50114,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -44682,6 +50160,8 @@ List Agents - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -45110,7 +50590,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -45194,7 +50674,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -45240,6 +50720,8 @@ Get Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -45662,7 +51144,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -45737,7 +51219,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -45783,6 +51265,8 @@ Update Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -45833,7 +51317,7 @@ Update Agent - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -46649,7 +52133,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -46724,7 +52208,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -46770,6 +52254,8 @@ Archive Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -47193,7 +52679,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -49376,7 +54862,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -49422,6 +54908,8 @@ List Agent Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -49850,7 +55338,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -49926,7 +55414,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -49972,6 +55460,8 @@ Create a new environment with the specified configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -50230,9 +55720,9 @@ Create a new environment with the specified configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -50367,7 +55857,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -50413,6 +55903,8 @@ List environments with pagination support. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -50547,9 +56039,9 @@ List environments with pagination support. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -50662,7 +56154,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -50708,6 +56200,8 @@ Retrieve a specific environment by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -50842,9 +56336,9 @@ Retrieve a specific environment by ID. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -50948,7 +56442,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -50994,6 +56488,8 @@ Update an existing environment's configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -51122,7 +56618,7 @@ Update an existing environment's configuration. - `description: optional string or null` - Updated description of the environment + Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. - `metadata: optional map[string]` @@ -51252,9 +56748,9 @@ Update an existing environment's configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -51362,7 +56858,130 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"server-side-fallback-2026-07-01"` + + - `"fallback-credit-2026-06-01"` + + - `"fallback-credit-2026-07-01"` + + - `"agent-memory-2026-07-22"` + + - `"mid-conversation-tool-changes-2026-07-01"` + +### Returns + +- `BetaEnvironmentDeleteResponse object { id, type }` + + Response after deleting an environment. + + - `id: string` + + Environment identifier + + - `type: "environment_deleted"` + + The type of response + + - `"environment_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: managed-agents-2026-04-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "type": "environment_deleted" +} +``` + +## Archive Environment + +**post** `/v1/environments/{environment_id}/archive` + +Archive an environment by ID. Archived environments cannot be used to create new sessions. + +### Path Parameters + +- `environment_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -51408,126 +57027,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"user-profiles-2026-03-24"` - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` - - - `"dreaming-2026-04-21"` - - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"server-side-fallback-2026-07-01"` - - - `"fallback-credit-2026-06-01"` - - - `"fallback-credit-2026-07-01"` - - - `"agent-memory-2026-07-22"` - - - `"mid-conversation-tool-changes-2026-07-01"` - -### Returns - -- `BetaEnvironmentDeleteResponse object { id, type }` - - Response after deleting an environment. - - - `id: string` - - Environment identifier - - - `type: "environment_deleted"` - - The type of response - - - `"environment_deleted"` - -### Example - -```http -curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID \ - -X DELETE \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: managed-agents-2026-04-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "env_011CZkZ9X2dpNyB7HsEFoRfW", - "type": "environment_deleted" -} -``` - -## Archive Environment - -**post** `/v1/environments/{environment_id}/archive` - -Archive an environment by ID. Archived environments cannot be used to create new sessions. - -### Path Parameters - -- `environment_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"` @@ -51663,9 +57163,9 @@ Archive an environment by ID. Archived environments cannot be used to create new RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -52038,9 +57538,9 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/archive \ RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -52269,7 +57769,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -52315,6 +57815,8 @@ Retrieve detailed information about a specific work item. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -52485,7 +57987,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -52531,6 +58033,8 @@ Long poll for work items in the queue. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -52697,7 +58201,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -52743,6 +58247,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -52916,7 +58422,159 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"server-side-fallback-2026-07-01"` + + - `"fallback-credit-2026-06-01"` + + - `"fallback-credit-2026-07-01"` + + - `"agent-memory-2026-07-22"` + + - `"mid-conversation-tool-changes-2026-07-01"` + +### Returns + +- `BetaSelfHostedWorkHeartbeatResponse object { last_heartbeat, lease_extended, state, 2 more }` + + Response after recording a heartbeat for a work item. + + - `last_heartbeat: string` + + RFC 3339 timestamp of the actual heartbeat from DB + + - `lease_extended: boolean` + + Whether the heartbeat succeeded in extending the lease + + - `state: "queued" or "starting" or "active" or 2 more` + + Current state of the work item (active/stopping/stopped) + + - `"queued"` + + - `"starting"` + + - `"active"` + + - `"stopping"` + + - `"stopped"` + + - `ttl_seconds: number` + + Effective TTL applied to the lease + + - `type: "work_heartbeat"` + + The type of response + + - `"work_heartbeat"` + +### Example + +```http +curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/heartbeat \ + -X POST \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: managed-agents-2026-04-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "last_heartbeat": "last_heartbeat", + "lease_extended": true, + "state": "queued", + "ttl_seconds": 0, + "type": "work_heartbeat" +} +``` + +## Stop Work + +**post** `/v1/environments/{environment_id}/work/{work_id}/stop` + +Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly. + +Stop a work item, initiating graceful or forced shutdown. + +### Path Parameters + +- `environment_id: string` + +- `work_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -52962,155 +58620,7 @@ Record a heartbeat for a work item to maintain the lease. - `"user-profiles-2026-03-24"` - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` - - - `"dreaming-2026-04-21"` - - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"server-side-fallback-2026-07-01"` - - - `"fallback-credit-2026-06-01"` - - - `"fallback-credit-2026-07-01"` - - - `"agent-memory-2026-07-22"` - - - `"mid-conversation-tool-changes-2026-07-01"` - -### Returns - -- `BetaSelfHostedWorkHeartbeatResponse object { last_heartbeat, lease_extended, state, 2 more }` - - Response after recording a heartbeat for a work item. - - - `last_heartbeat: string` - - RFC 3339 timestamp of the actual heartbeat from DB - - - `lease_extended: boolean` - - Whether the heartbeat succeeded in extending the lease - - - `state: "queued" or "starting" or "active" or 2 more` - - Current state of the work item (active/stopping/stopped) - - - `"queued"` - - - `"starting"` - - - `"active"` - - - `"stopping"` - - - `"stopped"` - - - `ttl_seconds: number` - - Effective TTL applied to the lease - - - `type: "work_heartbeat"` - - The type of response - - - `"work_heartbeat"` - -### Example - -```http -curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/work/$WORK_ID/heartbeat \ - -X POST \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: managed-agents-2026-04-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "last_heartbeat": "last_heartbeat", - "lease_extended": true, - "state": "queued", - "ttl_seconds": 0, - "type": "work_heartbeat" -} -``` - -## Stop Work - -**post** `/v1/environments/{environment_id}/work/{work_id}/stop` - -Note: these endpoints are called automatically by the pre-built environment worker provided in the SDKs and CLI, for orchestrating sessions with self-hosted sandbox environments. They are included here as a reference; you do not need to invoke them directly. - -Stop a work item, initiating graceful or forced shutdown. - -### Path Parameters - -- `environment_id: string` - -- `work_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"` @@ -53290,7 +58800,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -53336,6 +58846,8 @@ List work items in an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -53507,7 +59019,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -53553,6 +59065,8 @@ Update work item metadata with merge semantics. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -53723,7 +59237,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -53769,6 +59283,8 @@ Get statistics about the work queue for an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -54139,7 +59655,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -54185,6 +59701,8 @@ Create Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -54261,7 +59779,7 @@ Create Session - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -55640,7 +61158,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -55660,7 +61178,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -55896,7 +61414,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -55942,6 +61460,8 @@ List Sessions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -56655,7 +62175,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -56675,7 +62195,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -56853,7 +62373,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -56899,6 +62419,8 @@ Get Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -57602,7 +63124,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -57622,7 +63144,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -57796,7 +63318,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -57842,6 +63364,8 @@ Update Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -58769,7 +64293,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -58789,7 +64313,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -58963,7 +64487,126 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"server-side-fallback-2026-07-01"` + + - `"fallback-credit-2026-06-01"` + + - `"fallback-credit-2026-07-01"` + + - `"agent-memory-2026-07-22"` + + - `"mid-conversation-tool-changes-2026-07-01"` + +### Returns + +- `BetaManagedAgentsDeletedSession object { id, type }` + + Confirmation that a `session` has been permanently deleted. + + - `id: string` + + - `type: "session_deleted"` + + - `"session_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: managed-agents-2026-04-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", + "type": "session_deleted" +} +``` + +## Archive Session + +**post** `/v1/sessions/{session_id}/archive` + +Archive Session + +### Path Parameters + +- `session_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -59009,122 +64652,7 @@ Delete Session - `"user-profiles-2026-03-24"` - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` - - - `"dreaming-2026-04-21"` - - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"server-side-fallback-2026-07-01"` - - - `"fallback-credit-2026-06-01"` - - - `"fallback-credit-2026-07-01"` - - - `"agent-memory-2026-07-22"` - - - `"mid-conversation-tool-changes-2026-07-01"` - -### Returns - -- `BetaManagedAgentsDeletedSession object { id, type }` - - Confirmation that a `session` has been permanently deleted. - - - `id: string` - - - `type: "session_deleted"` - - - `"session_deleted"` - -### Example - -```http -curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ - -X DELETE \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: managed-agents-2026-04-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" -``` - -#### Response - -```json -{ - "id": "sesn_011CZkZAtmR3yMPDzynEDxu7", - "type": "session_deleted" -} -``` - -## Archive Session - -**post** `/v1/sessions/{session_id}/archive` - -Archive Session - -### Path Parameters - -- `session_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"` @@ -59830,7 +65358,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -59850,7 +65378,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -60096,7 +65624,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -63424,7 +68952,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63470,6 +68998,8 @@ List Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -65537,7 +71067,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65583,6 +71113,8 @@ Send Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -66496,7 +72028,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -66542,6 +72074,8 @@ Stream Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -77307,7 +82841,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77353,6 +82887,8 @@ Add Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -77467,7 +83003,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77513,6 +83049,8 @@ List Session Resources - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -77702,7 +83240,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77748,6 +83286,8 @@ Get Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -77916,7 +83456,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77962,6 +83502,8 @@ Update Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -78140,7 +83682,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -78186,6 +83728,8 @@ Delete Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -78699,7 +84243,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -78745,6 +84289,8 @@ List Session Threads - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -79252,7 +84798,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -79347,7 +84893,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79393,6 +84939,8 @@ Get Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -79894,7 +85442,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -79986,7 +85534,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -80032,6 +85580,8 @@ Archive Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -80534,7 +86084,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -83228,7 +88778,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83274,6 +88824,8 @@ List Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -85342,7 +90894,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -85388,6 +90940,8 @@ Stream Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -87493,7 +93047,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -87539,6 +93093,8 @@ Create Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -88664,7 +94220,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -88710,6 +94266,8 @@ List Deployments - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -89397,7 +94955,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -89443,6 +95001,8 @@ Get Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -90121,7 +95681,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -90167,6 +95727,8 @@ Update Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91247,7 +96809,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -91293,6 +96855,8 @@ Archive Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91972,7 +97536,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -92018,6 +97582,8 @@ Run Deployment Now - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -92351,7 +97917,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -92397,6 +97963,8 @@ Pause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -93076,7 +98644,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -93122,6 +98690,8 @@ Unpause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -95903,7 +101473,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -95949,6 +101519,8 @@ List Deployment Runs - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -96290,7 +101862,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -96336,6 +101908,8 @@ Get Deployment Run - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -97210,7 +102784,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -97256,6 +102830,8 @@ Create Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -97382,7 +102958,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -97428,6 +103004,8 @@ List Vaults - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -97536,7 +103114,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -97582,6 +103160,8 @@ Get Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -97681,7 +103261,171 @@ Update Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` + + - `"message-batches-2024-09-24"` + + - `"prompt-caching-2024-07-31"` + + - `"computer-use-2024-10-22"` + + - `"computer-use-2025-01-24"` + + - `"pdfs-2024-09-25"` + + - `"token-counting-2024-11-01"` + + - `"token-efficient-tools-2025-02-19"` + + - `"output-128k-2025-02-19"` + + - `"files-api-2025-04-14"` + + - `"mcp-client-2025-04-04"` + + - `"mcp-client-2025-11-20"` + + - `"dev-full-thinking-2025-05-14"` + + - `"interleaved-thinking-2025-05-14"` + + - `"code-execution-2025-05-22"` + + - `"extended-cache-ttl-2025-04-11"` + + - `"context-1m-2025-08-07"` + + - `"context-management-2025-06-27"` + + - `"model-context-window-exceeded-2025-08-26"` + + - `"skills-2025-10-02"` + + - `"fast-mode-2026-02-01"` + + - `"output-300k-2026-03-24"` + + - `"user-profiles-2026-03-24"` + + - `"user-profiles-2026-08-18"` + + - `"advisor-tool-2026-03-01"` + + - `"managed-agents-2026-04-01"` + + - `"cache-diagnosis-2026-04-07"` + + - `"dreaming-2026-04-21"` + + - `"thinking-token-count-2026-05-13"` + + - `"server-side-fallback-2026-06-01"` + + - `"server-side-fallback-2026-07-01"` + + - `"fallback-credit-2026-06-01"` + + - `"fallback-credit-2026-07-01"` + + - `"agent-memory-2026-07-22"` + + - `"mid-conversation-tool-changes-2026-07-01"` + +### Body Parameters + +- `display_name: optional string or null` + + Updated human-readable name for the vault. 1-255 characters. + +- `metadata: optional map[string] or null` + + Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved. + +### Returns + +- `BetaManagedAgentsVault object { id, archived_at, created_at, 4 more }` + + A vault that stores credentials for use by agents during sessions. + + - `id: string` + + Unique identifier for the vault. + + - `archived_at: string or null` + + A timestamp in RFC 3339 format + + - `created_at: string` + + A timestamp in RFC 3339 format + + - `display_name: string` + + Human-readable name for the vault. + + - `metadata: map[string]` + + Arbitrary key-value metadata attached to the vault. + + - `type: "vault"` + + - `"vault"` + + - `updated_at: string` + + A timestamp in RFC 3339 format + +### Example + +```http +curl https://api.anthropic.com/v1/vaults/$VAULT_ID \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H 'anthropic-beta: managed-agents-2026-04-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -d '{ + "display_name": "Example vault", + "metadata": { + "environment": "production" + } + }' +``` + +#### Response + +```json +{ + "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", + "archived_at": null, + "created_at": "2026-03-15T10:00:00Z", + "display_name": "Example vault", + "metadata": { + "environment": "production" + }, + "type": "vault", + "updated_at": "2026-03-15T10:00:00Z" +} +``` + +## Delete Vault + +**delete** `/v1/vaults/{vault_id}` + +Delete Vault + +### Path Parameters + +- `vault_id: string` + +### Header Parameters + +- `"anthropic-beta": optional array of AnthropicBeta` + + Optional header to specify the beta version(s) you want to use. + + - `string` + + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -97727,167 +103471,7 @@ Update Vault - `"user-profiles-2026-03-24"` - - `"advisor-tool-2026-03-01"` - - - `"managed-agents-2026-04-01"` - - - `"cache-diagnosis-2026-04-07"` - - - `"dreaming-2026-04-21"` - - - `"thinking-token-count-2026-05-13"` - - - `"server-side-fallback-2026-06-01"` - - - `"server-side-fallback-2026-07-01"` - - - `"fallback-credit-2026-06-01"` - - - `"fallback-credit-2026-07-01"` - - - `"agent-memory-2026-07-22"` - - - `"mid-conversation-tool-changes-2026-07-01"` - -### Body Parameters - -- `display_name: optional string or null` - - Updated human-readable name for the vault. 1-255 characters. - -- `metadata: optional map[string] or null` - - Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omitted keys are preserved. - -### Returns - -- `BetaManagedAgentsVault object { id, archived_at, created_at, 4 more }` - - A vault that stores credentials for use by agents during sessions. - - - `id: string` - - Unique identifier for the vault. - - - `archived_at: string or null` - - A timestamp in RFC 3339 format - - - `created_at: string` - - A timestamp in RFC 3339 format - - - `display_name: string` - - Human-readable name for the vault. - - - `metadata: map[string]` - - Arbitrary key-value metadata attached to the vault. - - - `type: "vault"` - - - `"vault"` - - - `updated_at: string` - - A timestamp in RFC 3339 format - -### Example - -```http -curl https://api.anthropic.com/v1/vaults/$VAULT_ID \ - -H 'Content-Type: application/json' \ - -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: managed-agents-2026-04-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" \ - -d '{ - "display_name": "Example vault", - "metadata": { - "environment": "production" - } - }' -``` - -#### Response - -```json -{ - "id": "vlt_011CZkZDLs7fYzm1hXNPeRjv", - "archived_at": null, - "created_at": "2026-03-15T10:00:00Z", - "display_name": "Example vault", - "metadata": { - "environment": "production" - }, - "type": "vault", - "updated_at": "2026-03-15T10:00:00Z" -} -``` - -## Delete Vault - -**delete** `/v1/vaults/{vault_id}` - -Delete Vault - -### Path Parameters - -- `vault_id: string` - -### Header Parameters - -- `"anthropic-beta": optional array of AnthropicBeta` - - Optional header to specify the beta version(s) you want to use. - - - `string` - - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` - - - `"message-batches-2024-09-24"` - - - `"prompt-caching-2024-07-31"` - - - `"computer-use-2024-10-22"` - - - `"computer-use-2025-01-24"` - - - `"pdfs-2024-09-25"` - - - `"token-counting-2024-11-01"` - - - `"token-efficient-tools-2025-02-19"` - - - `"output-128k-2025-02-19"` - - - `"files-api-2025-04-14"` - - - `"mcp-client-2025-04-04"` - - - `"mcp-client-2025-11-20"` - - - `"dev-full-thinking-2025-05-14"` - - - `"interleaved-thinking-2025-05-14"` - - - `"code-execution-2025-05-22"` - - - `"extended-cache-ttl-2025-04-11"` - - - `"context-1m-2025-08-07"` - - - `"context-management-2025-06-27"` - - - `"model-context-window-exceeded-2025-08-26"` - - - `"skills-2025-10-02"` - - - `"fast-mode-2026-02-01"` - - - `"output-300k-2026-03-24"` - - - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` - `"advisor-tool-2026-03-01"` @@ -97962,7 +103546,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -98008,6 +103592,8 @@ Archive Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -98160,7 +103746,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -98206,6 +103792,8 @@ Create Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -98630,7 +104218,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -98676,6 +104264,8 @@ List Credentials - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -98923,7 +104513,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -98969,6 +104559,8 @@ Get Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -99207,7 +104799,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -99253,6 +104845,8 @@ Update Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -99628,7 +105222,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -99674,6 +105268,8 @@ Delete Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -99749,7 +105345,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -99795,6 +105391,8 @@ Archive Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -100034,7 +105632,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -100080,6 +105678,8 @@ Validate Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -101383,7 +106983,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -101429,6 +107029,8 @@ Create a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -101569,7 +107171,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -101615,6 +107217,8 @@ List memory stores - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -101728,7 +107332,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -101774,6 +107378,8 @@ Retrieve a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -101878,7 +107484,7 @@ Update a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -101924,6 +107530,8 @@ Update a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102044,7 +107652,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102090,6 +107698,8 @@ Delete a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102163,7 +107773,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102209,6 +107819,8 @@ Archive a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102380,7 +107992,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102426,6 +108038,8 @@ Create a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102579,7 +108193,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102625,6 +108239,8 @@ List memories - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102774,7 +108390,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102820,6 +108436,8 @@ Retrieve a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -102944,7 +108562,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -102990,6 +108608,8 @@ Update a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -103134,7 +108754,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -103180,6 +108800,8 @@ Delete a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -103597,6 +109219,10 @@ List memory versions Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id @@ -103617,7 +109243,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -103663,6 +109289,8 @@ List memory versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -103773,6 +109401,18 @@ List memory versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -103859,7 +109499,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -103905,6 +109545,8 @@ Retrieve a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -104015,6 +109657,18 @@ Retrieve a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -104082,7 +109736,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -104128,6 +109782,8 @@ Redact a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -104238,6 +109894,18 @@ Redact a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -104290,7 +109958,7 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ### Beta Managed Agents Actor -- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor` +- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor or BetaManagedAgentsServiceAccountActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). @@ -104330,6 +109998,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents API Actor - `BetaManagedAgentsAPIActor object { api_key_id, type }` @@ -104432,6 +110112,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -104456,6 +110148,20 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions - `"deleted"` +### Beta Managed Agents Service Account Actor + +- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents Session Actor - `BetaManagedAgentsSessionActor object { session_id, type }` @@ -104500,7 +110206,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -104546,6 +110252,8 @@ Upload File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -104570,7 +110278,7 @@ Upload File ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -104683,7 +110391,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -104729,6 +110437,8 @@ List Files - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -104753,7 +110463,7 @@ List Files ### Returns -- `data: array of FileMetadata` +- `data: array of BetaFileMetadata` List of file metadata objects. @@ -104871,7 +110581,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -104917,6 +110627,8 @@ Download File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -104968,7 +110680,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105014,6 +110726,8 @@ Get File Metadata - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -105038,7 +110752,7 @@ Get File Metadata ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -105135,7 +110849,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105181,6 +110895,8 @@ Delete File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -105205,7 +110921,7 @@ Delete File ### Returns -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` @@ -105240,23 +110956,9 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ ## Domain Types -### Beta File Scope - -- `BetaFileScope object { id, type }` - - - `id: string` - - The ID of the scoping resource (e.g., the session ID). - - - `type: "session"` - - The type of scope (e.g., `"session"`). - - - `"session"` - -### Deleted File +### Beta Deleted File -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` @@ -105270,9 +110972,9 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ - `"file_deleted"` -### File Metadata +### Beta File Metadata -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -105322,6 +111024,20 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ - `"session"` +### Beta File Scope + +- `BetaFileScope object { id, type }` + + - `id: string` + + The ID of the scoping resource (e.g., the session ID). + + - `type: "session"` + + The type of scope (e.g., `"session"`). + + - `"session"` + # Skills ## Create Skill @@ -105338,7 +111054,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105384,6 +111100,8 @@ Create Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -105511,7 +111229,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105557,6 +111275,8 @@ List Skills - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -105689,7 +111409,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105735,6 +111455,8 @@ Get Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -105845,7 +111567,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105891,6 +111613,8 @@ Delete Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -106123,7 +111847,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -106169,6 +111893,8 @@ Create Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -106297,7 +112023,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -106343,6 +112069,8 @@ List Skill Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -106481,7 +112209,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -106527,6 +112255,8 @@ Download a skill version's content as a zip archive. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -106586,7 +112316,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -106632,6 +112362,8 @@ Get Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -106752,7 +112484,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -106798,6 +112530,8 @@ Delete Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107031,7 +112765,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107077,6 +112811,8 @@ Create User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107101,6 +112837,14 @@ Create User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. Maximum 255 characters. @@ -107111,7 +112855,7 @@ Create User Profile - `name: optional string or null` - Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters. + Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. - `relationship: optional "external" or "resold" or "internal"` @@ -107125,7 +112869,7 @@ Create User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -107139,16 +112883,6 @@ Create User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -107173,13 +112907,31 @@ Create User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -107187,7 +112939,7 @@ Create User Profile curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345", @@ -107202,7 +112954,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -107210,8 +112961,10 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -107247,7 +113000,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107293,6 +113046,8 @@ List User Profiles - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107333,16 +113088,6 @@ List User Profiles Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -107367,13 +113112,31 @@ List User Profiles A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` - `next_page: string or null` @@ -107384,7 +113147,7 @@ List User Profiles ```http curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -107397,7 +113160,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -107405,8 +113167,10 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" @@ -107431,7 +113195,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107477,6 +113241,8 @@ Get User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107501,7 +113267,7 @@ Get User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -107515,16 +113281,6 @@ Get User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -107549,20 +113305,38 @@ Get User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example ```http curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -107573,7 +113347,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -107581,8 +113354,10 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -107604,7 +113379,7 @@ Update User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107650,6 +113425,8 @@ Update User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107674,6 +113451,14 @@ Update User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough" or null` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. @@ -107698,7 +113483,7 @@ Update User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -107712,16 +113497,6 @@ Update User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -107746,13 +113521,31 @@ Update User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -107760,7 +113553,7 @@ Update User Profile curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345" @@ -107774,7 +113567,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -107782,8 +113574,10 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -107805,7 +113599,7 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107851,6 +113645,8 @@ Create Enrollment URL - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107897,7 +113693,7 @@ Create Enrollment URL curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -107915,7 +113711,7 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url ### Beta User Profile -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -107929,16 +113725,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -107963,13 +113749,31 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Beta User Profile Enrollment URL @@ -108019,7 +113823,7 @@ Create a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -108065,6 +113869,8 @@ Create a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -108093,7 +113899,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -108123,7 +113929,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null` @@ -108135,11 +113941,33 @@ Create a Dream - `instructions: optional string or null` +- `output_behavior: optional BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -108167,7 +113995,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -108193,7 +114021,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -108203,6 +114031,28 @@ Create a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -108293,6 +114143,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -108361,7 +114214,7 @@ List Dreams - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -108407,6 +114260,8 @@ List Dreams - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -108459,7 +114314,7 @@ List Dreams - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -108485,7 +114340,7 @@ List Dreams - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -108495,6 +114350,28 @@ List Dreams - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -108579,6 +114456,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -108618,7 +114498,7 @@ Get a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -108664,6 +114544,8 @@ Get a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -108688,9 +114570,9 @@ Get a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -108718,7 +114600,7 @@ Get a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -108744,7 +114626,7 @@ Get a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -108754,6 +114636,28 @@ Get a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -108834,6 +114738,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -108870,7 +114777,7 @@ Cancel a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -108916,6 +114823,8 @@ Cancel a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -108940,9 +114849,9 @@ Cancel a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -108970,7 +114879,7 @@ Cancel a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -108996,7 +114905,7 @@ Cancel a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -109006,6 +114915,28 @@ Cancel a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -109087,6 +115018,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -109123,7 +115057,7 @@ Archive a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -109169,6 +115103,8 @@ Archive a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -109193,9 +115129,9 @@ Archive a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -109223,7 +115159,7 @@ Archive a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -109249,7 +115185,7 @@ Archive a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -109259,6 +115195,28 @@ Archive a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -109340,6 +115298,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -109362,9 +115323,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ ### Beta Dream -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -109392,7 +115353,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -109418,7 +115379,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -109428,6 +115389,28 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -109490,11 +115473,11 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -109516,7 +115499,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -109544,7 +115527,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -109562,7 +115545,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null` @@ -109634,6 +115617,52 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ Total output tokens generated across every pipeline stage. +### Beta Output Behavior + +- `BetaOutputBehavior = BetaOutputBehaviorCreateNew or BetaOutputBehaviorUpdateExisting` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + +### Beta Output Behavior Create New + +- `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + +### Beta Output Behavior Update Existing + +- `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + # Tunnels ## Create Tunnel @@ -109652,7 +115681,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -109698,6 +115727,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -109800,7 +115831,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -109846,6 +115877,8 @@ Fetches a tunnel by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -109950,7 +115983,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -109996,6 +116029,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110099,7 +116134,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110145,6 +116180,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110240,7 +116277,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110286,6 +116323,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110366,7 +116405,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110412,6 +116451,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110551,7 +116592,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110597,6 +116638,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110708,7 +116751,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110754,6 +116797,8 @@ Fetches a tunnel certificate by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -110867,7 +116912,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -110913,6 +116958,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -111023,7 +117070,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -111069,6 +117116,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/agents.md b/content/en/api/beta/agents.md index a4e4a6a29b..0ae2fdcc34 100644 --- a/content/en/api/beta/agents.md +++ b/content/en/api/beta/agents.md @@ -19,7 +19,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,7 +93,7 @@ Create Agent - `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -902,7 +904,7 @@ curl https://api.anthropic.com/v1/agents \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ - "model": "claude-sonnet-4-6", + "model": "claude-opus-5", "name": "My First Agent", "description": "A general-purpose starter agent.", "metadata": { @@ -936,7 +938,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1029,7 +1031,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1075,6 +1077,8 @@ List Agents - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1503,7 +1507,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1587,7 +1591,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1633,6 +1637,8 @@ Get Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2055,7 +2061,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -2130,7 +2136,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2176,6 +2182,8 @@ Update Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2226,7 +2234,7 @@ Update Agent - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -3042,7 +3050,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -3117,7 +3125,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3163,6 +3171,8 @@ Archive Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3586,7 +3596,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -5769,7 +5779,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -5815,6 +5825,8 @@ List Agent Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -6243,7 +6255,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/archive.md b/content/en/api/beta/agents/archive.md index 5a3df0849b..0a22c9e22d 100644 --- a/content/en/api/beta/agents/archive.md +++ b/content/en/api/beta/agents/archive.md @@ -21,7 +21,7 @@ Archive Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -490,7 +492,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/archive \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/create.md b/content/en/api/beta/agents/create.md index bc8849797e..6c7f297b75 100644 --- a/content/en/api/beta/agents/create.md +++ b/content/en/api/beta/agents/create.md @@ -17,7 +17,7 @@ Create Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -89,7 +91,7 @@ Create Agent - `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -900,7 +902,7 @@ curl https://api.anthropic.com/v1/agents \ -H 'anthropic-beta: managed-agents-2026-04-01' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ - "model": "claude-sonnet-4-6", + "model": "claude-opus-5", "name": "My First Agent", "description": "A general-purpose starter agent.", "metadata": { @@ -934,7 +936,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/list.md b/content/en/api/beta/agents/list.md index a44ac48e24..f5b9d0b68a 100644 --- a/content/en/api/beta/agents/list.md +++ b/content/en/api/beta/agents/list.md @@ -39,7 +39,7 @@ List Agents - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -85,6 +85,8 @@ List Agents - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -513,7 +515,7 @@ curl https://api.anthropic.com/v1/agents \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/retrieve.md b/content/en/api/beta/agents/retrieve.md index a174b62e36..0f18bf461b 100644 --- a/content/en/api/beta/agents/retrieve.md +++ b/content/en/api/beta/agents/retrieve.md @@ -27,7 +27,7 @@ Get Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Get Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -495,7 +497,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/update.md b/content/en/api/beta/agents/update.md index 07a82069ec..267ce11cb4 100644 --- a/content/en/api/beta/agents/update.md +++ b/content/en/api/beta/agents/update.md @@ -21,7 +21,7 @@ Update Agent - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update Agent - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -117,7 +119,7 @@ Update Agent - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. + Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -933,7 +935,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/versions.md b/content/en/api/beta/agents/versions.md index 5dd8a1cd3e..b8927776a4 100644 --- a/content/en/api/beta/agents/versions.md +++ b/content/en/api/beta/agents/versions.md @@ -33,7 +33,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ List Agent Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -507,7 +509,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/agents/versions/list.md b/content/en/api/beta/agents/versions/list.md index bcb12f7b04..98135728cd 100644 --- a/content/en/api/beta/agents/versions/list.md +++ b/content/en/api/beta/agents/versions/list.md @@ -31,7 +31,7 @@ List Agent Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ List Agent Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -505,7 +507,7 @@ curl https://api.anthropic.com/v1/agents/$AGENT_ID/versions \ "foo": "bar" }, "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/deployment_runs.md b/content/en/api/beta/deployment_runs.md index e338c5399a..380c4bb1ca 100644 --- a/content/en/api/beta/deployment_runs.md +++ b/content/en/api/beta/deployment_runs.md @@ -61,7 +61,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107,6 +107,8 @@ List Deployment Runs - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -448,7 +450,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -494,6 +496,8 @@ Get Deployment Run - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployment_runs/list.md b/content/en/api/beta/deployment_runs/list.md index 41b772ff7e..9caa974327 100644 --- a/content/en/api/beta/deployment_runs/list.md +++ b/content/en/api/beta/deployment_runs/list.md @@ -59,7 +59,7 @@ List Deployment Runs - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105,6 +105,8 @@ List Deployment Runs - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployment_runs/retrieve.md b/content/en/api/beta/deployment_runs/retrieve.md index dd96c0723a..988e731f6d 100644 --- a/content/en/api/beta/deployment_runs/retrieve.md +++ b/content/en/api/beta/deployment_runs/retrieve.md @@ -21,7 +21,7 @@ Get Deployment Run - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get Deployment Run - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments.md b/content/en/api/beta/deployments.md index 3607fb15ca..14218f2f44 100644 --- a/content/en/api/beta/deployments.md +++ b/content/en/api/beta/deployments.md @@ -19,7 +19,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1190,7 +1192,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1236,6 +1238,8 @@ List Deployments - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1923,7 +1927,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1969,6 +1973,8 @@ Get Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2647,7 +2653,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2693,6 +2699,8 @@ Update Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3773,7 +3781,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3819,6 +3827,8 @@ Archive Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4498,7 +4508,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4544,6 +4554,8 @@ Run Deployment Now - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4877,7 +4889,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4923,6 +4935,8 @@ Pause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -5602,7 +5616,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -5648,6 +5662,8 @@ Unpause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/archive.md b/content/en/api/beta/deployments/archive.md index af0fb0e4dc..c6c49bd025 100644 --- a/content/en/api/beta/deployments/archive.md +++ b/content/en/api/beta/deployments/archive.md @@ -21,7 +21,7 @@ Archive Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/create.md b/content/en/api/beta/deployments/create.md index fc77b14e5e..d0bfbc7bed 100644 --- a/content/en/api/beta/deployments/create.md +++ b/content/en/api/beta/deployments/create.md @@ -17,7 +17,7 @@ Create Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/list.md b/content/en/api/beta/deployments/list.md index f3bab41546..962cd6cce8 100644 --- a/content/en/api/beta/deployments/list.md +++ b/content/en/api/beta/deployments/list.md @@ -51,7 +51,7 @@ List Deployments - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -97,6 +97,8 @@ List Deployments - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/pause.md b/content/en/api/beta/deployments/pause.md index 4d2e5b288b..72348a2110 100644 --- a/content/en/api/beta/deployments/pause.md +++ b/content/en/api/beta/deployments/pause.md @@ -21,7 +21,7 @@ Pause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Pause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/retrieve.md b/content/en/api/beta/deployments/retrieve.md index 2b8e9c34cc..5af46c9f79 100644 --- a/content/en/api/beta/deployments/retrieve.md +++ b/content/en/api/beta/deployments/retrieve.md @@ -21,7 +21,7 @@ Get Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/run.md b/content/en/api/beta/deployments/run.md index bc6d02f81b..381792be85 100644 --- a/content/en/api/beta/deployments/run.md +++ b/content/en/api/beta/deployments/run.md @@ -21,7 +21,7 @@ Run Deployment Now - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Run Deployment Now - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/unpause.md b/content/en/api/beta/deployments/unpause.md index 9322487c5e..cd051f69d5 100644 --- a/content/en/api/beta/deployments/unpause.md +++ b/content/en/api/beta/deployments/unpause.md @@ -21,7 +21,7 @@ Unpause Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Unpause Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/deployments/update.md b/content/en/api/beta/deployments/update.md index 5c0d2cf438..f5b26f4a82 100644 --- a/content/en/api/beta/deployments/update.md +++ b/content/en/api/beta/deployments/update.md @@ -21,7 +21,7 @@ Update Deployment - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update Deployment - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/dreams.md b/content/en/api/beta/dreams.md index 535b43fc4d..d1d1df9f1e 100644 --- a/content/en/api/beta/dreams.md +++ b/content/en/api/beta/dreams.md @@ -19,7 +19,7 @@ Create a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -93,7 +95,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -123,7 +125,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null` @@ -135,11 +137,33 @@ Create a Dream - `instructions: optional string or null` +- `output_behavior: optional BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -167,7 +191,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -193,7 +217,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -203,6 +227,28 @@ Create a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -293,6 +339,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -361,7 +410,7 @@ List Dreams - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -407,6 +456,8 @@ List Dreams - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -459,7 +510,7 @@ List Dreams - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -485,7 +536,7 @@ List Dreams - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -495,6 +546,28 @@ List Dreams - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -579,6 +652,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -618,7 +694,7 @@ Get a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -664,6 +740,8 @@ Get a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -688,9 +766,9 @@ Get a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -718,7 +796,7 @@ Get a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -744,7 +822,7 @@ Get a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -754,6 +832,28 @@ Get a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -834,6 +934,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -870,7 +973,7 @@ Cancel a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -916,6 +1019,8 @@ Cancel a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -940,9 +1045,9 @@ Cancel a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -970,7 +1075,7 @@ Cancel a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -996,7 +1101,7 @@ Cancel a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -1006,6 +1111,28 @@ Cancel a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -1087,6 +1214,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -1123,7 +1253,7 @@ Archive a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1169,6 +1299,8 @@ Archive a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1193,9 +1325,9 @@ Archive a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -1223,7 +1355,7 @@ Archive a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -1249,7 +1381,7 @@ Archive a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -1259,6 +1391,28 @@ Archive a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -1340,6 +1494,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", @@ -1362,9 +1519,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ ### Beta Dream -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -1392,7 +1549,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -1418,7 +1575,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -1428,6 +1585,28 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -1490,11 +1669,11 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -1516,7 +1695,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -1544,7 +1723,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -1562,7 +1741,7 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null` @@ -1633,3 +1812,49 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ - `output_tokens: number` Total output tokens generated across every pipeline stage. + +### Beta Output Behavior + +- `BetaOutputBehavior = BetaOutputBehaviorCreateNew or BetaOutputBehaviorUpdateExisting` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + +### Beta Output Behavior Create New + +- `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + +### Beta Output Behavior Update Existing + +- `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` diff --git a/content/en/api/beta/dreams/archive.md b/content/en/api/beta/dreams/archive.md index 8960c9a77b..3401e14235 100644 --- a/content/en/api/beta/dreams/archive.md +++ b/content/en/api/beta/dreams/archive.md @@ -21,7 +21,7 @@ Archive a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,9 +93,9 @@ Archive a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -121,7 +123,7 @@ Archive a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -147,7 +149,7 @@ Archive a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -157,6 +159,28 @@ Archive a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -238,6 +262,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/archive \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", diff --git a/content/en/api/beta/dreams/cancel.md b/content/en/api/beta/dreams/cancel.md index b2fd55d2f7..a17f913bbf 100644 --- a/content/en/api/beta/dreams/cancel.md +++ b/content/en/api/beta/dreams/cancel.md @@ -21,7 +21,7 @@ Cancel a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Cancel a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,9 +93,9 @@ Cancel a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -121,7 +123,7 @@ Cancel a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -147,7 +149,7 @@ Cancel a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -157,6 +159,28 @@ Cancel a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -238,6 +262,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID/cancel \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", diff --git a/content/en/api/beta/dreams/create.md b/content/en/api/beta/dreams/create.md index ae3dfc97fb..31391d5241 100644 --- a/content/en/api/beta/dreams/create.md +++ b/content/en/api/beta/dreams/create.md @@ -17,7 +17,7 @@ Create a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,7 +93,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -121,7 +123,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast" or null` @@ -133,11 +135,33 @@ Create a Dream - `instructions: optional string or null` +- `output_behavior: optional BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -165,7 +189,7 @@ Create a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -191,7 +215,7 @@ Create a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -201,6 +225,28 @@ Create a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -291,6 +337,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", diff --git a/content/en/api/beta/dreams/list.md b/content/en/api/beta/dreams/list.md index 615a3098ae..9cc859b050 100644 --- a/content/en/api/beta/dreams/list.md +++ b/content/en/api/beta/dreams/list.md @@ -53,7 +53,7 @@ List Dreams - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -99,6 +99,8 @@ List Dreams - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -151,7 +153,7 @@ List Dreams - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -177,7 +179,7 @@ List Dreams - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -187,6 +189,28 @@ List Dreams - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -271,6 +295,9 @@ curl https://api.anthropic.com/v1/dreams \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", diff --git a/content/en/api/beta/dreams/retrieve.md b/content/en/api/beta/dreams/retrieve.md index b28d4a08d2..e9a7683dae 100644 --- a/content/en/api/beta/dreams/retrieve.md +++ b/content/en/api/beta/dreams/retrieve.md @@ -21,7 +21,7 @@ Get a Dream - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get a Dream - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,9 +93,9 @@ Get a Dream ### Returns -- `BetaDream object { id, archived_at, created_at, 10 more }` +- `BetaDream object { id, archived_at, created_at, 11 more }` - An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. + An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints. - `id: string` @@ -121,7 +123,7 @@ Get a Dream - `BetaDreamMemoryStoreInput object { memory_store_id, type }` - An input memory store the dream reads from. The dream never mutates this store. + An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place. - `memory_store_id: string` @@ -147,7 +149,7 @@ Get a Dream - `id: string` - Model identifier, e.g. "claude-opus-4-7". 1-256 characters. + Model identifier, e.g. "claude-opus-5". 1-256 characters. - `speed: optional "standard" or "fast"` @@ -157,6 +159,28 @@ Get a Dream - `"fast"` + - `output_behavior: BetaOutputBehavior` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `BetaOutputBehaviorCreateNew object { type }` + + The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated. + + - `type: "create_new"` + + - `"create_new"` + + - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }` + + The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place. + + - `memory_store_id: string` + + - `type: "update_existing"` + + - `"update_existing"` + - `outputs: array of BetaDreamOutput` - `memory_store_id: string` @@ -237,6 +261,9 @@ curl https://api.anthropic.com/v1/dreams/$DREAM_ID \ "id": "x", "speed": "standard" }, + "output_behavior": { + "type": "create_new" + }, "outputs": [ { "memory_store_id": "memory_store_id", diff --git a/content/en/api/beta/environments.md b/content/en/api/beta/environments.md index 1709e70a2f..a2379ac5fa 100644 --- a/content/en/api/beta/environments.md +++ b/content/en/api/beta/environments.md @@ -19,7 +19,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create a new environment with the specified configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -323,9 +325,9 @@ Create a new environment with the specified configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -460,7 +462,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -506,6 +508,8 @@ List environments with pagination support. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -640,9 +644,9 @@ List environments with pagination support. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -755,7 +759,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -801,6 +805,8 @@ Retrieve a specific environment by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -935,9 +941,9 @@ Retrieve a specific environment by ID. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -1041,7 +1047,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1087,6 +1093,8 @@ Update an existing environment's configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1215,7 +1223,7 @@ Update an existing environment's configuration. - `description: optional string or null` - Updated description of the environment + Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. - `metadata: optional map[string]` @@ -1345,9 +1353,9 @@ Update an existing environment's configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -1455,7 +1463,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1501,6 +1509,8 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1576,7 +1586,7 @@ Archive an environment by ID. Archived environments cannot be used to create new - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1622,6 +1632,8 @@ Archive an environment by ID. Archived environments cannot be used to create new - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1756,9 +1768,9 @@ Archive an environment by ID. Archived environments cannot be used to create new RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -2131,9 +2143,9 @@ curl https://api.anthropic.com/v1/environments/$ENVIRONMENT_ID/archive \ RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` @@ -2362,7 +2374,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2408,6 +2420,8 @@ Retrieve detailed information about a specific work item. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2578,7 +2592,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2624,6 +2638,8 @@ Long poll for work items in the queue. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2790,7 +2806,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2836,6 +2852,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3009,7 +3027,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3055,6 +3073,8 @@ Record a heartbeat for a work item to maintain the lease. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3159,7 +3179,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3205,6 +3225,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3383,7 +3405,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3429,6 +3451,8 @@ List work items in an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3600,7 +3624,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3646,6 +3670,8 @@ Update work item metadata with merge semantics. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3816,7 +3842,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3862,6 +3888,8 @@ Get statistics about the work queue for an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/archive.md b/content/en/api/beta/environments/archive.md index 03ac891f01..595e5fe458 100644 --- a/content/en/api/beta/environments/archive.md +++ b/content/en/api/beta/environments/archive.md @@ -21,7 +21,7 @@ Archive an environment by ID. Archived environments cannot be used to create new - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive an environment by ID. Archived environments cannot be used to create new - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -201,9 +203,9 @@ Archive an environment by ID. Archived environments cannot be used to create new RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` diff --git a/content/en/api/beta/environments/create.md b/content/en/api/beta/environments/create.md index 488953e4d7..308e1d1d98 100644 --- a/content/en/api/beta/environments/create.md +++ b/content/en/api/beta/environments/create.md @@ -17,7 +17,7 @@ Create a new environment with the specified configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create a new environment with the specified configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -321,9 +323,9 @@ Create a new environment with the specified configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` diff --git a/content/en/api/beta/environments/delete.md b/content/en/api/beta/environments/delete.md index a183ccc0b7..263b029427 100644 --- a/content/en/api/beta/environments/delete.md +++ b/content/en/api/beta/environments/delete.md @@ -21,7 +21,7 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Delete an environment by ID. Returns a confirmation of the deletion. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/list.md b/content/en/api/beta/environments/list.md index 5ef4190bf1..3ac9a8788e 100644 --- a/content/en/api/beta/environments/list.md +++ b/content/en/api/beta/environments/list.md @@ -31,7 +31,7 @@ List environments with pagination support. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ List environments with pagination support. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -211,9 +213,9 @@ List environments with pagination support. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` diff --git a/content/en/api/beta/environments/retrieve.md b/content/en/api/beta/environments/retrieve.md index 9fd585a5ed..46fda88906 100644 --- a/content/en/api/beta/environments/retrieve.md +++ b/content/en/api/beta/environments/retrieve.md @@ -21,7 +21,7 @@ Retrieve a specific environment by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Retrieve a specific environment by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -201,9 +203,9 @@ Retrieve a specific environment by ID. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` diff --git a/content/en/api/beta/environments/update.md b/content/en/api/beta/environments/update.md index 4019abf343..5f404d20b1 100644 --- a/content/en/api/beta/environments/update.md +++ b/content/en/api/beta/environments/update.md @@ -21,7 +21,7 @@ Update an existing environment's configuration. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update an existing environment's configuration. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -195,7 +197,7 @@ Update an existing environment's configuration. - `description: optional string or null` - Updated description of the environment + Updated description of the environment. Omit to preserve; null clears to null; an empty string is stored as an empty string. - `metadata: optional map[string]` @@ -325,9 +327,9 @@ Update an existing environment's configuration. RFC 3339 timestamp when environment was created - - `description: string` + - `description: string or null` - User-provided description for the environment + User-provided description for the environment; null when unset - `metadata: map[string]` diff --git a/content/en/api/beta/environments/work.md b/content/en/api/beta/environments/work.md index 3018e7795c..270f4f8517 100644 --- a/content/en/api/beta/environments/work.md +++ b/content/en/api/beta/environments/work.md @@ -27,7 +27,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Retrieve detailed information about a specific work item. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -243,7 +245,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -289,6 +291,8 @@ Long poll for work items in the queue. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -455,7 +459,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -501,6 +505,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -674,7 +680,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -720,6 +726,8 @@ Record a heartbeat for a work item to maintain the lease. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -824,7 +832,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -870,6 +878,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1048,7 +1058,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1094,6 +1104,8 @@ List work items in an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1265,7 +1277,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1311,6 +1323,8 @@ Update work item metadata with merge semantics. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1481,7 +1495,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1527,6 +1541,8 @@ Get statistics about the work queue for an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/ack.md b/content/en/api/beta/environments/work/ack.md index 41b0e6101a..2d084a6dec 100644 --- a/content/en/api/beta/environments/work/ack.md +++ b/content/en/api/beta/environments/work/ack.md @@ -25,7 +25,7 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Acknowledge receipt of a work item, transitioning it from 'queued' to 'starting' - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/heartbeat.md b/content/en/api/beta/environments/work/heartbeat.md index 4514c263df..30733a8d42 100644 --- a/content/en/api/beta/environments/work/heartbeat.md +++ b/content/en/api/beta/environments/work/heartbeat.md @@ -35,7 +35,7 @@ Record a heartbeat for a work item to maintain the lease. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ Record a heartbeat for a work item to maintain the lease. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/list.md b/content/en/api/beta/environments/work/list.md index 67adb8d0ae..3101c2e336 100644 --- a/content/en/api/beta/environments/work/list.md +++ b/content/en/api/beta/environments/work/list.md @@ -33,7 +33,7 @@ List work items in an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ List work items in an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/poll.md b/content/en/api/beta/environments/work/poll.md index 33428b566b..5ff56e9a47 100644 --- a/content/en/api/beta/environments/work/poll.md +++ b/content/en/api/beta/environments/work/poll.md @@ -33,7 +33,7 @@ Long poll for work items in the queue. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Long poll for work items in the queue. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/retrieve.md b/content/en/api/beta/environments/work/retrieve.md index bc063d834e..9aef052cf2 100644 --- a/content/en/api/beta/environments/work/retrieve.md +++ b/content/en/api/beta/environments/work/retrieve.md @@ -25,7 +25,7 @@ Retrieve detailed information about a specific work item. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Retrieve detailed information about a specific work item. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/stats.md b/content/en/api/beta/environments/work/stats.md index 62fb08087c..b16fd0d69c 100644 --- a/content/en/api/beta/environments/work/stats.md +++ b/content/en/api/beta/environments/work/stats.md @@ -21,7 +21,7 @@ Get statistics about the work queue for an environment. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get statistics about the work queue for an environment. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/stop.md b/content/en/api/beta/environments/work/stop.md index 6ca1ca3ec8..173c98c8b8 100644 --- a/content/en/api/beta/environments/work/stop.md +++ b/content/en/api/beta/environments/work/stop.md @@ -25,7 +25,7 @@ Stop a work item, initiating graceful or forced shutdown. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Stop a work item, initiating graceful or forced shutdown. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/environments/work/update.md b/content/en/api/beta/environments/work/update.md index 2b84a206bd..86f698a78d 100644 --- a/content/en/api/beta/environments/work/update.md +++ b/content/en/api/beta/environments/work/update.md @@ -25,7 +25,7 @@ Update work item metadata with merge semantics. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Update work item metadata with merge semantics. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/files.md b/content/en/api/beta/files.md index efef31ac62..dc64d05904 100644 --- a/content/en/api/beta/files.md +++ b/content/en/api/beta/files.md @@ -19,7 +19,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Upload File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -89,7 +91,7 @@ Upload File ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -202,7 +204,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -248,6 +250,8 @@ List Files - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -272,7 +276,7 @@ List Files ### Returns -- `data: array of FileMetadata` +- `data: array of BetaFileMetadata` List of file metadata objects. @@ -390,7 +394,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -436,6 +440,8 @@ Download File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -487,7 +493,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -533,6 +539,8 @@ Get File Metadata - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -557,7 +565,7 @@ Get File Metadata ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -654,7 +662,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -700,6 +708,8 @@ Delete File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -724,7 +734,7 @@ Delete File ### Returns -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` @@ -759,23 +769,9 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ ## Domain Types -### Beta File Scope +### Beta Deleted File -- `BetaFileScope object { id, type }` - - - `id: string` - - The ID of the scoping resource (e.g., the session ID). - - - `type: "session"` - - The type of scope (e.g., `"session"`). - - - `"session"` - -### Deleted File - -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` @@ -789,9 +785,9 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ - `"file_deleted"` -### File Metadata +### Beta File Metadata -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` @@ -840,3 +836,17 @@ curl https://api.anthropic.com/v1/files/$FILE_ID \ The type of scope (e.g., `"session"`). - `"session"` + +### Beta File Scope + +- `BetaFileScope object { id, type }` + + - `id: string` + + The ID of the scoping resource (e.g., the session ID). + + - `type: "session"` + + The type of scope (e.g., `"session"`). + + - `"session"` diff --git a/content/en/api/beta/files/delete.md b/content/en/api/beta/files/delete.md index a3ad63d6ba..f3b46b189f 100644 --- a/content/en/api/beta/files/delete.md +++ b/content/en/api/beta/files/delete.md @@ -23,7 +23,7 @@ Delete File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Delete File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -93,7 +95,7 @@ Delete File ### Returns -- `DeletedFile object { id, type }` +- `BetaDeletedFile object { id, type }` - `id: string` diff --git a/content/en/api/beta/files/download.md b/content/en/api/beta/files/download.md index 3ab65e14e0..bf14c4deb9 100644 --- a/content/en/api/beta/files/download.md +++ b/content/en/api/beta/files/download.md @@ -23,7 +23,7 @@ Download File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Download File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/files/list.md b/content/en/api/beta/files/list.md index 93d5f1d3f7..be440e1cdc 100644 --- a/content/en/api/beta/files/list.md +++ b/content/en/api/beta/files/list.md @@ -37,7 +37,7 @@ List Files - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83,6 +83,8 @@ List Files - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -107,7 +109,7 @@ List Files ### Returns -- `data: array of FileMetadata` +- `data: array of BetaFileMetadata` List of file metadata objects. diff --git a/content/en/api/beta/files/retrieve_metadata.md b/content/en/api/beta/files/retrieve_metadata.md index 3a97f2e898..09db91428b 100644 --- a/content/en/api/beta/files/retrieve_metadata.md +++ b/content/en/api/beta/files/retrieve_metadata.md @@ -23,7 +23,7 @@ Get File Metadata - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Get File Metadata - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -93,7 +95,7 @@ Get File Metadata ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` diff --git a/content/en/api/beta/files/upload.md b/content/en/api/beta/files/upload.md index a63c9a0999..7c7de4982a 100644 --- a/content/en/api/beta/files/upload.md +++ b/content/en/api/beta/files/upload.md @@ -17,7 +17,7 @@ Upload File - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Upload File - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -87,7 +89,7 @@ Upload File ### Returns -- `FileMetadata object { id, created_at, filename, 5 more }` +- `BetaFileMetadata object { id, created_at, filename, 5 more }` - `id: string` diff --git a/content/en/api/beta/memory_stores.md b/content/en/api/beta/memory_stores.md index c99da0747d..affdf130af 100644 --- a/content/en/api/beta/memory_stores.md +++ b/content/en/api/beta/memory_stores.md @@ -19,7 +19,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -205,7 +207,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -251,6 +253,8 @@ List memory stores - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -364,7 +368,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -410,6 +414,8 @@ Retrieve a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -514,7 +520,7 @@ Update a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -560,6 +566,8 @@ Update a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -680,7 +688,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -726,6 +734,8 @@ Delete a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -799,7 +809,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -845,6 +855,8 @@ Archive a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1016,7 +1028,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1062,6 +1074,8 @@ Create a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1215,7 +1229,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1261,6 +1275,8 @@ List memories - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1410,7 +1426,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1456,6 +1472,8 @@ Retrieve a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1580,7 +1598,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1626,6 +1644,8 @@ Update a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1770,7 +1790,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1816,6 +1836,8 @@ Delete a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2233,6 +2255,10 @@ List memory versions Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id @@ -2253,7 +2279,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2299,6 +2325,8 @@ List memory versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2409,6 +2437,18 @@ List memory versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -2495,7 +2535,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2541,6 +2581,8 @@ Retrieve a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2651,6 +2693,18 @@ Retrieve a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -2718,7 +2772,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2764,6 +2818,8 @@ Redact a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2874,6 +2930,18 @@ Redact a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -2926,7 +2994,7 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ### Beta Managed Agents Actor -- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor` +- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor or BetaManagedAgentsServiceAccountActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). @@ -2966,6 +3034,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents API Actor - `BetaManagedAgentsAPIActor object { api_key_id, type }` @@ -3068,6 +3148,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -3092,6 +3184,20 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions - `"deleted"` +### Beta Managed Agents Service Account Actor + +- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents Session Actor - `BetaManagedAgentsSessionActor object { session_id, type }` diff --git a/content/en/api/beta/memory_stores/archive.md b/content/en/api/beta/memory_stores/archive.md index cb3062a36f..356bced8e3 100644 --- a/content/en/api/beta/memory_stores/archive.md +++ b/content/en/api/beta/memory_stores/archive.md @@ -21,7 +21,7 @@ Archive a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/create.md b/content/en/api/beta/memory_stores/create.md index 324e8be238..30fa5657d9 100644 --- a/content/en/api/beta/memory_stores/create.md +++ b/content/en/api/beta/memory_stores/create.md @@ -17,7 +17,7 @@ Create a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/delete.md b/content/en/api/beta/memory_stores/delete.md index 24c3d93803..990013da3f 100644 --- a/content/en/api/beta/memory_stores/delete.md +++ b/content/en/api/beta/memory_stores/delete.md @@ -21,7 +21,7 @@ Delete a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Delete a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/list.md b/content/en/api/beta/memory_stores/list.md index fa4b626da4..73f32bff3f 100644 --- a/content/en/api/beta/memory_stores/list.md +++ b/content/en/api/beta/memory_stores/list.md @@ -39,7 +39,7 @@ List memory stores - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -85,6 +85,8 @@ List memory stores - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories.md b/content/en/api/beta/memory_stores/memories.md index 2ecb78fd2d..50d01a161c 100644 --- a/content/en/api/beta/memory_stores/memories.md +++ b/content/en/api/beta/memory_stores/memories.md @@ -33,7 +33,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Create a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -232,7 +234,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -278,6 +280,8 @@ List memories - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -427,7 +431,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -473,6 +477,8 @@ Retrieve a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -597,7 +603,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -643,6 +649,8 @@ Update a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -787,7 +795,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -833,6 +841,8 @@ Delete a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories/create.md b/content/en/api/beta/memory_stores/memories/create.md index f28bff664d..f08f9ffd09 100644 --- a/content/en/api/beta/memory_stores/memories/create.md +++ b/content/en/api/beta/memory_stores/memories/create.md @@ -31,7 +31,7 @@ Create a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ Create a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories/delete.md b/content/en/api/beta/memory_stores/memories/delete.md index eb9792ff30..e66222243b 100644 --- a/content/en/api/beta/memory_stores/memories/delete.md +++ b/content/en/api/beta/memory_stores/memories/delete.md @@ -29,7 +29,7 @@ Delete a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -75,6 +75,8 @@ Delete a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories/list.md b/content/en/api/beta/memory_stores/memories/list.md index e089c71bfa..c08000017a 100644 --- a/content/en/api/beta/memory_stores/memories/list.md +++ b/content/en/api/beta/memory_stores/memories/list.md @@ -47,7 +47,7 @@ List memories - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -93,6 +93,8 @@ List memories - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories/retrieve.md b/content/en/api/beta/memory_stores/memories/retrieve.md index 0af20dea99..caa85bef3d 100644 --- a/content/en/api/beta/memory_stores/memories/retrieve.md +++ b/content/en/api/beta/memory_stores/memories/retrieve.md @@ -33,7 +33,7 @@ Retrieve a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Retrieve a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memories/update.md b/content/en/api/beta/memory_stores/memories/update.md index b68162a755..93807d6c7f 100644 --- a/content/en/api/beta/memory_stores/memories/update.md +++ b/content/en/api/beta/memory_stores/memories/update.md @@ -33,7 +33,7 @@ Update a memory - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Update a memory - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/memory_versions.md b/content/en/api/beta/memory_stores/memory_versions.md index 93ac508d44..6a95a44223 100644 --- a/content/en/api/beta/memory_stores/memory_versions.md +++ b/content/en/api/beta/memory_stores/memory_versions.md @@ -51,6 +51,10 @@ List memory versions Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id @@ -71,7 +75,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -117,6 +121,8 @@ List memory versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -227,6 +233,18 @@ List memory versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -313,7 +331,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -359,6 +377,8 @@ Retrieve a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -469,6 +489,18 @@ Retrieve a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -536,7 +568,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -582,6 +614,8 @@ Redact a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -692,6 +726,18 @@ Redact a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -744,7 +790,7 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ### Beta Managed Agents Actor -- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor` +- `BetaManagedAgentsActor = BetaManagedAgentsSessionActor or BetaManagedAgentsAPIActor or BetaManagedAgentsUserActor or BetaManagedAgentsServiceAccountActor` Identifies who performed a write or redact operation. Captured at write time on the `memory_version` row. The API key that created a session is not recorded on agent writes; attribution answers who made the write, not who is ultimately responsible. Look up session provenance separately via the [Sessions API](/docs/en/api/sessions-retrieve). @@ -784,6 +830,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents API Actor - `BetaManagedAgentsAPIActor object { api_key_id, type }` @@ -886,6 +944,18 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. @@ -910,6 +980,20 @@ curl https://api.anthropic.com/v1/memory_stores/$MEMORY_STORE_ID/memory_versions - `"deleted"` +### Beta Managed Agents Service Account Actor + +- `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + ### Beta Managed Agents Session Actor - `BetaManagedAgentsSessionActor object { session_id, type }` diff --git a/content/en/api/beta/memory_stores/memory_versions/list.md b/content/en/api/beta/memory_stores/memory_versions/list.md index 5e1a4385a8..2818c2c71b 100644 --- a/content/en/api/beta/memory_stores/memory_versions/list.md +++ b/content/en/api/beta/memory_stores/memory_versions/list.md @@ -49,6 +49,10 @@ List memory versions Query parameter for page +- `service_account_id: optional string` + + Query parameter for service_account_id + - `session_id: optional string` Query parameter for session_id @@ -69,7 +73,7 @@ List memory versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -115,6 +119,8 @@ List memory versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -225,6 +231,18 @@ List memory versions ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. diff --git a/content/en/api/beta/memory_stores/memory_versions/redact.md b/content/en/api/beta/memory_stores/memory_versions/redact.md index 6a2d90e239..2640a141ab 100644 --- a/content/en/api/beta/memory_stores/memory_versions/redact.md +++ b/content/en/api/beta/memory_stores/memory_versions/redact.md @@ -23,7 +23,7 @@ Redact a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Redact a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -179,6 +181,18 @@ Redact a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. diff --git a/content/en/api/beta/memory_stores/memory_versions/retrieve.md b/content/en/api/beta/memory_stores/memory_versions/retrieve.md index 39dec4fb93..8255039b36 100644 --- a/content/en/api/beta/memory_stores/memory_versions/retrieve.md +++ b/content/en/api/beta/memory_stores/memory_versions/retrieve.md @@ -33,7 +33,7 @@ Retrieve a memory version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Retrieve a memory version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -189,6 +191,18 @@ Retrieve a memory version ID of the user who performed the write (a `user_...` value). + - `BetaManagedAgentsServiceAccountActor object { service_account_id, type }` + + Attribution for a write made by a workload authenticated as a service account, for example via Workload Identity Federation. + + - `service_account_id: string` + + ID of the service account that performed the write (a `svac_...` value). + + - `type: "service_account_actor"` + + - `"service_account_actor"` + - `path: optional string or null` The memory's path at the time of this write. `null` if and only if `redacted_at` is set. diff --git a/content/en/api/beta/memory_stores/retrieve.md b/content/en/api/beta/memory_stores/retrieve.md index d124c9e878..8f73886d64 100644 --- a/content/en/api/beta/memory_stores/retrieve.md +++ b/content/en/api/beta/memory_stores/retrieve.md @@ -21,7 +21,7 @@ Retrieve a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Retrieve a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/memory_stores/update.md b/content/en/api/beta/memory_stores/update.md index 6df1fc9de0..bd1bcdf1bd 100644 --- a/content/en/api/beta/memory_stores/update.md +++ b/content/en/api/beta/memory_stores/update.md @@ -21,7 +21,7 @@ Update a memory store - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update a memory store - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/messages.md b/content/en/api/beta/messages.md index 4c0ebc9b2d..576b3342be 100644 --- a/content/en/api/beta/messages.md +++ b/content/en/api/beta/messages.md @@ -23,7 +23,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -301,7 +303,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -347,6 +349,18 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -385,7 +399,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -477,7 +491,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -523,7 +537,11 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -535,15 +553,15 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -563,8 +581,135 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -1144,141 +1289,104 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -2249,6 +2357,412 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -2479,6 +2993,248 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -3431,7 +4187,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -3473,6 +4229,10 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -4762,7 +5522,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ { @@ -4842,14 +5602,14 @@ curl https://api.anthropic.com/v1/messages \ "type": "model_changed" } }, - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber", "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "claude-sonnet-4-6", + "recommended_model": "claude-opus-4-8", "type": "refusal" }, "stop_reason": "end_turn", @@ -4915,7 +5675,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4961,6 +5721,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -5183,7 +5945,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -5229,6 +5991,18 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -5267,7 +6041,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -5359,7 +6133,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -5405,7 +6179,11 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -5417,15 +6195,15 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -5445,8 +6223,135 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -6026,141 +6931,104 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -6611,7 +7479,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"none"` -- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` +- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` Definitions of tools that the model may use. @@ -6959,6 +7827,412 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -7189,6 +8463,248 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -7928,7 +9444,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.", @@ -8738,676 +10254,751 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"bash_code_execution_tool_result_error"` -### Beta Cache Control Ephemeral +### Beta Browser Close Tab Config -- `BetaCacheControlEphemeral object { type, ttl }` +- `BetaBrowserCloseTabConfig object { defer_loading, enabled }` - - `type: "ephemeral"` + `close_tab`'s config overrides. - - `"ephemeral"` + - `defer_loading: optional boolean or null` - - `ttl: optional "5m" or "1h"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The time-to-live for the cache control breakpoint. + - `enabled: optional boolean or null` - This may be one the following values: + 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. - - `5m`: 5 minutes - - `1h`: 1 hour +### Beta Browser Double Click Config - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. +- `BetaBrowserDoubleClickConfig object { defer_loading, enabled }` - - `"5m"` + `double_click`'s config overrides. - - `"1h"` + - `defer_loading: optional boolean or null` -### Beta Cache Creation + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCacheCreation object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }` + - `enabled: optional boolean or null` - - `ephemeral_1h_input_tokens: number` + 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. - The number of input tokens used to create the 1 hour cache entry. +### Beta Browser File Upload Config - - `ephemeral_5m_input_tokens: number` +- `BetaBrowserFileUploadConfig object { defer_loading, enabled }` - The number of input tokens used to create the 5 minute cache entry. + `file_upload`'s config overrides. -### Beta Cache Miss Messages Changed + - `defer_loading: optional boolean or null` -- `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_missed_input_tokens: number` + - `enabled: optional boolean or null` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + 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. - - `type: "messages_changed"` +### Beta Browser Find Config - - `"messages_changed"` +- `BetaBrowserFindConfig object { defer_loading, enabled }` -### Beta Cache Miss Model Changed + `find`'s config overrides. -- `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + - `defer_loading: optional boolean or null` - - `cache_missed_input_tokens: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `enabled: optional boolean or null` - - `type: "model_changed"` + 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. - - `"model_changed"` +### Beta Browser Form Input Config -### Beta Cache Miss Previous Message Not Found +- `BetaBrowserFormInputConfig object { defer_loading, enabled }` -- `BetaCacheMissPreviousMessageNotFound object { type }` + `form_input`'s config overrides. - - `type: "previous_message_not_found"` + - `defer_loading: optional boolean or null` - - `"previous_message_not_found"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Cache Miss System Changed + - `enabled: optional boolean or null` -- `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + 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. - - `cache_missed_input_tokens: number` +### Beta Browser Get Page Text Config - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. +- `BetaBrowserGetPageTextConfig object { defer_loading, enabled }` - - `type: "system_changed"` + `get_page_text`'s config overrides. - - `"system_changed"` + - `defer_loading: optional boolean or null` -### Beta Cache Miss Tools Changed + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + - `enabled: optional boolean or null` - - `cache_missed_input_tokens: number` + 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. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. +### Beta Browser Hold Key Config - - `type: "tools_changed"` +- `BetaBrowserHoldKeyConfig object { defer_loading, enabled }` - - `"tools_changed"` + `hold_key`'s config overrides. -### Beta Cache Miss Unavailable + - `defer_loading: optional boolean or null` -- `BetaCacheMissUnavailable object { type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "unavailable"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. -### Beta Citation Char Location +### Beta Browser Hover Config -- `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` +- `BetaBrowserHoverConfig object { defer_loading, enabled }` - - `cited_text: string` + `hover`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_char_index: number` + - `enabled: optional boolean or null` - - `file_id: string or null` + 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. - - `start_char_index: number` +### Beta Browser Javascript Exec Config - - `type: "char_location"` +- `BetaBrowserJavascriptExecConfig object { defer_loading, enabled }` - - `"char_location"` + `javascript_exec`'s config overrides. -### Beta Citation Char Location Param + - `defer_loading: optional boolean or null` -- `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cited_text: string` + - `enabled: optional boolean or null` - - `document_index: number` + 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. - - `document_title: string or null` +### Beta Browser Key Config - - `end_char_index: number` +- `BetaBrowserKeyConfig object { defer_loading, enabled }` - - `start_char_index: number` + `key`'s config overrides. - - `type: "char_location"` + - `defer_loading: optional boolean or null` - - `"char_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Citation Config + - `enabled: optional boolean or null` -- `BetaCitationConfig object { enabled }` + 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. - - `enabled: boolean` +### Beta Browser Left Click Config -### Beta Citation Content Block Location +- `BetaBrowserLeftClickConfig object { defer_loading, enabled }` -- `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + `left_click`'s config overrides. - - `cited_text: string` + - `defer_loading: optional boolean or null` - The full text of the cited block range, concatenated. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - 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. + - `enabled: optional boolean or null` - - `document_index: number` + 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. - - `document_title: string or null` +### Beta Browser Left Click Drag Config - - `end_block_index: number` +- `BetaBrowserLeftClickDragConfig object { defer_loading, enabled }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + `left_click_drag`'s config overrides. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `defer_loading: optional boolean or null` - - `file_id: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_block_index: number` + - `enabled: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `type: "content_block_location"` +### Beta Browser Left Mouse Down Config - - `"content_block_location"` +- `BetaBrowserLeftMouseDownConfig object { defer_loading, enabled }` -### Beta Citation Content Block Location Param + `left_mouse_down`'s config overrides. -- `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The full text of the cited block range, concatenated. + - `enabled: optional boolean or null` - 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. + 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. - - `document_index: number` +### Beta Browser Left Mouse Up Config - - `document_title: string or null` +- `BetaBrowserLeftMouseUpConfig object { defer_loading, enabled }` - - `end_block_index: number` + `left_mouse_up`'s config overrides. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `defer_loading: optional boolean or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_block_index: number` + - `enabled: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `type: "content_block_location"` +### Beta Browser List Tabs Config - - `"content_block_location"` +- `BetaBrowserListTabsConfig object { defer_loading, enabled }` -### Beta Citation Page Location + `list_tabs`'s config overrides. -- `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `document_index: number` + - `enabled: optional boolean or null` - - `document_title: string or null` + 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. - - `end_page_number: number` +### Beta Browser Middle Click Config - - `file_id: string or null` +- `BetaBrowserMiddleClickConfig object { defer_loading, enabled }` - - `start_page_number: number` + `middle_click`'s config overrides. - - `type: "page_location"` + - `defer_loading: optional boolean or null` - - `"page_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Citation Page Location Param + - `enabled: optional boolean or null` -- `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + 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. - - `cited_text: string` +### Beta Browser Mouse Move Config - - `document_index: number` +- `BetaBrowserMouseMoveConfig object { defer_loading, enabled }` - - `document_title: string or null` + `mouse_move`'s config overrides. - - `end_page_number: number` + - `defer_loading: optional boolean or null` - - `start_page_number: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "page_location"` + - `enabled: optional boolean or null` - - `"page_location"` + 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. -### Beta Citation Search Result Location +### Beta Browser Navigate Config -- `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` +- `BetaBrowserNavigateConfig object { defer_loading, enabled }` - - `cited_text: string` + `navigate`'s config overrides. - The full text of the cited block range, concatenated. + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_block_index: number` + - `enabled: optional boolean or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. +### Beta Browser New Tab Config - - `search_result_index: number` +- `BetaBrowserNewTabConfig object { defer_loading, enabled }` - 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. + `new_tab`'s config overrides. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `defer_loading: optional boolean or null` - - `source: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_block_index: number` + - `enabled: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `title: string or null` +### Beta Browser Read Console Config - - `type: "search_result_location"` +- `BetaBrowserReadConsoleConfig object { defer_loading, enabled }` - - `"search_result_location"` + `read_console`'s config overrides. -### Beta Citation Search Result Location Param + - `defer_loading: optional boolean or null` -- `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cited_text: string` + - `enabled: optional boolean or null` - The full text of the cited block range, concatenated. + 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. - 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. +### Beta Browser Read Network Config - - `end_block_index: number` +- `BetaBrowserReadNetworkConfig object { defer_loading, enabled }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + `read_network`'s config overrides. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `defer_loading: optional boolean or null` - - `search_result_index: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - 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. + - `enabled: optional boolean or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + 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. - - `source: string` +### Beta Browser Read Page Config - - `start_block_index: number` +- `BetaBrowserReadPageConfig object { defer_loading, enabled }` - 0-based index of the first cited block in the source's `content` array. + `read_page`'s config overrides. - - `title: string or null` + - `defer_loading: optional boolean or null` - - `type: "search_result_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"search_result_location"` + - `enabled: optional boolean or null` -### Beta Citation Web Search Result Location Param + 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. -- `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` +### Beta Browser Right Click Config - - `cited_text: string` +- `BetaBrowserRightClickConfig object { defer_loading, enabled }` - - `encrypted_index: string` + `right_click`'s config overrides. - - `title: string or null` + - `defer_loading: optional boolean or null` - - `type: "web_search_result_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_search_result_location"` + - `enabled: optional boolean or null` - - `url: string` + 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. -### Beta Citations Config Param +### Beta Browser Screenshot Config -- `BetaCitationsConfigParam object { enabled }` +- `BetaBrowserScreenshotConfig object { defer_loading, enabled }` - - `enabled: optional boolean` + `screenshot`'s config overrides. -### Beta Citations Delta + - `defer_loading: optional boolean or null` -- `BetaCitationsDelta object { citation, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` + - `enabled: optional boolean or null` - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + 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. - - `cited_text: string` +### Beta Browser Scroll Config - - `document_index: number` +- `BetaBrowserScrollConfig object { defer_loading, enabled }` - - `document_title: string or null` + `scroll`'s config overrides. - - `end_char_index: number` + - `defer_loading: optional boolean or null` - - `file_id: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_char_index: number` + - `enabled: optional boolean or null` - - `type: "char_location"` + 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. - - `"char_location"` +### Beta Browser Scroll To Config - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` +- `BetaBrowserScrollToConfig object { defer_loading, enabled }` - - `cited_text: string` + `scroll_to`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_page_number: number` + - `enabled: optional boolean or null` - - `file_id: string or null` + 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. - - `start_page_number: number` +### Beta Browser State Block Param - - `type: "page_location"` +- `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `"page_location"` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `cited_text: string` + - `tabs: array of BetaBrowserStateTabEntry` - The full text of the cited block range, concatenated. + 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`. - 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. + - `tab_id: string` - - `document_index: number` + The caller-assigned identifier for this tab, unique within the inventory. - - `document_title: string or null` + - `title: string` - - `end_block_index: number` + The title of the page the tab is showing. May be empty. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `url: string` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + The URL of the page the tab is showing. May be empty. - - `file_id: string or null` + - `active: optional boolean` - - `start_block_index: number` + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - 0-based index of the first cited block in the source's `content` array. + - `type: "browser_state"` - - `type: "content_block_location"` + - `"browser_state"` - - `"content_block_location"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + Create a cache control breakpoint at this content block. - - `cited_text: string` + - `type: "ephemeral"` - - `encrypted_index: string` + - `"ephemeral"` - - `title: string or null` + - `ttl: optional "5m" or "1h"` - - `type: "web_search_result_location"` + The time-to-live for the cache control breakpoint. - - `"web_search_result_location"` + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` - `url: string` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + The final post-redirect URL the download was served from. - - `cited_text: string` + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - The full text of the cited block range, concatenated. + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - 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. + - `download_id: string` - - `end_block_index: number` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "download_completed"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"download_completed"` - - `search_result_index: number` + - `url: string` - 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. + The final post-redirect URL the download was served from. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `path: optional string or null` - - `source: string` + 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. - - `start_block_index: number` + - `size_bytes: optional number or null` - 0-based index of the first cited block in the source's `content` array. + The completed download's size. - - `title: string or null` + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `type: "search_result_location"` + A file download that failed — or was cancelled — during this call. - - `"search_result_location"` + - `download_id: string` - - `type: "citations_delta"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `"citations_delta"` + - `type: "download_failed"` -### Beta Citations Web Search Result Location + - `"download_failed"` -- `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `url: string` - - `cited_text: string` + The final post-redirect URL the download was served from. - - `encrypted_index: string` + - `error: optional string or null` - - `title: string or null` + The failure or cancellation detail, when known. - - `type: "web_search_result_location"` +### Beta Browser State Change - - `"web_search_result_location"` +- `BetaBrowserStateChange = BetaBrowserStateChangeTabOpened or BetaBrowserStateChangeDownloadStarted or BetaBrowserStateChangeDownloadCompleted or BetaBrowserStateChangeDownloadFailed` - - `url: string` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. -### Beta Clear Thinking 20251015 Edit + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. -- `BetaClearThinking20251015Edit object { type, keep }` + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` - - `type: "clear_thinking_20251015"` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `"clear_thinking_20251015"` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"` + - `tab_id: string` - Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed. + The `tab_id` of the opened tab, present in `tabs`. - - `BetaThinkingTurns object { type, value }` + - `type: "tab_opened"` - - `type: "thinking_turns"` + - `"tab_opened"` - - `"thinking_turns"` + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` - - `value: number` + A file download that started during this call. - - `BetaAllThinkingTurns object { type }` + - `download_id: string` - - `type: "all"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `"all"` + - `type: "download_started"` - - `"all"` + - `"download_started"` - - `"all"` + - `url: string` -### Beta Clear Thinking 20251015 Edit Response + The final post-redirect URL the download was served from. -- `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `cleared_input_tokens: number` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - Number of input tokens cleared by this edit. + - `download_id: string` - - `cleared_thinking_turns: number` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Number of thinking turns that were cleared. + - `type: "download_completed"` - - `type: "clear_thinking_20251015"` + - `"download_completed"` - The type of context management edit applied. + - `url: string` - - `"clear_thinking_20251015"` + The final post-redirect URL the download was served from. -### Beta Clear Tool Uses 20250919 Edit + - `path: optional string or null` -- `BetaClearToolUses20250919Edit object { type, clear_at_least, clear_tool_inputs, 3 more }` + 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. - - `type: "clear_tool_uses_20250919"` + - `size_bytes: optional number or null` - - `"clear_tool_uses_20250919"` + The completed download's size. - - `clear_at_least: optional BetaInputTokensClearAtLeast or null` + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed. + A file download that failed — or was cancelled — during this call. - - `type: "input_tokens"` + - `download_id: string` - - `"input_tokens"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `value: number` + - `type: "download_failed"` - - `clear_tool_inputs: optional boolean or array of string or null` + - `"download_failed"` - Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) + - `url: string` - - `boolean` + The final post-redirect URL the download was served from. - - `array of string` + - `error: optional string or null` - - `exclude_tools: optional array of string or null` + The failure or cancellation detail, when known. - Tool names whose uses are preserved from clearing +### Beta Browser State Change Download Completed - - `keep: optional BetaToolUsesKeep` +- `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - Number of tool uses to retain in the conversation + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - - `type: "tool_uses"` + - `download_id: string` - - `"tool_uses"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `value: number` + - `type: "download_completed"` - - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger` + - `"download_completed"` - Condition that triggers the context management strategy + - `url: string` - - `BetaInputTokensTrigger object { type, value }` + The final post-redirect URL the download was served from. - - `type: "input_tokens"` + - `path: optional string or null` - - `"input_tokens"` + 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. - - `value: number` + - `size_bytes: optional number or null` - - `BetaToolUsesTrigger object { type, value }` + The completed download's size. - - `type: "tool_uses"` +### Beta Browser State Change Download Failed - - `"tool_uses"` +- `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `value: number` + A file download that failed — or was cancelled — during this call. -### Beta Clear Tool Uses 20250919 Edit Response + - `download_id: string` -- `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `cleared_input_tokens: number` + - `type: "download_failed"` - Number of input tokens cleared by this edit. + - `"download_failed"` - - `cleared_tool_uses: number` + - `url: string` - Number of tool uses that were cleared. + The final post-redirect URL the download was served from. - - `type: "clear_tool_uses_20250919"` + - `error: optional string or null` - The type of context management edit applied. + The failure or cancellation detail, when known. - - `"clear_tool_uses_20250919"` +### Beta Browser State Change Download Started -### Beta Code Execution Output Block +- `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` -- `BetaCodeExecutionOutputBlock object { file_id, type }` + A file download that started during this call. - - `file_id: string` + - `download_id: string` - - `type: "code_execution_output"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `"code_execution_output"` + - `type: "download_started"` -### Beta Code Execution Output Block Param + - `"download_started"` -- `BetaCodeExecutionOutputBlockParam object { file_id, type }` + - `url: string` - - `file_id: string` + The final post-redirect URL the download was served from. - - `type: "code_execution_output"` +### Beta Browser State Change Tab Opened - - `"code_execution_output"` +- `BetaBrowserStateChangeTabOpened object { tab_id, type }` -### Beta Code Execution Result Block + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. -- `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `content: array of BetaCodeExecutionOutputBlock` + - `tab_id: string` - - `file_id: string` + The `tab_id` of the opened tab, present in `tabs`. - - `type: "code_execution_output"` + - `type: "tab_opened"` - - `"code_execution_output"` + - `"tab_opened"` - - `return_code: number` +### Beta Browser State Tab Entry - - `stderr: string` +- `BetaBrowserStateTabEntry object { tab_id, title, url, active }` - - `stdout: string` + One open browser tab reported in a `browser_state` block's `tabs` + inventory. - - `type: "code_execution_result"` + `tab_id` is the caller-assigned identifier for the tab; `title` and + `url` describe the page the tab is currently showing and may be empty + strings (a blank tab legitimately has both empty). `active` marks the + tab that is active after this call; whenever `tabs` is non-empty, + exactly one entry is marked. - - `"code_execution_result"` + - `tab_id: string` -### Beta Code Execution Result Block Param + The caller-assigned identifier for this tab, unique within the inventory. -- `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `title: string` - - `content: array of BetaCodeExecutionOutputBlockParam` + The title of the page the tab is showing. May be empty. - - `file_id: string` + - `url: string` - - `type: "code_execution_output"` + The URL of the page the tab is showing. May be empty. - - `"code_execution_output"` + - `active: optional boolean` - - `return_code: number` + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `stderr: string` +### Beta Browser Switch Tab Config - - `stdout: string` +- `BetaBrowserSwitchTabConfig object { defer_loading, enabled }` - - `type: "code_execution_result"` + `switch_tab`'s config overrides. - - `"code_execution_result"` + - `defer_loading: optional boolean or null` -### Beta Code Execution Tool 20250522 + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + - `enabled: optional boolean or null` - - `name: "code_execution"` + 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. - Name of the tool. +### Beta Browser Toolset 20260801 - This is how the tool will be called by the model and in `tool_use` blocks. +- `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"code_execution"` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - - `type: "code_execution_20250522"` + - `type: "browser_toolset_20260801"` - - `"code_execution_20250522"` + - `"browser_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -9442,3157 +11033,3042 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `defer_loading: optional boolean` + - `configs: optional BetaBrowserToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `strict: optional boolean` + - `close_tab: optional BetaBrowserCloseTabConfig or null` - When true, guarantees schema validation on tool names and inputs + `close_tab`'s config overrides. -### Beta Code Execution Tool 20250825 + - `defer_loading: optional boolean or null` -- `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "code_execution"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `double_click: optional BetaBrowserDoubleClickConfig or null` - - `"code_execution"` + `double_click`'s config overrides. - - `type: "code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250825"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `file_upload: optional BetaBrowserFileUploadConfig or null` - - `"code_execution_20260120"` + `file_upload`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `find: optional BetaBrowserFindConfig or null` - - `ttl: optional "5m" or "1h"` + `find`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `form_input: optional BetaBrowserFormInputConfig or null` - - `"1h"` + `form_input`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. -### Beta Code Execution Tool 20260120 + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` -- `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + `get_page_text`'s config overrides. - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `defer_loading: optional boolean or null` - - `name: "code_execution"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"code_execution"` + - `hold_key: optional BetaBrowserHoldKeyConfig or null` - - `type: "code_execution_20260120"` + `hold_key`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `hover: optional BetaBrowserHoverConfig or null` - - `"code_execution_20260521"` + `hover`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "ephemeral"` + - `enabled: optional boolean or null` - - `"ephemeral"` + 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. - - `ttl: optional "5m" or "1h"` + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` - The time-to-live for the cache control breakpoint. + `javascript_exec`'s config overrides. - This may be one the following values: + - `defer_loading: optional boolean or null` - - `5m`: 5 minutes - - `1h`: 1 hour + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `enabled: optional boolean or null` - - `"5m"` + 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. - - `"1h"` + - `key: optional BetaBrowserKeyConfig or null` - - `defer_loading: optional boolean` + `key`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` -### Beta Code Execution Tool 20260521 + 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. -- `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + - `left_click: optional BetaBrowserLeftClickConfig or null` - Code execution tool with REPL state persistence. + `left_click`'s config overrides. - - `name: "code_execution"` + - `defer_loading: optional boolean or null` - Name of the tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This is how the tool will be called by the model and in `tool_use` blocks. + - `enabled: optional boolean or null` - - `"code_execution"` + 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. - - `type: "code_execution_20260521"` + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` - - `"code_execution_20260521"` + `left_click_drag`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `left_mouse_down`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` - This may be one the following values: + `left_mouse_up`'s config overrides. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"5m"` + - `enabled: optional boolean or null` - - `"1h"` + 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. - - `defer_loading: optional boolean` + - `list_tabs: optional BetaBrowserListTabsConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `list_tabs`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Code Execution Tool Result Block + - `enabled: optional boolean or null` -- `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + 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. - - `content: BetaCodeExecutionToolResultBlockContent` + - `middle_click: optional BetaBrowserMiddleClickConfig or null` - Code execution result with encrypted stdout for PFC + web_search results. + `middle_click`'s config overrides. - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `defer_loading: optional boolean or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` - - `"execution_time_exceeded"` + `mouse_move`'s config overrides. - - `type: "code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `"code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `enabled: optional boolean or null` - - `content: array of BetaCodeExecutionOutputBlock` + 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. - - `file_id: string` + - `navigate: optional BetaBrowserNavigateConfig or null` - - `type: "code_execution_output"` + `navigate`'s config overrides. - - `"code_execution_output"` + - `defer_loading: optional boolean or null` - - `return_code: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stderr: string` + - `enabled: optional boolean or null` - - `stdout: string` + 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. - - `type: "code_execution_result"` + - `new_tab: optional BetaBrowserNewTabConfig or null` - - `"code_execution_result"` + `new_tab`'s config overrides. - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `defer_loading: optional boolean or null` - Code execution result with encrypted stdout for PFC + web_search results. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BetaCodeExecutionOutputBlock` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` + - `read_console: optional BetaBrowserReadConsoleConfig or null` - - `encrypted_stdout: string` + `read_console`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "encrypted_code_execution_result"` + - `enabled: optional boolean or null` - - `"encrypted_code_execution_result"` + 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. - - `tool_use_id: string` + - `read_network: optional BetaBrowserReadNetworkConfig or null` - - `type: "code_execution_tool_result"` + `read_network`'s config overrides. - - `"code_execution_tool_result"` + - `defer_loading: optional boolean or null` -### Beta Code Execution Tool Result Block Content + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCodeExecutionToolResultBlockContent = BetaCodeExecutionToolResultError or BetaCodeExecutionResultBlock or BetaEncryptedCodeExecutionResultBlock` + - `enabled: optional boolean or null` - Code execution result with encrypted stdout for PFC + web_search results. + 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. - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `read_page: optional BetaBrowserReadPageConfig or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + `read_page`'s config overrides. - - `"invalid_tool_input"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"execution_time_exceeded"` + 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. - - `type: "code_execution_tool_result_error"` + - `right_click: optional BetaBrowserRightClickConfig or null` - - `"code_execution_tool_result_error"` + `right_click`'s config overrides. - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `defer_loading: optional boolean or null` - - `content: array of BetaCodeExecutionOutputBlock` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `file_id: string` + - `enabled: optional boolean or null` - - `type: "code_execution_output"` + 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. - - `"code_execution_output"` + - `screenshot: optional BetaBrowserScreenshotConfig or null` - - `return_code: number` + `screenshot`'s config overrides. - - `stderr: string` + - `defer_loading: optional boolean or null` - - `stdout: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_result"` + - `enabled: optional boolean or null` - - `"code_execution_result"` + 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. - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `scroll: optional BetaBrowserScrollConfig or null` - Code execution result with encrypted stdout for PFC + web_search results. + `scroll`'s config overrides. - - `content: array of BetaCodeExecutionOutputBlock` + - `defer_loading: optional boolean or null` - - `file_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_output"` + - `enabled: optional boolean or null` - - `encrypted_stdout: string` + 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. - - `return_code: number` + - `scroll_to: optional BetaBrowserScrollToConfig or null` - - `stderr: string` + `scroll_to`'s config overrides. - - `type: "encrypted_code_execution_result"` + - `defer_loading: optional boolean or null` - - `"encrypted_code_execution_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Code Execution Tool Result Block Param + - `enabled: optional boolean or null` -- `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + 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. - - `content: BetaCodeExecutionToolResultBlockParamContent` + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` - Code execution result with encrypted stdout for PFC + web_search results. + `switch_tab`'s config overrides. - - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` + - `defer_loading: optional boolean or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `triple_click: optional BetaBrowserTripleClickConfig or null` - - `"execution_time_exceeded"` + `triple_click`'s config overrides. - - `type: "code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `"code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `enabled: optional boolean or null` - - `content: array of BetaCodeExecutionOutputBlockParam` + 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. - - `file_id: string` + - `type: optional BetaBrowserTypeConfig or null` - - `type: "code_execution_output"` + `type`'s config overrides. - - `"code_execution_output"` + - `defer_loading: optional boolean or null` - - `return_code: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stderr: string` + - `enabled: optional boolean or null` - - `stdout: string` + 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. - - `type: "code_execution_result"` + - `wait: optional BetaBrowserWaitConfig or null` - - `"code_execution_result"` + `wait`'s config overrides. - - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `defer_loading: optional boolean or null` - Code execution result with encrypted stdout for PFC + web_search results. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BetaCodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` + - `zoom: optional BetaBrowserZoomConfig or null` - - `encrypted_stdout: string` + `zoom`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "encrypted_code_execution_result"` + - `enabled: optional boolean or null` - - `"encrypted_code_execution_result"` + 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. - - `tool_use_id: string` +### Beta Browser Toolset Configs - - `type: "code_execution_tool_result"` +- `BetaBrowserToolsetConfigs object { close_tab, double_click, file_upload, 28 more }` - - `"code_execution_tool_result"` + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `close_tab: optional BetaBrowserCloseTabConfig or null` - Create a cache control breakpoint at this content block. + `close_tab`'s config overrides. - - `type: "ephemeral"` + - `defer_loading: optional boolean or null` - - `"ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ttl: optional "5m" or "1h"` + - `enabled: optional boolean or null` - The time-to-live for the cache control breakpoint. + 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. - This may be one the following values: + - `double_click: optional BetaBrowserDoubleClickConfig or null` - - `5m`: 5 minutes - - `1h`: 1 hour + `double_click`'s config overrides. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `defer_loading: optional boolean or null` - - `"5m"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"1h"` + - `enabled: optional boolean or null` -### Beta Code Execution Tool Result Block Param Content + 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. -- `BetaCodeExecutionToolResultBlockParamContent = BetaCodeExecutionToolResultErrorParam or BetaCodeExecutionResultBlockParam or BetaEncryptedCodeExecutionResultBlockParam` + - `file_upload: optional BetaBrowserFileUploadConfig or null` - Code execution result with encrypted stdout for PFC + web_search results. + `file_upload`'s config overrides. - - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` + - `defer_loading: optional boolean or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `find: optional BetaBrowserFindConfig or null` - - `"execution_time_exceeded"` + `find`'s config overrides. - - `type: "code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `"code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `enabled: optional boolean or null` - - `content: array of BetaCodeExecutionOutputBlockParam` + 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. - - `file_id: string` + - `form_input: optional BetaBrowserFormInputConfig or null` - - `type: "code_execution_output"` + `form_input`'s config overrides. - - `"code_execution_output"` + - `defer_loading: optional boolean or null` - - `return_code: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stderr: string` + - `enabled: optional boolean or null` - - `stdout: string` + 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. - - `type: "code_execution_result"` + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` - - `"code_execution_result"` + `get_page_text`'s config overrides. - - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `defer_loading: optional boolean or null` - Code execution result with encrypted stdout for PFC + web_search results. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BetaCodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` + - `hold_key: optional BetaBrowserHoldKeyConfig or null` - - `encrypted_stdout: string` + `hold_key`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "encrypted_code_execution_result"` + - `enabled: optional boolean or null` - - `"encrypted_code_execution_result"` + 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. -### Beta Code Execution Tool Result Error + - `hover: optional BetaBrowserHoverConfig or null` -- `BetaCodeExecutionToolResultError object { error_code, type }` + `hover`'s config overrides. - - `error_code: BetaCodeExecutionToolResultErrorCode` + - `defer_loading: optional boolean or null` - - `"invalid_tool_input"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"unavailable"` + - `enabled: optional boolean or null` - - `"too_many_requests"` + 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. - - `"execution_time_exceeded"` + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` - - `type: "code_execution_tool_result_error"` + `javascript_exec`'s config overrides. - - `"code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` -### Beta Code Execution Tool Result Error Code + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `enabled: optional boolean or null` - - `"invalid_tool_input"` + 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. - - `"unavailable"` + - `key: optional BetaBrowserKeyConfig or null` - - `"too_many_requests"` + `key`'s config overrides. - - `"execution_time_exceeded"` + - `defer_loading: optional boolean or null` -### Beta Code Execution Tool Result Error Param + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaCodeExecutionToolResultErrorParam object { error_code, type }` + - `enabled: optional boolean or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + 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. - - `"invalid_tool_input"` + - `left_click: optional BetaBrowserLeftClickConfig or null` - - `"unavailable"` + `left_click`'s config overrides. - - `"too_many_requests"` + - `defer_loading: optional boolean or null` - - `"execution_time_exceeded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_tool_result_error"` + - `enabled: optional boolean or null` - - `"code_execution_tool_result_error"` + 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. -### Beta Compact 20260112 Edit + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` -- `BetaCompact20260112Edit object { type, instructions, pause_after_compaction, trigger }` + `left_click_drag`'s config overrides. - Automatically compact older context when reaching the configured trigger threshold. + - `defer_loading: optional boolean or null` - - `type: "compact_20260112"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"compact_20260112"` + - `enabled: optional boolean or null` - - `instructions: optional string or null` + 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. - Additional instructions for summarization. + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` - - `pause_after_compaction: optional boolean` + `left_mouse_down`'s config overrides. - Whether to pause after compaction and return the compaction block to the user. + - `defer_loading: optional boolean or null` - - `trigger: optional BetaInputTokensTrigger or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When to trigger compaction. Defaults to 150000 input tokens. + - `enabled: optional boolean or null` - - `type: "input_tokens"` + 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. - - `"input_tokens"` + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` - - `value: number` + `left_mouse_up`'s config overrides. -### Beta Compaction Block + - `defer_loading: optional boolean or null` -- `BetaCompactionBlock object { content, encrypted_content, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - A compaction block returned when autocompact is triggered. + - `enabled: optional boolean or null` - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + 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. - - `content: string or null` + - `list_tabs: optional BetaBrowserListTabsConfig or null` - Summary of compacted content, or null if compaction failed + `list_tabs`'s config overrides. - - `encrypted_content: string or null` + - `defer_loading: optional boolean or null` - Opaque metadata from prior compaction, to be round-tripped verbatim + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "compaction"` + - `enabled: optional boolean or null` - - `"compaction"` + 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. -### Beta Compaction Block Param + - `middle_click: optional BetaBrowserMiddleClickConfig or null` -- `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` + `middle_click`'s config overrides. - A compaction block containing summary of previous context. + - `defer_loading: optional boolean or null` - Users should round-trip these blocks from responses to subsequent requests - to maintain context across compaction boundaries. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When content is None, the block represents a failed compaction. The server - treats these as no-ops. Empty string content is not allowed. + - `enabled: optional boolean or null` - - `type: "compaction"` + 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. - - `"compaction"` + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `mouse_move`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `navigate: optional BetaBrowserNavigateConfig or null` - This may be one the following values: + `navigate`'s config overrides. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"5m"` + - `enabled: optional boolean or null` - - `"1h"` + 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. - - `content: optional string or null` + - `new_tab: optional BetaBrowserNewTabConfig or null` - Summary of previously compacted content, or null if compaction failed + `new_tab`'s config overrides. - - `encrypted_content: optional string or null` + - `defer_loading: optional boolean or null` - Opaque metadata from prior compaction, to be round-tripped verbatim + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Compaction Content Block Delta + - `enabled: optional boolean or null` -- `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + 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. - - `content: string or null` + - `read_console: optional BetaBrowserReadConsoleConfig or null` - - `encrypted_content: string or null` + `read_console`'s config overrides. - Opaque metadata from prior compaction, to be round-tripped verbatim + - `defer_loading: optional boolean or null` - - `type: "compaction_delta"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"compaction_delta"` + - `enabled: optional boolean or null` -### Beta Compaction Iteration Usage + 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. -- `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `read_network: optional BetaBrowserReadNetworkConfig or null` - Token usage for a compaction iteration. + `read_network`'s config overrides. - - `cache_creation: BetaCacheCreation or null` + - `defer_loading: optional boolean or null` - Breakdown of cached tokens by TTL + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ephemeral_1h_input_tokens: number` + - `enabled: optional boolean or null` - The number of input tokens used to create the 1 hour cache entry. + 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. - - `ephemeral_5m_input_tokens: number` + - `read_page: optional BetaBrowserReadPageConfig or null` - The number of input tokens used to create the 5 minute cache entry. + `read_page`'s config overrides. - - `cache_creation_input_tokens: number` + - `defer_loading: optional boolean or null` - The number of input tokens used to create the cache entry. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_read_input_tokens: number` + - `enabled: optional boolean or null` - The number of input tokens read from the cache. + 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. - - `input_tokens: number` + - `right_click: optional BetaBrowserRightClickConfig or null` - The number of input tokens which were used. + `right_click`'s config overrides. - - `output_tokens: number` + - `defer_loading: optional boolean or null` - The number of output tokens which were used. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "compaction"` + - `enabled: optional boolean or null` - Usage for a compaction iteration + 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. - - `"compaction"` + - `screenshot: optional BetaBrowserScreenshotConfig or null` -### Beta Container + `screenshot`'s config overrides. -- `BetaContainer object { id, expires_at, skills }` + - `defer_loading: optional boolean or null` - Information about the container used in the request (for the code execution tool) + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `id: string` + - `enabled: optional boolean or null` - Identifier for the container used in this request + 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. - - `expires_at: string` + - `scroll: optional BetaBrowserScrollConfig or null` - The time at which the container will expire. + `scroll`'s config overrides. - - `skills: array of BetaSkill or null` + - `defer_loading: optional boolean or null` - Skills loaded in the container + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `skill_id: string` + - `enabled: optional boolean or null` - Skill ID + 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. - - `type: "anthropic" or "custom"` + - `scroll_to: optional BetaBrowserScrollToConfig or null` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + `scroll_to`'s config overrides. - - `"anthropic"` + - `defer_loading: optional boolean or null` - - `"custom"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `version: string` + - `enabled: optional boolean or null` - Skill version or 'latest' for most recent version + 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. -### Beta Container Params + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` -- `BetaContainerParams object { id, skills }` + `switch_tab`'s config overrides. - Container parameters with skills to be loaded. + - `defer_loading: optional boolean or null` - - `id: optional string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Container id + - `enabled: optional boolean or null` - - `skills: optional array of BetaSkillParams or null` + 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. - List of skills to load in the container + - `triple_click: optional BetaBrowserTripleClickConfig or null` - - `skill_id: string` + `triple_click`'s config overrides. - Skill ID + - `defer_loading: optional boolean or null` - - `type: "anthropic" or "custom"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + - `enabled: optional boolean or null` - - `"anthropic"` + 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. - - `"custom"` + - `type: optional BetaBrowserTypeConfig or null` - - `version: optional string` + `type`'s config overrides. - Skill version or 'latest' for most recent version + - `defer_loading: optional boolean or null` -### Beta Container Upload Block + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaContainerUploadBlock object { file_id, type }` + - `enabled: optional boolean or null` - Response model for a file uploaded to the container. + 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. - - `file_id: string` + - `wait: optional BetaBrowserWaitConfig or null` - - `type: "container_upload"` + `wait`'s config overrides. - - `"container_upload"` + - `defer_loading: optional boolean or null` -### Beta Container Upload Block Param + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaContainerUploadBlockParam object { file_id, type, cache_control }` + - `enabled: optional boolean or null` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + 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. - - `file_id: string` + - `zoom: optional BetaBrowserZoomConfig or null` - - `type: "container_upload"` + `zoom`'s config overrides. - - `"container_upload"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` +### Beta Browser Triple Click Config - - `ttl: optional "5m" or "1h"` +- `BetaBrowserTripleClickConfig object { defer_loading, enabled }` - The time-to-live for the cache control breakpoint. + `triple_click`'s config overrides. - This may be one the following values: + - `defer_loading: optional boolean or null` - - `5m`: 5 minutes - - `1h`: 1 hour + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `enabled: optional boolean or null` - - `"5m"` + 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. - - `"1h"` +### Beta Browser Type Config -### Beta Content Block +- `BetaBrowserTypeConfig object { defer_loading, enabled }` -- `BetaContentBlock = BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` + `type`'s config overrides. - Response model for a file uploaded to the container. + - `defer_loading: optional boolean or null` - - `BetaTextBlock object { citations, text, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `citations: array of BetaTextCitation or null` + - `enabled: optional boolean or null` - Citations supporting the text block. + 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. - 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`. +### Beta Browser Wait Config - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` +- `BetaBrowserWaitConfig object { defer_loading, enabled }` - - `cited_text: string` + `wait`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_char_index: number` + - `enabled: optional boolean or null` - - `file_id: string or null` + 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. - - `start_char_index: number` +### Beta Browser Zoom Config - - `type: "char_location"` +- `BetaBrowserZoomConfig object { defer_loading, enabled }` - - `"char_location"` + `zoom`'s config overrides. - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `document_index: number` + - `enabled: optional boolean or null` - - `document_title: string or null` + 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. - - `end_page_number: number` +### Beta Cache Control Ephemeral - - `file_id: string or null` +- `BetaCacheControlEphemeral object { type, ttl }` - - `start_page_number: number` + - `type: "ephemeral"` - - `type: "page_location"` + - `"ephemeral"` - - `"page_location"` + - `ttl: optional "5m" or "1h"` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + The time-to-live for the cache control breakpoint. - - `cited_text: string` + This may be one the following values: - The full text of the cited block range, concatenated. + - `5m`: 5 minutes + - `1h`: 1 hour - 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. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `document_index: number` + - `"5m"` - - `document_title: string or null` + - `"1h"` - - `end_block_index: number` +### Beta Cache Creation - Exclusive 0-based end index of the cited block range in the source's `content` array. +- `BetaCacheCreation object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `ephemeral_1h_input_tokens: number` - - `file_id: string or null` + The number of input tokens used to create the 1 hour cache entry. - - `start_block_index: number` + - `ephemeral_5m_input_tokens: number` - 0-based index of the first cited block in the source's `content` array. + The number of input tokens used to create the 5 minute cache entry. - - `type: "content_block_location"` +### Beta Cache Miss Messages Changed - - `"content_block_location"` +- `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `cache_missed_input_tokens: number` - - `cited_text: string` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `encrypted_index: string` + - `type: "messages_changed"` - - `title: string or null` + - `"messages_changed"` - - `type: "web_search_result_location"` +### Beta Cache Miss Model Changed - - `"web_search_result_location"` +- `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` - - `url: string` + - `cache_missed_input_tokens: number` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `cited_text: string` + - `type: "model_changed"` - The full text of the cited block range, concatenated. + - `"model_changed"` - 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. +### Beta Cache Miss Previous Message Not Found - - `end_block_index: number` +- `BetaCacheMissPreviousMessageNotFound object { type }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "previous_message_not_found"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"previous_message_not_found"` - - `search_result_index: number` +### Beta Cache Miss System Changed - 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. +- `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `cache_missed_input_tokens: number` - - `source: string` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `start_block_index: number` + - `type: "system_changed"` - 0-based index of the first cited block in the source's `content` array. + - `"system_changed"` - - `title: string or null` +### Beta Cache Miss Tools Changed - - `type: "search_result_location"` +- `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` - - `"search_result_location"` + - `cache_missed_input_tokens: number` - - `text: string` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `type: "text"` + - `type: "tools_changed"` - - `"text"` + - `"tools_changed"` - - `BetaThinkingBlock object { signature, thinking, type }` +### Beta Cache Miss Unavailable - - `signature: string` +- `BetaCacheMissUnavailable object { type }` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `type: "unavailable"` - 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. + - `"unavailable"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. +### Beta Citation Char Location - - `thinking: string` +- `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - The text of Claude's thinking process for this block. + - `cited_text: string` - - `type: "thinking"` + - `document_index: number` - - `"thinking"` + - `document_title: string or null` - - `BetaRedactedThinkingBlock object { data, type }` + - `end_char_index: number` - - `data: string` + - `file_id: string or null` - 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. + - `start_char_index: number` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `type: "char_location"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `"char_location"` - - `type: "redacted_thinking"` +### Beta Citation Char Location Param - - `"redacted_thinking"` +- `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `cited_text: string` - - `id: string` + - `document_index: number` - - `input: map[unknown]` + - `document_title: string or null` - - `name: string` + - `end_char_index: number` - - `type: "tool_use"` + - `start_char_index: number` - - `"tool_use"` + - `type: "char_location"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"char_location"` - Tool invocation directly from the model. +### Beta Citation Config - - `BetaDirectCaller object { type }` +- `BetaCitationConfig object { enabled }` - Tool invocation directly from the model. + - `enabled: boolean` - - `type: "direct"` +### Beta Citation Content Block Location - - `"direct"` +- `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `BetaServerToolCaller object { tool_id, type }` + - `cited_text: string` - Tool invocation generated by a server-side tool. + The full text of the cited block range, concatenated. - - `tool_id: string` + 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. - - `type: "code_execution_20250825"` + - `document_index: number` - - `"code_execution_20250825"` + - `document_title: string or null` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `end_block_index: number` - - `tool_id: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "code_execution_20260120"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"code_execution_20260120"` + - `file_id: string or null` - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + - `start_block_index: number` - - `id: string` + 0-based index of the first cited block in the source's `content` array. - - `input: map[unknown]` + - `type: "content_block_location"` - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + - `"content_block_location"` - - `"advisor"` +### Beta Citation Content Block Location Param - - `"web_search"` +- `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"web_fetch"` + - `cited_text: string` - - `"code_execution"` + The full text of the cited block range, concatenated. - - `"bash_code_execution"` + 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. - - `"text_editor_code_execution"` + - `document_index: number` - - `"tool_search_tool_regex"` + - `document_title: string or null` - - `"tool_search_tool_bm25"` + - `end_block_index: number` - - `type: "server_tool_use"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"server_tool_use"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `start_block_index: number` - Tool invocation directly from the model. + 0-based index of the first cited block in the source's `content` array. - - `BetaDirectCaller object { type }` + - `type: "content_block_location"` - Tool invocation directly from the model. + - `"content_block_location"` - - `BetaServerToolCaller object { tool_id, type }` +### Beta Citation Page Location - Tool invocation generated by a server-side tool. +- `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `cited_text: string` - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + - `document_index: number` - - `content: BetaWebSearchToolResultBlockContent` + - `document_title: string or null` - - `BetaWebSearchToolResultError object { error_code, type }` + - `end_page_number: number` - - `error_code: BetaWebSearchToolResultErrorCode` + - `file_id: string or null` - - `"invalid_tool_input"` + - `start_page_number: number` - - `"unavailable"` + - `type: "page_location"` - - `"max_uses_exceeded"` + - `"page_location"` - - `"too_many_requests"` +### Beta Citation Page Location Param - - `"query_too_long"` +- `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"request_too_large"` + - `cited_text: string` - - `type: "web_search_tool_result_error"` + - `document_index: number` - - `"web_search_tool_result_error"` + - `document_title: string or null` - - `array of BetaWebSearchResultBlock` + - `end_page_number: number` - - `encrypted_content: string` + - `start_page_number: number` - - `page_age: string or null` + - `type: "page_location"` - - `title: string` + - `"page_location"` - - `type: "web_search_result"` +### Beta Citation Search Result Location - - `"web_search_result"` +- `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `url: string` + - `cited_text: string` - - `tool_use_id: string` + The full text of the cited block range, concatenated. - - `type: "web_search_tool_result"` + 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. - - `"web_search_tool_result"` + - `end_block_index: number` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Tool invocation directly from the model. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `BetaDirectCaller object { type }` + - `search_result_index: number` - Tool invocation directly from the model. + 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. - - `BetaServerToolCaller object { tool_id, type }` + Counted separately from `document_index`; server-side web search results are not included in this count. - Tool invocation generated by a server-side tool. + - `source: string` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `start_block_index: number` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + 0-based index of the first cited block in the source's `content` array. - - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + - `title: string or null` - - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + - `type: "search_result_location"` - - `error_code: BetaWebFetchToolResultErrorCode` + - `"search_result_location"` - - `"invalid_tool_input"` +### Beta Citation Search Result Location Param - - `"url_too_long"` +- `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"url_not_allowed"` + - `cited_text: string` - - `"url_not_in_prior_context"` + The full text of the cited block range, concatenated. - - `"url_not_accessible"` + 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. - - `"unsupported_content_type"` + - `end_block_index: number` - - `"too_many_requests"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"max_uses_exceeded"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"unavailable"` + - `search_result_index: number` - - `type: "web_fetch_tool_result_error"` + 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. - - `"web_fetch_tool_result_error"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + - `source: string` - - `content: BetaDocumentBlock` + - `start_block_index: number` - - `citations: BetaCitationConfig or null` + 0-based index of the first cited block in the source's `content` array. - Citation configuration for the document + - `title: string or null` - - `enabled: boolean` + - `type: "search_result_location"` - - `source: BetaBase64PDFSource or BetaPlainTextSource` + - `"search_result_location"` - - `BetaBase64PDFSource object { data, media_type, type }` +### Beta Citation Web Search Result Location Param - - `data: string` +- `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `media_type: "application/pdf"` + - `cited_text: string` - - `"application/pdf"` + - `encrypted_index: string` - - `type: "base64"` + - `title: string or null` - - `"base64"` + - `type: "web_search_result_location"` - - `BetaPlainTextSource object { data, media_type, type }` + - `"web_search_result_location"` - - `data: string` + - `url: string` - - `media_type: "text/plain"` +### Beta Citations Config Param - - `"text/plain"` +- `BetaCitationsConfigParam object { enabled }` - - `type: "text"` + - `enabled: optional boolean` - - `"text"` +### Beta Citations Delta - - `title: string or null` +- `BetaCitationsDelta object { citation, type }` - The title of the document + - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` - - `type: "document"` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `"document"` + - `cited_text: string` - - `retrieved_at: string or null` + - `document_index: number` - ISO 8601 timestamp when the content was retrieved + - `document_title: string or null` - - `type: "web_fetch_result"` + - `end_char_index: number` - - `"web_fetch_result"` + - `file_id: string or null` - - `url: string` + - `start_char_index: number` - Fetched content URL + - `type: "char_location"` - - `tool_use_id: string` + - `"char_location"` - - `type: "web_fetch_tool_result"` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"web_fetch_tool_result"` + - `cited_text: string` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `document_index: number` - Tool invocation directly from the model. + - `document_title: string or null` - - `BetaDirectCaller object { type }` + - `end_page_number: number` - Tool invocation directly from the model. + - `file_id: string or null` - - `BetaServerToolCaller object { tool_id, type }` + - `start_page_number: number` - Tool invocation generated by a server-side tool. + - `type: "page_location"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"page_location"` - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` + - `cited_text: string` - - `BetaAdvisorToolResultError object { error_code, type }` + The full text of the cited block range, concatenated. - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + 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. - - `"max_uses_exceeded"` + - `document_index: number` - - `"prompt_too_long"` + - `document_title: string or null` - - `"too_many_requests"` + - `end_block_index: number` - - `"overloaded"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"unavailable"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"execution_time_exceeded"` + - `file_id: string or null` - - `"model_not_found"` + - `start_block_index: number` - - `type: "advisor_tool_result_error"` + 0-based index of the first cited block in the source's `content` array. - - `"advisor_tool_result_error"` + - `type: "content_block_location"` - - `BetaAdvisorResultBlock object { stop_reason, text, type }` + - `"content_block_location"` - - `stop_reason: string or null` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - 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. + - `cited_text: string` - - `text: string` + - `encrypted_index: string` - - `type: "advisor_result"` + - `title: string or null` - - `"advisor_result"` + - `type: "web_search_result_location"` - - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + - `"web_search_result_location"` - - `encrypted_content: string` + - `url: string` - Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `stop_reason: string or null` + - `cited_text: string` - The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + The full text of the cited block range, concatenated. - - `type: "advisor_redacted_result"` + 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. - - `"advisor_redacted_result"` + - `end_block_index: number` - - `tool_use_id: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "advisor_tool_result"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"advisor_tool_result"` + - `search_result_index: number` - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + 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. - - `content: BetaCodeExecutionToolResultBlockContent` + Counted separately from `document_index`; server-side web search results are not included in this count. - Code execution result with encrypted stdout for PFC + web_search results. + - `source: string` - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `start_block_index: number` - - `error_code: BetaCodeExecutionToolResultErrorCode` + 0-based index of the first cited block in the source's `content` array. - - `"invalid_tool_input"` + - `title: string or null` - - `"unavailable"` + - `type: "search_result_location"` - - `"too_many_requests"` + - `"search_result_location"` - - `"execution_time_exceeded"` + - `type: "citations_delta"` - - `type: "code_execution_tool_result_error"` + - `"citations_delta"` - - `"code_execution_tool_result_error"` +### Beta Citations Web Search Result Location - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` +- `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `content: array of BetaCodeExecutionOutputBlock` + - `cited_text: string` - - `file_id: string` + - `encrypted_index: string` - - `type: "code_execution_output"` + - `title: string or null` - - `"code_execution_output"` + - `type: "web_search_result_location"` - - `return_code: number` + - `"web_search_result_location"` - - `stderr: string` + - `url: string` - - `stdout: string` +### Beta Clear Thinking 20251015 Edit - - `type: "code_execution_result"` +- `BetaClearThinking20251015Edit object { type, keep }` - - `"code_execution_result"` + - `type: "clear_thinking_20251015"` - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"clear_thinking_20251015"` - Code execution result with encrypted stdout for PFC + web_search results. + - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"` - - `content: array of BetaCodeExecutionOutputBlock` + Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed. - - `file_id: string` + - `BetaThinkingTurns object { type, value }` - - `type: "code_execution_output"` + - `type: "thinking_turns"` - - `encrypted_stdout: string` + - `"thinking_turns"` - - `return_code: number` + - `value: number` - - `stderr: string` + - `BetaAllThinkingTurns object { type }` - - `type: "encrypted_code_execution_result"` + - `type: "all"` - - `"encrypted_code_execution_result"` + - `"all"` - - `tool_use_id: string` + - `"all"` - - `type: "code_execution_tool_result"` + - `"all"` - - `"code_execution_tool_result"` +### Beta Clear Thinking 20251015 Edit Response - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` +- `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` - - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + - `cleared_input_tokens: number` - - `BetaBashCodeExecutionToolResultError object { error_code, type }` + Number of input tokens cleared by this edit. - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `cleared_thinking_turns: number` - - `"invalid_tool_input"` + Number of thinking turns that were cleared. - - `"unavailable"` + - `type: "clear_thinking_20251015"` - - `"too_many_requests"` + The type of context management edit applied. - - `"execution_time_exceeded"` + - `"clear_thinking_20251015"` - - `"output_file_too_large"` +### Beta Clear Tool Uses 20250919 Edit - - `type: "bash_code_execution_tool_result_error"` +- `BetaClearToolUses20250919Edit object { type, clear_at_least, clear_tool_inputs, 3 more }` - - `"bash_code_execution_tool_result_error"` + - `type: "clear_tool_uses_20250919"` - - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"clear_tool_uses_20250919"` - - `content: array of BetaBashCodeExecutionOutputBlock` + - `clear_at_least: optional BetaInputTokensClearAtLeast or null` - - `file_id: string` + Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed. - - `type: "bash_code_execution_output"` + - `type: "input_tokens"` - - `"bash_code_execution_output"` + - `"input_tokens"` - - `return_code: number` + - `value: number` - - `stderr: string` + - `clear_tool_inputs: optional boolean or array of string or null` - - `stdout: string` + Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) - - `type: "bash_code_execution_result"` + - `boolean` - - `"bash_code_execution_result"` + - `array of string` - - `tool_use_id: string` + - `exclude_tools: optional array of string or null` - - `type: "bash_code_execution_tool_result"` + Tool names whose uses are preserved from clearing - - `"bash_code_execution_tool_result"` + - `keep: optional BetaToolUsesKeep` - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Number of tool uses to retain in the conversation - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + - `type: "tool_uses"` - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"tool_uses"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `value: number` - - `"invalid_tool_input"` + - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger` - - `"unavailable"` + Condition that triggers the context management strategy - - `"too_many_requests"` + - `BetaInputTokensTrigger object { type, value }` - - `"execution_time_exceeded"` + - `type: "input_tokens"` - - `"file_not_found"` + - `"input_tokens"` - - `error_message: string or null` + - `value: number` - - `type: "text_editor_code_execution_tool_result_error"` + - `BetaToolUsesTrigger object { type, value }` - - `"text_editor_code_execution_tool_result_error"` + - `type: "tool_uses"` - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `"tool_uses"` - - `content: string` + - `value: number` - - `file_type: "text" or "image" or "pdf"` +### Beta Clear Tool Uses 20250919 Edit Response - - `"text"` +- `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` - - `"image"` + - `cleared_input_tokens: number` - - `"pdf"` + Number of input tokens cleared by this edit. - - `num_lines: number or null` + - `cleared_tool_uses: number` - - `start_line: number or null` + Number of tool uses that were cleared. - - `total_lines: number or null` + - `type: "clear_tool_uses_20250919"` - - `type: "text_editor_code_execution_view_result"` + The type of context management edit applied. - - `"text_editor_code_execution_view_result"` + - `"clear_tool_uses_20250919"` - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` +### Beta Code Execution Output Block - - `is_file_update: boolean` +- `BetaCodeExecutionOutputBlock object { file_id, type }` - - `type: "text_editor_code_execution_create_result"` + - `file_id: string` - - `"text_editor_code_execution_create_result"` + - `type: "code_execution_output"` - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `"code_execution_output"` - - `lines: array of string or null` +### Beta Code Execution Output Block Param - - `new_lines: number or null` +- `BetaCodeExecutionOutputBlockParam object { file_id, type }` - - `new_start: number or null` + - `file_id: string` - - `old_lines: number or null` + - `type: "code_execution_output"` - - `old_start: number or null` + - `"code_execution_output"` - - `type: "text_editor_code_execution_str_replace_result"` +### Beta Code Execution Result Block - - `"text_editor_code_execution_str_replace_result"` +- `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `tool_use_id: string` + - `content: array of BetaCodeExecutionOutputBlock` - - `type: "text_editor_code_execution_tool_result"` + - `file_id: string` - - `"text_editor_code_execution_tool_result"` + - `type: "code_execution_output"` - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `"code_execution_output"` - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + - `return_code: number` - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `stderr: string` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `stdout: string` - - `"invalid_tool_input"` + - `type: "code_execution_result"` - - `"unavailable"` + - `"code_execution_result"` - - `"too_many_requests"` +### Beta Code Execution Result Block Param - - `"execution_time_exceeded"` +- `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `error_message: string or null` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `type: "tool_search_tool_result_error"` + - `file_id: string` - - `"tool_search_tool_result_error"` + - `type: "code_execution_output"` - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + - `"code_execution_output"` - - `tool_references: array of BetaToolReferenceBlock` + - `return_code: number` - - `tool_name: string` + - `stderr: string` - - `type: "tool_reference"` + - `stdout: string` - - `"tool_reference"` + - `type: "code_execution_result"` - - `type: "tool_search_tool_search_result"` + - `"code_execution_result"` - - `"tool_search_tool_search_result"` +### Beta Code Execution Tool 20250522 - - `tool_use_id: string` +- `BetaCodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - `type: "tool_search_tool_result"` + - `name: "code_execution"` - - `"tool_search_tool_result"` + Name of the tool. - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `id: string` + - `"code_execution"` - - `input: map[unknown]` + - `type: "code_execution_20250522"` - - `name: string` + - `"code_execution_20250522"` - The name of the MCP tool + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `server_name: string` + - `"direct"` - The name of the MCP server + - `"code_execution_20250825"` - - `type: "mcp_tool_use"` + - `"code_execution_20260120"` - - `"mcp_tool_use"` + - `"code_execution_20260521"` - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `content: string or array of BetaTextBlock` + Create a cache control breakpoint at this content block. - - `string` + - `type: "ephemeral"` - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + - `"ephemeral"` - - `citations: array of BetaTextCitation or null` + - `ttl: optional "5m" or "1h"` - Citations supporting the text block. + The time-to-live for the cache control breakpoint. - 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`. + This may be one the following values: - - `text: string` + - `5m`: 5 minutes + - `1h`: 1 hour - - `type: "text"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `is_error: boolean` + - `"5m"` - - `tool_use_id: string` + - `"1h"` - - `type: "mcp_tool_result"` + - `defer_loading: optional boolean` - - `"mcp_tool_result"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `BetaContainerUploadBlock object { file_id, type }` + - `strict: optional boolean` - Response model for a file uploaded to the container. + When true, guarantees schema validation on tool names and inputs - - `file_id: string` +### Beta Code Execution Tool 20250825 - - `type: "container_upload"` +- `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - - `"container_upload"` + - `name: "code_execution"` - - `BetaCompactionBlock object { content, encrypted_content, type }` + Name of the tool. - A compaction block returned when autocompact is triggered. + This is how the tool will be called by the model and in `tool_use` blocks. - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + - `"code_execution"` - - `content: string or null` + - `type: "code_execution_20250825"` - Summary of compacted content, or null if compaction failed + - `"code_execution_20250825"` - - `encrypted_content: string or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `"direct"` - - `type: "compaction"` + - `"code_execution_20250825"` - - `"compaction"` + - `"code_execution_20260120"` - - `BetaFallbackBlock object { from, to, trigger, type }` + - `"code_execution_20260521"` - Marks the point in `content` where one model's output gives way to the next. + - `cache_control: optional BetaCacheControlEphemeral or null` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + Create a cache control breakpoint at this content block. - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `type: "ephemeral"` - - `from: BetaFallbackInfo` + - `"ephemeral"` - 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. + - `ttl: optional "5m" or "1h"` - - `model: Model` + The time-to-live for the cache control breakpoint. - The model that will complete your prompt. + This may be one the following values: - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `5m`: 5 minutes + - `1h`: 1 hour - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - The model that will complete your prompt. + - `"5m"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"1h"` - - `"claude-sonnet-5"` + - `defer_loading: optional boolean` - High-performance model for coding and agents + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"claude-fable-5"` + - `strict: optional boolean` - Next generation of intelligence for the hardest knowledge work and coding problems + When true, guarantees schema validation on tool names and inputs - - `"claude-mythos-5"` +### Beta Code Execution Tool 20260120 - Most capable model for cybersecurity and biology research +- `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - `"claude-opus-5"` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - Powerful intelligence for long-running agents and coding + - `name: "code_execution"` - - `"claude-opus-4-8"` + Name of the tool. - Powerful intelligence for long-running agents and coding + This is how the tool will be called by the model and in `tool_use` blocks. - - `"claude-opus-4-7"` + - `"code_execution"` - Powerful intelligence for long-running agents and coding + - `type: "code_execution_20260120"` - - `"claude-mythos-preview"` + - `"code_execution_20260120"` - New class of intelligence, strongest in coding and cybersecurity + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"claude-opus-4-6"` + - `"direct"` - Powerful intelligence for long-running agents and coding + - `"code_execution_20250825"` - - `"claude-sonnet-4-6"` + - `"code_execution_20260120"` - Best combination of speed and intelligence + - `"code_execution_20260521"` - - `"claude-haiku-4-5"` + - `cache_control: optional BetaCacheControlEphemeral or null` - Fastest model with near-frontier intelligence + Create a cache control breakpoint at this content block. - - `"claude-haiku-4-5-20251001"` + - `type: "ephemeral"` - Fastest model with near-frontier intelligence + - `"ephemeral"` - - `"claude-opus-4-5"` + - `ttl: optional "5m" or "1h"` - Powerful intelligence for long-running agents and coding + The time-to-live for the cache control breakpoint. - - `"claude-opus-4-5-20251101"` + This may be one the following values: - Powerful intelligence for long-running agents and coding + - `5m`: 5 minutes + - `1h`: 1 hour - - `"claude-sonnet-4-5"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - High-performance model for agents and coding + - `"5m"` - - `"claude-sonnet-4-5-20250929"` + - `"1h"` - High-performance model for agents and coding + - `defer_loading: optional boolean` - - `string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `to: BetaFallbackInfo` + - `strict: optional boolean` - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + When true, guarantees schema validation on tool names and inputs - - `trigger: BetaFallbackRefusalTrigger` +### Beta Code Execution Tool 20260521 - What caused the `from` model to hand over at this hop. +- `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + Code execution tool with REPL state persistence. - The policy category that triggered a refusal. + - `name: "code_execution"` - - `"cyber"` + Name of the tool. - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + This is how the tool will be called by the model and in `tool_use` blocks. - - `"bio"` + - `"code_execution"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `type: "code_execution_20260521"` - - `"frontier_llm"` + - `"code_execution_20260521"` - 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. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"reasoning_extraction"` + - `"direct"` - 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). + - `"code_execution_20250825"` - - `"general_harms"` + - `"code_execution_20260120"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `"code_execution_20260521"` - - `type: "refusal"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"refusal"` + Create a cache control breakpoint at this content block. - - `type: "fallback"` + - `type: "ephemeral"` - - `"fallback"` + - `"ephemeral"` -### Beta Content Block Param + - `ttl: optional "5m" or "1h"` -- `BetaContentBlockParam = BetaTextBlockParam or BetaImageBlockParam or BetaRequestDocumentBlock or 21 more` + The time-to-live for the cache control breakpoint. - Regular text content. + This may be one the following values: - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `text: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `type: "text"` + - `"5m"` - - `"text"` + - `"1h"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean` - Create a cache control breakpoint at this content block. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "ephemeral"` + - `strict: optional boolean` - - `"ephemeral"` + When true, guarantees schema validation on tool names and inputs - - `ttl: optional "5m" or "1h"` +### Beta Code Execution Tool Result Block - The time-to-live for the cache control breakpoint. +- `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` - This may be one the following values: + - `content: BetaCodeExecutionToolResultBlockContent` - - `5m`: 5 minutes - - `1h`: 1 hour + Code execution result with encrypted stdout for PFC + web_search results. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `"5m"` + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `"1h"` + - `"invalid_tool_input"` - - `citations: optional array of BetaTextCitationParam or null` + - `"unavailable"` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"too_many_requests"` - - `cited_text: string` + - `"execution_time_exceeded"` - - `document_index: number` + - `type: "code_execution_tool_result_error"` - - `document_title: string or null` + - `"code_execution_tool_result_error"` - - `end_char_index: number` + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `start_char_index: number` + - `content: array of BetaCodeExecutionOutputBlock` - - `type: "char_location"` + - `file_id: string` - - `"char_location"` + - `type: "code_execution_output"` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"code_execution_output"` - - `cited_text: string` + - `return_code: number` - - `document_index: number` + - `stderr: string` - - `document_title: string or null` + - `stdout: string` - - `end_page_number: number` + - `type: "code_execution_result"` - - `start_page_number: number` + - `"code_execution_result"` - - `type: "page_location"` + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `"page_location"` + Code execution result with encrypted stdout for PFC + web_search results. - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `content: array of BetaCodeExecutionOutputBlock` - - `cited_text: string` + - `file_id: string` - The full text of the cited block range, concatenated. + - `type: "code_execution_output"` - 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. + - `encrypted_stdout: string` - - `document_index: number` + - `return_code: number` - - `document_title: string or null` + - `stderr: string` - - `end_block_index: number` + - `type: "encrypted_code_execution_result"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"encrypted_code_execution_result"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `tool_use_id: string` - - `start_block_index: number` + - `type: "code_execution_tool_result"` - 0-based index of the first cited block in the source's `content` array. + - `"code_execution_tool_result"` - - `type: "content_block_location"` +### Beta Code Execution Tool Result Block Content - - `"content_block_location"` +- `BetaCodeExecutionToolResultBlockContent = BetaCodeExecutionToolResultError or BetaCodeExecutionResultBlock or BetaEncryptedCodeExecutionResultBlock` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + Code execution result with encrypted stdout for PFC + web_search results. - - `cited_text: string` + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `encrypted_index: string` + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `title: string or null` + - `"invalid_tool_input"` - - `type: "web_search_result_location"` + - `"unavailable"` - - `"web_search_result_location"` + - `"too_many_requests"` - - `url: string` + - `"execution_time_exceeded"` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "code_execution_tool_result_error"` - - `cited_text: string` + - `"code_execution_tool_result_error"` - The full text of the cited block range, concatenated. + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - 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. + - `content: array of BetaCodeExecutionOutputBlock` - - `end_block_index: number` + - `file_id: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "code_execution_output"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"code_execution_output"` - - `search_result_index: number` + - `return_code: number` - 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. + - `stderr: string` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `stdout: string` - - `source: string` + - `type: "code_execution_result"` - - `start_block_index: number` + - `"code_execution_result"` - 0-based index of the first cited block in the source's `content` array. + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `title: string or null` + Code execution result with encrypted stdout for PFC + web_search results. - - `type: "search_result_location"` + - `content: array of BetaCodeExecutionOutputBlock` - - `"search_result_location"` + - `file_id: string` - - `BetaImageBlockParam object { source, type, cache_control }` + - `type: "code_execution_output"` - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `encrypted_stdout: string` - - `BetaBase64ImageSource object { data, media_type, type }` + - `return_code: number` - - `data: string` + - `stderr: string` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `type: "encrypted_code_execution_result"` - - `"image/jpeg"` + - `"encrypted_code_execution_result"` - - `"image/png"` +### Beta Code Execution Tool Result Block Param - - `"image/gif"` +- `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `"image/webp"` + - `content: BetaCodeExecutionToolResultBlockParamContent` - - `type: "base64"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"base64"` + - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` - - `BetaURLImageSource object { type, url }` + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `type: "url"` + - `"invalid_tool_input"` - - `"url"` + - `"unavailable"` - - `url: string` + - `"too_many_requests"` - - `BetaFileImageSource object { file_id, type }` + - `"execution_time_exceeded"` - - `file_id: string` + - `type: "code_execution_tool_result_error"` - - `type: "file"` + - `"code_execution_tool_result_error"` - - `"file"` + - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `type: "image"` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `"image"` + - `file_id: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "code_execution_output"` - Create a cache control breakpoint at this content block. + - `"code_execution_output"` - - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + - `return_code: number` - - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` + - `stderr: string` - - `BetaBase64PDFSource object { data, media_type, type }` + - `stdout: string` - - `data: string` + - `type: "code_execution_result"` - - `media_type: "application/pdf"` + - `"code_execution_result"` - - `"application/pdf"` + - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `type: "base64"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"base64"` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `BetaPlainTextSource object { data, media_type, type }` + - `file_id: string` - - `data: string` + - `type: "code_execution_output"` - - `media_type: "text/plain"` + - `encrypted_stdout: string` - - `"text/plain"` + - `return_code: number` - - `type: "text"` + - `stderr: string` - - `"text"` + - `type: "encrypted_code_execution_result"` - - `BetaContentBlockSource object { content, type }` + - `"encrypted_code_execution_result"` - - `content: string or array of BetaContentBlockSourceContent` + - `tool_use_id: string` - - `string` + - `type: "code_execution_tool_result"` - - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + - `"code_execution_tool_result"` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaImageBlockParam object { source, type, cache_control }` + Create a cache control breakpoint at this content block. - - `type: "content"` + - `type: "ephemeral"` - - `"content"` + - `"ephemeral"` - - `BetaURLPDFSource object { type, url }` + - `ttl: optional "5m" or "1h"` - - `type: "url"` + The time-to-live for the cache control breakpoint. - - `"url"` + This may be one the following values: - - `url: string` + - `5m`: 5 minutes + - `1h`: 1 hour - - `BetaFileDocumentSource object { file_id, type }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `file_id: string` + - `"5m"` - - `type: "file"` + - `"1h"` - - `"file"` +### Beta Code Execution Tool Result Block Param Content - - `type: "document"` +- `BetaCodeExecutionToolResultBlockParamContent = BetaCodeExecutionToolResultErrorParam or BetaCodeExecutionResultBlockParam or BetaEncryptedCodeExecutionResultBlockParam` - - `"document"` + Code execution result with encrypted stdout for PFC + web_search results. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` - Create a cache control breakpoint at this content block. + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `citations: optional BetaCitationsConfigParam or null` + - `"invalid_tool_input"` - - `enabled: optional boolean` + - `"unavailable"` - - `context: optional string or null` + - `"too_many_requests"` - - `title: optional string or null` + - `"execution_time_exceeded"` - - `BetaSearchResultBlockParam object { content, source, title, 3 more }` + - `type: "code_execution_tool_result_error"` - - `content: array of BetaTextBlockParam` + - `"code_execution_tool_result_error"` - - `text: string` + - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `type: "text"` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `file_id: string` - Create a cache control breakpoint at this content block. + - `type: "code_execution_output"` - - `citations: optional array of BetaTextCitationParam or null` + - `"code_execution_output"` - - `source: string` + - `return_code: number` - - `title: string` + - `stderr: string` - - `type: "search_result"` + - `stdout: string` - - `"search_result"` + - `type: "code_execution_result"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"code_execution_result"` - Create a cache control breakpoint at this content block. + - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `citations: optional BetaCitationsConfigParam` + Code execution result with encrypted stdout for PFC + web_search results. - - `BetaThinkingBlockParam object { signature, thinking, type }` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `signature: string` + - `file_id: string` - 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. + - `type: "code_execution_output"` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `encrypted_stdout: string` - - `thinking: string` + - `return_code: number` - The `thinking` text of this block as returned by the API. + - `stderr: string` - - `type: "thinking"` + - `type: "encrypted_code_execution_result"` - - `"thinking"` + - `"encrypted_code_execution_result"` - - `BetaRedactedThinkingBlockParam object { data, type }` +### Beta Code Execution Tool Result Error - - `data: string` +- `BetaCodeExecutionToolResultError object { error_code, type }` - 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. + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `type: "redacted_thinking"` + - `"invalid_tool_input"` - - `"redacted_thinking"` + - `"unavailable"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `"too_many_requests"` - - `id: string` + - `"execution_time_exceeded"` - - `input: map[unknown]` + - `type: "code_execution_tool_result_error"` - - `name: string` + - `"code_execution_tool_result_error"` - - `type: "tool_use"` +### Beta Code Execution Tool Result Error Code - - `"tool_use"` +- `BetaCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"invalid_tool_input"` - Create a cache control breakpoint at this content block. + - `"unavailable"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"too_many_requests"` - Tool invocation directly from the model. + - `"execution_time_exceeded"` - - `BetaDirectCaller object { type }` +### Beta Code Execution Tool Result Error Param - Tool invocation directly from the model. +- `BetaCodeExecutionToolResultErrorParam object { error_code, type }` - - `type: "direct"` + - `error_code: BetaCodeExecutionToolResultErrorCode` - - `"direct"` + - `"invalid_tool_input"` - - `BetaServerToolCaller object { tool_id, type }` + - `"unavailable"` - Tool invocation generated by a server-side tool. + - `"too_many_requests"` - - `tool_id: string` + - `"execution_time_exceeded"` - - `type: "code_execution_20250825"` + - `type: "code_execution_tool_result_error"` - - `"code_execution_20250825"` + - `"code_execution_tool_result_error"` - - `BetaServerToolCaller20260120 object { tool_id, type }` +### Beta Compact 20260112 Edit - - `tool_id: string` +- `BetaCompact20260112Edit object { type, instructions, pause_after_compaction, trigger }` - - `type: "code_execution_20260120"` + Automatically compact older context when reaching the configured trigger threshold. - - `"code_execution_20260120"` + - `type: "compact_20260112"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `"compact_20260112"` - - `tool_use_id: string` + - `instructions: optional string or null` - - `type: "tool_result"` + Additional instructions for summarization. - - `"tool_result"` + - `pause_after_compaction: optional boolean` - - `cache_control: optional BetaCacheControlEphemeral or null` + Whether to pause after compaction and return the compaction block to the user. - Create a cache control breakpoint at this content block. + - `trigger: optional BetaInputTokensTrigger or null` - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + When to trigger compaction. Defaults to 150000 input tokens. - - `string` + - `type: "input_tokens"` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `"input_tokens"` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `value: number` - - `BetaImageBlockParam object { source, type, cache_control }` +### Beta Compaction Block - - `BetaSearchResultBlockParam object { content, source, title, 3 more }` +- `BetaCompactionBlock object { content, encrypted_content, type }` - - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + A compaction block returned when autocompact is triggered. - - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. - Tool reference block that can be included in tool_result content. + - `content: string or null` - - `tool_name: string` + Summary of compacted content, or null if compaction failed - - `type: "tool_reference"` + - `encrypted_content: string or null` - - `"tool_reference"` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "compaction"` - Create a cache control breakpoint at this content block. + - `"compaction"` - - `is_error: optional boolean` +### Beta Compaction Block Param - - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` +- `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` - - `id: string` + A compaction block containing summary of previous context. - - `input: map[unknown]` + Users should round-trip these blocks from responses to subsequent requests + to maintain context across compaction boundaries. - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + When content is None, the block represents a failed compaction. The server + treats these as no-ops. Empty string content is not allowed. - - `"advisor"` + - `type: "compaction"` - - `"web_search"` + - `"compaction"` - - `"web_fetch"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"code_execution"` + Create a cache control breakpoint at this content block. - - `"bash_code_execution"` + - `type: "ephemeral"` - - `"text_editor_code_execution"` + - `"ephemeral"` - - `"tool_search_tool_regex"` + - `ttl: optional "5m" or "1h"` - - `"tool_search_tool_bm25"` + The time-to-live for the cache control breakpoint. - - `type: "server_tool_use"` + This may be one the following values: - - `"server_tool_use"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `cache_control: optional BetaCacheControlEphemeral or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Create a cache control breakpoint at this content block. + - `"5m"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"1h"` - Tool invocation directly from the model. + - `content: optional string or null` - - `BetaDirectCaller object { type }` + Summary of previously compacted content, or null if compaction failed - Tool invocation directly from the model. + - `encrypted_content: optional string or null` - - `BetaServerToolCaller object { tool_id, type }` + Opaque metadata from prior compaction, to be round-tripped verbatim - Tool invocation generated by a server-side tool. +### Beta Compaction Content Block Delta - - `BetaServerToolCaller20260120 object { tool_id, type }` +- `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` - - `BetaWebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `content: string or null` - - `content: BetaWebSearchToolResultBlockParamContent` + - `encrypted_content: string or null` - - `ResultBlock = array of BetaWebSearchResultBlockParam` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `encrypted_content: string` + - `type: "compaction_delta"` - - `title: string` + - `"compaction_delta"` - - `type: "web_search_result"` +### Beta Compaction Iteration Usage - - `"web_search_result"` +- `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` - - `url: string` + Token usage for a compaction iteration. - - `page_age: optional string or null` + - `cache_creation: BetaCacheCreation or null` - - `BetaWebSearchToolRequestError object { error_code, type }` + Breakdown of cached tokens by TTL - - `error_code: BetaWebSearchToolResultErrorCode` + - `ephemeral_1h_input_tokens: number` - - `"invalid_tool_input"` + The number of input tokens used to create the 1 hour cache entry. - - `"unavailable"` + - `ephemeral_5m_input_tokens: number` - - `"max_uses_exceeded"` + The number of input tokens used to create the 5 minute cache entry. - - `"too_many_requests"` + - `cache_creation_input_tokens: number` - - `"query_too_long"` + The number of input tokens used to create the cache entry. - - `"request_too_large"` + - `cache_read_input_tokens: number` - - `type: "web_search_tool_result_error"` + The number of input tokens read from the cache. - - `"web_search_tool_result_error"` + - `input_tokens: number` - - `tool_use_id: string` + The number of input tokens which were used. - - `type: "web_search_tool_result"` + - `output_tokens: number` - - `"web_search_tool_result"` + The number of output tokens which were used. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "compaction"` - Create a cache control breakpoint at this content block. + Usage for a compaction iteration - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"compaction"` - Tool invocation directly from the model. +### Beta Computer Cursor Position Config - - `BetaDirectCaller object { type }` +- `BetaComputerCursorPositionConfig object { defer_loading, enabled }` - Tool invocation directly from the model. + `cursor_position`'s config overrides. - - `BetaServerToolCaller object { tool_id, type }` + - `defer_loading: optional boolean or null` - Tool invocation generated by a server-side tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `enabled: optional boolean or null` - - `BetaWebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + 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. - - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam` +### Beta Computer Double Click Config - - `BetaWebFetchToolResultErrorBlockParam object { error_code, type }` +- `BetaComputerDoubleClickConfig object { defer_loading, enabled }` - - `error_code: BetaWebFetchToolResultErrorCode` + `double_click`'s config overrides. - - `"invalid_tool_input"` + - `defer_loading: optional boolean or null` - - `"url_too_long"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"url_not_allowed"` + - `enabled: optional boolean or null` - - `"url_not_in_prior_context"` + 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. - - `"url_not_accessible"` +### Beta Computer Hold Key Config - - `"unsupported_content_type"` +- `BetaComputerHoldKeyConfig object { defer_loading, enabled }` - - `"too_many_requests"` + `hold_key`'s config overrides. - - `"max_uses_exceeded"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "web_fetch_tool_result_error"` + - `enabled: optional boolean or null` - - `"web_fetch_tool_result_error"` + 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. - - `BetaWebFetchBlockParam object { content, type, url, retrieved_at }` +### Beta Computer Key Config - - `content: BetaRequestDocumentBlock` +- `BetaComputerKeyConfig object { defer_loading, enabled }` - - `type: "web_fetch_result"` + `key`'s config overrides. - - `"web_fetch_result"` + - `defer_loading: optional boolean or null` - - `url: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Fetched content URL + - `enabled: optional boolean or null` - - `retrieved_at: optional string or null` + 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. - ISO 8601 timestamp when the content was retrieved +### Beta Computer Left Click Config - - `tool_use_id: string` +- `BetaComputerLeftClickConfig object { defer_loading, enabled }` - - `type: "web_fetch_tool_result"` + `left_click`'s config overrides. - - `"web_fetch_tool_result"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + 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. - Tool invocation directly from the model. +### Beta Computer Left Click Drag Config - - `BetaDirectCaller object { type }` +- `BetaComputerLeftClickDragConfig object { defer_loading, enabled }` - Tool invocation directly from the model. + `left_click_drag`'s config overrides. - - `BetaServerToolCaller object { tool_id, type }` + - `defer_loading: optional boolean or null` - Tool invocation generated by a server-side tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `enabled: optional boolean or null` - - `BetaAdvisorToolResultBlockParam object { content, tool_use_id, type, cache_control }` + 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. - - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam` +### Beta Computer Left Mouse Down Config - - `BetaAdvisorToolResultErrorParam object { error_code, type }` +- `BetaComputerLeftMouseDownConfig object { defer_loading, enabled }` - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + `left_mouse_down`'s config overrides. - - `"max_uses_exceeded"` + - `defer_loading: optional boolean or null` - - `"prompt_too_long"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"overloaded"` + 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. - - `"unavailable"` +### Beta Computer Left Mouse Up Config - - `"execution_time_exceeded"` +- `BetaComputerLeftMouseUpConfig object { defer_loading, enabled }` - - `"model_not_found"` + `left_mouse_up`'s config overrides. - - `type: "advisor_tool_result_error"` + - `defer_loading: optional boolean or null` - - `"advisor_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaAdvisorResultBlockParam object { text, type, stop_reason }` + - `enabled: optional boolean or null` - - `text: string` + 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. - - `type: "advisor_result"` +### Beta Computer Middle Click Config - - `"advisor_result"` +- `BetaComputerMiddleClickConfig object { defer_loading, enabled }` - - `stop_reason: optional string or null` + `middle_click`'s config overrides. - - `BetaAdvisorRedactedResultBlockParam object { encrypted_content, type, stop_reason }` + - `defer_loading: optional boolean or null` - - `encrypted_content: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Opaque blob produced by a prior response; must be round-tripped verbatim. + - `enabled: optional boolean or null` - - `type: "advisor_redacted_result"` + 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. - - `"advisor_redacted_result"` +### Beta Computer Mouse Move Config - - `stop_reason: optional string or null` +- `BetaComputerMouseMoveConfig object { defer_loading, enabled }` - - `tool_use_id: string` + `mouse_move`'s config overrides. - - `type: "advisor_tool_result"` + - `defer_loading: optional boolean or null` - - `"advisor_tool_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` +### Beta Computer Right Click Config - - `content: BetaCodeExecutionToolResultBlockParamContent` +- `BetaComputerRightClickConfig object { defer_loading, enabled }` - Code execution result with encrypted stdout for PFC + web_search results. + `right_click`'s config overrides. - - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` + - `defer_loading: optional boolean or null` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` +### Beta Computer Screenshot Config - - `"execution_time_exceeded"` +- `BetaComputerScreenshotConfig object { defer_loading, enabled }` - - `type: "code_execution_tool_result_error"` + `screenshot`'s config overrides. - - `"code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BetaCodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` +### Beta Computer Scroll Config - - `"code_execution_output"` +- `BetaComputerScrollConfig object { defer_loading, enabled }` - - `return_code: number` + `scroll`'s config overrides. - - `stderr: string` + - `defer_loading: optional boolean or null` - - `stdout: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_result"` + - `enabled: optional boolean or null` - - `"code_execution_result"` + 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. - - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` +### Beta Computer Toolset 20260801 - Code execution result with encrypted stdout for PFC + web_search results. +- `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `content: array of BetaCodeExecutionOutputBlockParam` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - - `file_id: string` + - `type: "computer_toolset_20260801"` - - `type: "code_execution_output"` + - `"computer_toolset_20260801"` - - `encrypted_stdout: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `return_code: number` + - `"direct"` - - `stderr: string` + - `"code_execution_20250825"` - - `type: "encrypted_code_execution_result"` + - `"code_execution_20260120"` - - `"encrypted_code_execution_result"` + - `"code_execution_20260521"` - - `tool_use_id: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "code_execution_tool_result"` + Create a cache control breakpoint at this content block. - - `"code_execution_tool_result"` + - `type: "ephemeral"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"ephemeral"` - Create a cache control breakpoint at this content block. + - `ttl: optional "5m" or "1h"` - - `BetaBashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + The time-to-live for the cache control breakpoint. - - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam` + This may be one the following values: - - `BetaBashCodeExecutionToolResultErrorParam object { error_code, type }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"invalid_tool_input"` + - `"5m"` - - `"unavailable"` + - `"1h"` - - `"too_many_requests"` + - `configs: optional BetaComputerToolsetConfigs or null` - - `"execution_time_exceeded"` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `"output_file_too_large"` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - - `type: "bash_code_execution_tool_result_error"` + `cursor_position`'s config overrides. - - `"bash_code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `BetaBashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BetaBashCodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "bash_code_execution_output"` + - `double_click: optional BetaComputerDoubleClickConfig or null` - - `"bash_code_execution_output"` + `double_click`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stdout: string` + - `enabled: optional boolean or null` - - `type: "bash_code_execution_result"` + 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. - - `"bash_code_execution_result"` + - `hold_key: optional BetaComputerHoldKeyConfig or null` - - `tool_use_id: string` + `hold_key`'s config overrides. - - `type: "bash_code_execution_tool_result"` + - `defer_loading: optional boolean or null` - - `"bash_code_execution_tool_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `key: optional BetaComputerKeyConfig or null` - - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` + `key`'s config overrides. - - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `defer_loading: optional boolean or null` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `left_click: optional BetaComputerLeftClickConfig or null` - - `"execution_time_exceeded"` + `left_click`'s config overrides. - - `"file_not_found"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_code_execution_tool_result_error"` + - `enabled: optional boolean or null` - - `error_message: optional string or null` + 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. - - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` - - `content: string` + `left_click_drag`'s config overrides. - - `file_type: "text" or "image" or "pdf"` + - `defer_loading: optional boolean or null` - - `"text"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"image"` + - `enabled: optional boolean or null` - - `"pdf"` + 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. - - `type: "text_editor_code_execution_view_result"` + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` - - `"text_editor_code_execution_view_result"` + `left_mouse_down`'s config overrides. - - `num_lines: optional number or null` + - `defer_loading: optional boolean or null` - - `start_line: optional number or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `total_lines: optional number or null` + - `enabled: optional boolean or null` - - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + 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. - - `is_file_update: boolean` + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` - - `type: "text_editor_code_execution_create_result"` + `left_mouse_up`'s config overrides. - - `"text_editor_code_execution_create_result"` + - `defer_loading: optional boolean or null` - - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "text_editor_code_execution_str_replace_result"` + - `enabled: optional boolean or null` - - `"text_editor_code_execution_str_replace_result"` + 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. - - `lines: optional array of string or null` + - `middle_click: optional BetaComputerMiddleClickConfig or null` - - `new_lines: optional number or null` + `middle_click`'s config overrides. - - `new_start: optional number or null` + - `defer_loading: optional boolean or null` - - `old_lines: optional number or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `old_start: optional number or null` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "text_editor_code_execution_tool_result"` + - `mouse_move: optional BetaComputerMouseMoveConfig or null` - - `"text_editor_code_execution_tool_result"` + `mouse_move`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `enabled: optional boolean or null` - - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` + 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. - - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `right_click: optional BetaComputerRightClickConfig or null` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + `right_click`'s config overrides. - - `"invalid_tool_input"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"execution_time_exceeded"` + 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. - - `type: "tool_search_tool_result_error"` + - `screenshot: optional BetaComputerScreenshotConfig or null` - - `"tool_search_tool_result_error"` + `screenshot`'s config overrides. - - `error_message: optional string or null` + - `defer_loading: optional boolean or null` - - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_references: array of BetaToolReferenceBlockParam` + - `enabled: optional boolean or null` - - `tool_name: string` + 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. - - `type: "tool_reference"` + - `scroll: optional BetaComputerScrollConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `scroll`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "tool_search_tool_search_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool_search_tool_search_result"` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "tool_search_tool_result"` + - `triple_click: optional BetaComputerTripleClickConfig or null` - - `"tool_search_tool_result"` + `triple_click`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` + - `enabled: optional boolean or null` - - `id: string` + 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. - - `input: map[unknown]` + - `type: optional BetaComputerTypeConfig or null` - - `name: string` + `type`'s config overrides. - - `server_name: string` + - `defer_loading: optional boolean or null` - The name of the MCP server + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "mcp_tool_use"` + - `enabled: optional boolean or null` - - `"mcp_tool_use"` + 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. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `wait: optional BetaComputerWaitConfig or null` - Create a cache control breakpoint at this content block. + `wait`'s config overrides. - - `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `defer_loading: optional boolean or null` - - `tool_use_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "mcp_tool_result"` + - `enabled: optional boolean or null` - - `"mcp_tool_result"` + 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. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `zoom: optional BetaComputerZoomConfig or null` - Create a cache control breakpoint at this content block. + `zoom`'s config overrides. - - `content: optional string or array of BetaTextBlockParam` + - `defer_loading: optional boolean or null` - - `string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` + - `enabled: optional boolean or null` - - `text: string` + 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. - - `type: "text"` +### Beta Computer Toolset Configs - - `cache_control: optional BetaCacheControlEphemeral or null` +- `BetaComputerToolsetConfigs object { cursor_position, double_click, hold_key, 14 more }` - Create a cache control breakpoint at this content block. + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `citations: optional array of BetaTextCitationParam or null` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - - `is_error: optional boolean` + `cursor_position`'s config overrides. - - `BetaContainerUploadBlockParam object { file_id, type, cache_control }` + - `defer_loading: optional boolean or null` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `file_id: string` + - `enabled: optional boolean or null` - - `type: "container_upload"` + 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. - - `"container_upload"` + - `double_click: optional BetaComputerDoubleClickConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `double_click`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - A compaction block containing summary of previous context. + - `enabled: optional boolean or null` - Users should round-trip these blocks from responses to subsequent requests - to maintain context across compaction boundaries. + 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. - When content is None, the block represents a failed compaction. The server - treats these as no-ops. Empty string content is not allowed. + - `hold_key: optional BetaComputerHoldKeyConfig or null` - - `type: "compaction"` + `hold_key`'s config overrides. - - `"compaction"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `content: optional string or null` + 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. - Summary of previously compacted content, or null if compaction failed + - `key: optional BetaComputerKeyConfig or null` - - `encrypted_content: optional string or null` + `key`'s config overrides. - Opaque metadata from prior compaction, to be round-tripped verbatim + - `defer_loading: optional boolean or null` - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - System instructions that appear mid-conversation. + - `enabled: optional boolean or null` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + 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. - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` + - `left_click: optional BetaComputerLeftClickConfig or null` - System instruction text blocks. + `left_click`'s config overrides. - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `defer_loading: optional boolean or null` - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Mid-conversation directive to surface a declared tool. + - `enabled: optional boolean or null` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + 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. - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `left_click_drag`'s config overrides. - - `BetaToolChangeToolReference object { name, type }` + - `defer_loading: optional boolean or null` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: string` + - `enabled: optional boolean or null` - - `type: "tool_reference"` + 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. - - `"tool_reference"` + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + `left_mouse_down`'s config overrides. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `defer_loading: optional boolean or null` - - `name: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `server_name: string` + - `enabled: optional boolean or null` - - `type: "mcp_tool_reference"` + 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. - - `"mcp_tool_reference"` + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + `left_mouse_up`'s config overrides. - Reference to every tool in the named MCP server's toolset. + - `defer_loading: optional boolean or null` - - `server_name: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "mcp_toolset_reference"` + - `enabled: optional boolean or null` - - `"mcp_toolset_reference"` + 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. - - `type: "tool_addition"` + - `middle_click: optional BetaComputerMiddleClickConfig or null` - - `"tool_addition"` + `middle_click`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `enabled: optional boolean or null` - Mid-conversation directive to withdraw a tool. + 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. - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `mouse_move: optional BetaComputerMouseMoveConfig or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + `mouse_move`'s config overrides. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `defer_loading: optional boolean or null` - - `BetaToolChangeToolReference object { name, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. - - - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. - - - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - Reference to every tool in the named MCP server's toolset. - - - `type: "tool_removal"` - - - `"tool_removal"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - - `BetaFallbackBlockParam object { from, to, type, trigger }` - - A `fallback` block echoed back from a prior response. - - Accepted in `messages[].content` and not rendered into the prompt; not - validated against the request's `fallbacks` chain or top-level `model`. - - Echo the assistant turn back verbatim, including this block in its - original position. The block marks the boundary between content produced - before and after a fallback hop, and the server relies on that boundary - to validate the turn: when thinking runs flank the boundary, omitting - the block merges them into one span the server cannot validate (the - request is rejected), and moving it into the middle of a single run is - likewise rejected; between non-thinking blocks the block's placement has - no validation effect. - - - `from: BetaFallbackInfoParam` - - Identifies one hop of a fallback transition. - - - `model: Model` - - The model that will complete your prompt. - - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - The model that will complete your prompt. - - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - - `"claude-sonnet-5"` - - High-performance model for coding and agents - - - `"claude-fable-5"` - - Next generation of intelligence for the hardest knowledge work and coding problems - - - `"claude-mythos-5"` - - Most capable model for cybersecurity and biology research - - - `"claude-opus-5"` - - Powerful intelligence for long-running agents and coding - - - `"claude-opus-4-8"` - - Powerful intelligence for long-running agents and coding - - - `"claude-opus-4-7"` - - Powerful intelligence for long-running agents and coding - - - `"claude-mythos-preview"` - - New class of intelligence, strongest in coding and cybersecurity - - - `"claude-opus-4-6"` - - Powerful intelligence for long-running agents and coding - - - `"claude-sonnet-4-6"` - - Best combination of speed and intelligence - - - `"claude-haiku-4-5"` - - Fastest model with near-frontier intelligence + - `enabled: optional boolean or null` - - `"claude-haiku-4-5-20251001"` + 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. - Fastest model with near-frontier intelligence + - `right_click: optional BetaComputerRightClickConfig or null` - - `"claude-opus-4-5"` + `right_click`'s config overrides. - Powerful intelligence for long-running agents and coding + - `defer_loading: optional boolean or null` - - `"claude-opus-4-5-20251101"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Powerful intelligence for long-running agents and coding + - `enabled: optional boolean or null` - - `"claude-sonnet-4-5"` + 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. - High-performance model for agents and coding + - `screenshot: optional BetaComputerScreenshotConfig or null` - - `"claude-sonnet-4-5-20250929"` + `screenshot`'s config overrides. - High-performance model for agents and coding + - `defer_loading: optional boolean or null` - - `string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `to: BetaFallbackInfoParam` + - `enabled: optional boolean or null` - Identifies one hop of a fallback transition. + 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. - - `type: "fallback"` + - `scroll: optional BetaComputerScrollConfig or null` - - `"fallback"` + `scroll`'s config overrides. - - `trigger: optional unknown` + - `defer_loading: optional boolean or null` - The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Beta Content Block Source + - `enabled: optional boolean or null` -- `BetaContentBlockSource object { content, type }` + 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. - - `content: string or array of BetaContentBlockSourceContent` + - `triple_click: optional BetaComputerTripleClickConfig or null` - - `string` + `triple_click`'s config overrides. - - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + - `defer_loading: optional boolean or null` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `text: string` + - `enabled: optional boolean or null` - - `type: "text"` + 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. - - `"text"` + - `type: optional BetaComputerTypeConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `type`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `wait: optional BetaComputerWaitConfig or null` - This may be one the following values: + `wait`'s config overrides. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"5m"` + - `enabled: optional boolean or null` - - `"1h"` + 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. - - `citations: optional array of BetaTextCitationParam or null` + - `zoom: optional BetaComputerZoomConfig or null` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + `zoom`'s config overrides. - - `cited_text: string` + - `defer_loading: optional boolean or null` - - `document_index: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `document_title: string or null` + - `enabled: optional boolean or null` - - `end_char_index: number` + 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. - - `start_char_index: number` +### Beta Computer Triple Click Config - - `type: "char_location"` +- `BetaComputerTripleClickConfig object { defer_loading, enabled }` - - `"char_location"` + `triple_click`'s config overrides. - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `document_index: number` + - `enabled: optional boolean or null` - - `document_title: string or null` + 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. - - `end_page_number: number` +### Beta Computer Type Config - - `start_page_number: number` +- `BetaComputerTypeConfig object { defer_loading, enabled }` - - `type: "page_location"` + `type`'s config overrides. - - `"page_location"` + - `defer_loading: optional boolean or null` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cited_text: string` + - `enabled: optional boolean or null` - The full text of the cited block range, concatenated. + 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. - 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. +### Beta Computer Wait Config - - `document_index: number` +- `BetaComputerWaitConfig object { defer_loading, enabled }` - - `document_title: string or null` + `wait`'s config overrides. - - `end_block_index: number` + - `defer_loading: optional boolean or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `enabled: optional boolean or null` - - `start_block_index: number` + 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. - 0-based index of the first cited block in the source's `content` array. +### Beta Computer Zoom Config - - `type: "content_block_location"` +- `BetaComputerZoomConfig object { defer_loading, enabled }` - - `"content_block_location"` + `zoom`'s config overrides. - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `encrypted_index: string` + - `enabled: optional boolean or null` - - `title: string or null` + 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. - - `type: "web_search_result_location"` +### Beta Container - - `"web_search_result_location"` +- `BetaContainer object { id, expires_at, skills }` - - `url: string` + Information about the container used in the request (for the code execution tool) - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `id: string` - - `cited_text: string` + Identifier for the container used in this request - The full text of the cited block range, concatenated. + - `expires_at: string` - 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. + The time at which the container will expire. - - `end_block_index: number` + - `skills: array of BetaSkill or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Skills loaded in the container - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `skill_id: string` - - `search_result_index: number` + Skill ID - 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. + - `type: "anthropic" or "custom"` - Counted separately from `document_index`; server-side web search results are not included in this count. + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `source: string` + - `"anthropic"` - - `start_block_index: number` + - `"custom"` - 0-based index of the first cited block in the source's `content` array. + - `version: string` - - `title: string or null` + Skill version or 'latest' for most recent version - - `type: "search_result_location"` +### Beta Container Params - - `"search_result_location"` +- `BetaContainerParams object { id, skills }` - - `BetaImageBlockParam object { source, type, cache_control }` + Container parameters with skills to be loaded. - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `id: optional string or null` - - `BetaBase64ImageSource object { data, media_type, type }` + Container id - - `data: string` + - `skills: optional array of BetaSkillParams or null` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + List of skills to load in the container - - `"image/jpeg"` + - `skill_id: string` - - `"image/png"` + Skill ID - - `"image/gif"` + - `type: "anthropic" or "custom"` - - `"image/webp"` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `type: "base64"` + - `"anthropic"` - - `"base64"` + - `"custom"` - - `BetaURLImageSource object { type, url }` + - `version: optional string` - - `type: "url"` + Skill version or 'latest' for most recent version - - `"url"` +### Beta Container Upload Block - - `url: string` +- `BetaContainerUploadBlock object { file_id, type }` - - `BetaFileImageSource object { file_id, type }` + Response model for a file uploaded to the container. - - `file_id: string` + - `file_id: string` - - `type: "file"` + - `type: "container_upload"` - - `"file"` + - `"container_upload"` - - `type: "image"` +### Beta Container Upload Block Param - - `"image"` +- `BetaContainerUploadBlockParam object { file_id, type, cache_control }` - - `cache_control: optional BetaCacheControlEphemeral or null` + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - Create a cache control breakpoint at this content block. + - `file_id: string` - - `type: "content"` + - `type: "container_upload"` - - `"content"` + - `"container_upload"` -### Beta Content Block Source Content + - `cache_control: optional BetaCacheControlEphemeral or null` -- `BetaContentBlockSourceContent = BetaTextBlockParam or BetaImageBlockParam` + Create a cache control breakpoint at this content block. - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `type: "ephemeral"` - - `text: string` + - `"ephemeral"` - - `type: "text"` + - `ttl: optional "5m" or "1h"` - - `"text"` + The time-to-live for the cache control breakpoint. - - `cache_control: optional BetaCacheControlEphemeral or null` + This may be one the following values: - Create a cache control breakpoint at this content block. + - `5m`: 5 minutes + - `1h`: 1 hour - - `type: "ephemeral"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"ephemeral"` + - `"5m"` - - `ttl: optional "5m" or "1h"` + - `"1h"` - The time-to-live for the cache control breakpoint. +### Beta Content Block - This may be one the following values: +- `BetaContentBlock = BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` - - `5m`: 5 minutes - - `1h`: 1 hour + Response model for a file uploaded to the container. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `BetaTextBlock object { citations, text, type }` - - `"5m"` + - `citations: array of BetaTextCitation or null` - - `"1h"` + Citations supporting the text block. - - `citations: optional array of BetaTextCitationParam or null` + 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`. - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - `cited_text: string` @@ -12602,13 +14078,15 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `end_char_index: number` + - `file_id: string or null` + - `start_char_index: number` - `type: "char_location"` - `"char_location"` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - `cited_text: string` @@ -12618,13 +14096,15 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `end_page_number: number` + - `file_id: string or null` + - `start_page_number: number` - `type: "page_location"` - `"page_location"` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - `cited_text: string` @@ -12642,6 +14122,8 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `file_id: string or null` + - `start_block_index: number` 0-based index of the first cited block in the source's `content` array. @@ -12650,7 +14132,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"content_block_location"` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - `cited_text: string` @@ -12664,7 +14146,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `url: string` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - `cited_text: string` @@ -12696,12437 +14178,15862 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `text: string` - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `type: "text"` - - `BetaBase64ImageSource object { data, media_type, type }` + - `"text"` - - `data: string` + - `BetaThinkingBlock object { signature, thinking, type }` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `signature: string` - - `"image/jpeg"` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"image/png"` + 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. - - `"image/gif"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"image/webp"` + - `thinking: string` - - `type: "base64"` + The text of Claude's thinking process for this block. - - `"base64"` + - `type: "thinking"` - - `BetaURLImageSource object { type, url }` + - `"thinking"` - - `type: "url"` + - `BetaRedactedThinkingBlock object { data, type }` - - `"url"` + - `data: string` - - `url: string` + 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. - - `BetaFileImageSource object { file_id, type }` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `file_id: string` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `type: "file"` + - `type: "redacted_thinking"` - - `"file"` + - `"redacted_thinking"` - - `type: "image"` + - `BetaToolUseBlock object { id, input, name, 3 more }` - - `"image"` + - `id: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `input: map[unknown]` - Create a cache control breakpoint at this content block. + - `name: string` -### Beta Context Management Config + - `type: "tool_use"` -- `BetaContextManagementConfig object { edits }` + - `"tool_use"` - - `edits: optional array of BetaClearToolUses20250919Edit or BetaClearThinking20251015Edit or BetaCompact20260112Edit` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - List of context management edits to apply + Tool invocation directly from the model. - - `BetaClearToolUses20250919Edit object { type, clear_at_least, clear_tool_inputs, 3 more }` + - `BetaDirectCaller object { type }` - - `type: "clear_tool_uses_20250919"` + Tool invocation directly from the model. - - `"clear_tool_uses_20250919"` + - `type: "direct"` - - `clear_at_least: optional BetaInputTokensClearAtLeast or null` + - `"direct"` - Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed. + - `BetaServerToolCaller object { tool_id, type }` - - `type: "input_tokens"` + Tool invocation generated by a server-side tool. - - `"input_tokens"` + - `tool_id: string` - - `value: number` + - `type: "code_execution_20250825"` - - `clear_tool_inputs: optional boolean or array of string or null` + - `"code_execution_20250825"` - Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `boolean` + - `tool_id: string` - - `array of string` + - `type: "code_execution_20260120"` - - `exclude_tools: optional array of string or null` + - `"code_execution_20260120"` - Tool names whose uses are preserved from clearing + - `toolset_name: optional string or null` - - `keep: optional BetaToolUsesKeep` + For a toolset member tool_use, the toolset family. - Number of tool uses to retain in the conversation + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - - `type: "tool_uses"` + - `id: string` - - `"tool_uses"` + - `input: map[unknown]` - - `value: number` + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger` + - `"advisor"` - Condition that triggers the context management strategy + - `"web_search"` - - `BetaInputTokensTrigger object { type, value }` + - `"web_fetch"` - - `type: "input_tokens"` + - `"code_execution"` - - `"input_tokens"` + - `"bash_code_execution"` - - `value: number` + - `"text_editor_code_execution"` - - `BetaToolUsesTrigger object { type, value }` + - `"tool_search_tool_regex"` - - `type: "tool_uses"` + - `"tool_search_tool_bm25"` - - `"tool_uses"` + - `type: "server_tool_use"` - - `value: number` + - `"server_tool_use"` - - `BetaClearThinking20251015Edit object { type, keep }` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `type: "clear_thinking_20251015"` + Tool invocation directly from the model. - - `"clear_thinking_20251015"` + - `BetaDirectCaller object { type }` - - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"` + Tool invocation directly from the model. - Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed. + - `BetaServerToolCaller object { tool_id, type }` - - `BetaThinkingTurns object { type, value }` + Tool invocation generated by a server-side tool. - - `type: "thinking_turns"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"thinking_turns"` + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` - - `value: number` + - `content: BetaWebSearchToolResultBlockContent` - - `BetaAllThinkingTurns object { type }` + - `BetaWebSearchToolResultError object { error_code, type }` - - `type: "all"` + - `error_code: BetaWebSearchToolResultErrorCode` - - `"all"` + - `"invalid_tool_input"` - - `"all"` + - `"unavailable"` - - `"all"` + - `"max_uses_exceeded"` - - `BetaCompact20260112Edit object { type, instructions, pause_after_compaction, trigger }` + - `"too_many_requests"` - Automatically compact older context when reaching the configured trigger threshold. + - `"query_too_long"` - - `type: "compact_20260112"` + - `"request_too_large"` - - `"compact_20260112"` + - `type: "web_search_tool_result_error"` - - `instructions: optional string or null` + - `"web_search_tool_result_error"` - Additional instructions for summarization. + - `array of BetaWebSearchResultBlock` - - `pause_after_compaction: optional boolean` + - `encrypted_content: string` - Whether to pause after compaction and return the compaction block to the user. + - `page_age: string or null` - - `trigger: optional BetaInputTokensTrigger or null` + - `title: string` - When to trigger compaction. Defaults to 150000 input tokens. + - `type: "web_search_result"` -### Beta Context Management Response + - `"web_search_result"` -- `BetaContextManagementResponse object { applied_edits }` + - `url: string` - - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + - `tool_use_id: string` - List of context management edits that were applied. + - `type: "web_search_tool_result"` - - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + - `"web_search_tool_result"` - - `cleared_input_tokens: number` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - Number of input tokens cleared by this edit. + Tool invocation directly from the model. - - `cleared_tool_uses: number` + - `BetaDirectCaller object { type }` - Number of tool uses that were cleared. + Tool invocation directly from the model. - - `type: "clear_tool_uses_20250919"` + - `BetaServerToolCaller object { tool_id, type }` - The type of context management edit applied. + Tool invocation generated by a server-side tool. - - `"clear_tool_uses_20250919"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` - - `cleared_input_tokens: number` + - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` - Number of input tokens cleared by this edit. + - `BetaWebFetchToolResultErrorBlock object { error_code, type }` - - `cleared_thinking_turns: number` + - `error_code: BetaWebFetchToolResultErrorCode` - Number of thinking turns that were cleared. + - `"invalid_tool_input"` - - `type: "clear_thinking_20251015"` + - `"url_too_long"` - The type of context management edit applied. + - `"url_not_allowed"` - - `"clear_thinking_20251015"` + - `"url_not_in_prior_context"` -### Beta Count Tokens Context Management Response + - `"url_not_accessible"` -- `BetaCountTokensContextManagementResponse object { original_input_tokens }` + - `"unsupported_content_type"` - - `original_input_tokens: number` + - `"too_many_requests"` - The original token count before context management was applied + - `"max_uses_exceeded"` -### Beta Diagnostics + - `"unavailable"` -- `BetaDiagnostics object { cache_miss_reason }` + - `type: "web_fetch_tool_result_error"` - Response envelope for request-level diagnostics. Present (possibly - null) whenever the caller supplied `diagnostics` on the request. + - `"web_fetch_tool_result_error"` - - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + - `BetaWebFetchBlock object { content, retrieved_at, type, url }` - 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. + - `content: BetaDocumentBlock` - - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + - `citations: BetaCitationConfig or null` - - `cache_missed_input_tokens: number` + Citation configuration for the document - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `enabled: boolean` - - `type: "model_changed"` + - `source: BetaBase64PDFSource or BetaPlainTextSource` - - `"model_changed"` + - `BetaBase64PDFSource object { data, media_type, type }` - - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + - `data: string` - - `cache_missed_input_tokens: number` + - `media_type: "application/pdf"` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `"application/pdf"` - - `type: "system_changed"` + - `type: "base64"` - - `"system_changed"` + - `"base64"` - - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + - `BetaPlainTextSource object { data, media_type, type }` - - `cache_missed_input_tokens: number` + - `data: string` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `media_type: "text/plain"` - - `type: "tools_changed"` + - `"text/plain"` - - `"tools_changed"` + - `type: "text"` - - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + - `"text"` - - `cache_missed_input_tokens: number` + - `title: string or null` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + The title of the document - - `type: "messages_changed"` + - `type: "document"` - - `"messages_changed"` + - `"document"` - - `BetaCacheMissPreviousMessageNotFound object { type }` + - `retrieved_at: string or null` - - `type: "previous_message_not_found"` + ISO 8601 timestamp when the content was retrieved - - `"previous_message_not_found"` + - `type: "web_fetch_result"` - - `BetaCacheMissUnavailable object { type }` + - `"web_fetch_result"` - - `type: "unavailable"` + - `url: string` - - `"unavailable"` + Fetched content URL -### Beta Diagnostics Param + - `tool_use_id: string` -- `BetaDiagnosticsParam object { previous_message_id }` + - `type: "web_fetch_tool_result"` - Request-level diagnostics. Currently carries the previous response - id for prompt-cache divergence reporting. + - `"web_fetch_tool_result"` - - `previous_message_id: optional string or null` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - 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. + Tool invocation directly from the model. -### Beta Direct Caller + - `BetaDirectCaller object { type }` -- `BetaDirectCaller object { type }` + Tool invocation directly from the model. - Tool invocation directly from the model. + - `BetaServerToolCaller object { tool_id, type }` - - `type: "direct"` + Tool invocation generated by a server-side tool. - - `"direct"` + - `BetaServerToolCaller20260120 object { tool_id, type }` -### Beta Document Block + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` -- `BetaDocumentBlock object { citations, source, title, type }` + - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` - - `citations: BetaCitationConfig or null` + - `BetaAdvisorToolResultError object { error_code, type }` - Citation configuration for the document + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - - `enabled: boolean` + - `"max_uses_exceeded"` - - `source: BetaBase64PDFSource or BetaPlainTextSource` + - `"prompt_too_long"` - - `BetaBase64PDFSource object { data, media_type, type }` + - `"too_many_requests"` - - `data: string` + - `"overloaded"` - - `media_type: "application/pdf"` + - `"unavailable"` - - `"application/pdf"` + - `"execution_time_exceeded"` - - `type: "base64"` + - `"model_not_found"` - - `"base64"` + - `type: "advisor_tool_result_error"` - - `BetaPlainTextSource object { data, media_type, type }` + - `"advisor_tool_result_error"` - - `data: string` + - `BetaAdvisorResultBlock object { stop_reason, text, type }` - - `media_type: "text/plain"` + - `stop_reason: string or null` - - `"text/plain"` + 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. - - `type: "text"` + - `text: string` - - `"text"` + - `type: "advisor_result"` - - `title: string or null` + - `"advisor_result"` - The title of the document + - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` - - `type: "document"` + - `encrypted_content: string` - - `"document"` + Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. -### Beta Encrypted Code Execution Result Block + - `stop_reason: string or null` -- `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). - Code execution result with encrypted stdout for PFC + web_search results. + - `type: "advisor_redacted_result"` - - `content: array of BetaCodeExecutionOutputBlock` + - `"advisor_redacted_result"` - - `file_id: string` + - `tool_use_id: string` - - `type: "code_execution_output"` + - `type: "advisor_tool_result"` - - `"code_execution_output"` + - `"advisor_tool_result"` - - `encrypted_stdout: string` + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `return_code: number` + - `content: BetaCodeExecutionToolResultBlockContent` - - `stderr: string` + Code execution result with encrypted stdout for PFC + web_search results. - - `type: "encrypted_code_execution_result"` + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `"encrypted_code_execution_result"` + - `error_code: BetaCodeExecutionToolResultErrorCode` -### Beta Encrypted Code Execution Result Block Param + - `"invalid_tool_input"` -- `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `"unavailable"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"too_many_requests"` - - `content: array of BetaCodeExecutionOutputBlockParam` + - `"execution_time_exceeded"` - - `file_id: string` + - `type: "code_execution_tool_result_error"` - - `type: "code_execution_output"` + - `"code_execution_tool_result_error"` - - `"code_execution_output"` + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `encrypted_stdout: string` + - `content: array of BetaCodeExecutionOutputBlock` - - `return_code: number` + - `file_id: string` - - `stderr: string` + - `type: "code_execution_output"` - - `type: "encrypted_code_execution_result"` + - `"code_execution_output"` - - `"encrypted_code_execution_result"` + - `return_code: number` -### Beta Fallback Block + - `stderr: string` -- `BetaFallbackBlock object { from, to, trigger, type }` + - `stdout: string` - Marks the point in `content` where one model's output gives way to the next. + - `type: "code_execution_result"` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + - `"code_execution_result"` - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `from: BetaFallbackInfo` + Code execution result with encrypted stdout for PFC + web_search results. - 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. + - `content: array of BetaCodeExecutionOutputBlock` - - `model: Model` + - `file_id: string` - The model that will complete your prompt. + - `type: "code_execution_output"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `encrypted_stdout: string` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `return_code: number` - The model that will complete your prompt. + - `stderr: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "encrypted_code_execution_result"` - - `"claude-sonnet-5"` + - `"encrypted_code_execution_result"` - High-performance model for coding and agents + - `tool_use_id: string` - - `"claude-fable-5"` + - `type: "code_execution_tool_result"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `"code_execution_tool_result"` - - `"claude-mythos-5"` + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - Most capable model for cybersecurity and biology research + - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` - - `"claude-opus-5"` + - `BetaBashCodeExecutionToolResultError object { error_code, type }` - Powerful intelligence for long-running agents and coding + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `"claude-opus-4-8"` + - `"invalid_tool_input"` - Powerful intelligence for long-running agents and coding + - `"unavailable"` - - `"claude-opus-4-7"` + - `"too_many_requests"` - Powerful intelligence for long-running agents and coding + - `"execution_time_exceeded"` - - `"claude-mythos-preview"` + - `"output_file_too_large"` - New class of intelligence, strongest in coding and cybersecurity + - `type: "bash_code_execution_tool_result_error"` - - `"claude-opus-4-6"` + - `"bash_code_execution_tool_result_error"` - Powerful intelligence for long-running agents and coding + - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"claude-sonnet-4-6"` + - `content: array of BetaBashCodeExecutionOutputBlock` - Best combination of speed and intelligence + - `file_id: string` - - `"claude-haiku-4-5"` + - `type: "bash_code_execution_output"` - Fastest model with near-frontier intelligence + - `"bash_code_execution_output"` - - `"claude-haiku-4-5-20251001"` + - `return_code: number` - Fastest model with near-frontier intelligence + - `stderr: string` - - `"claude-opus-4-5"` + - `stdout: string` - Powerful intelligence for long-running agents and coding + - `type: "bash_code_execution_result"` - - `"claude-opus-4-5-20251101"` + - `"bash_code_execution_result"` - Powerful intelligence for long-running agents and coding + - `tool_use_id: string` - - `"claude-sonnet-4-5"` + - `type: "bash_code_execution_tool_result"` - High-performance model for agents and coding + - `"bash_code_execution_tool_result"` - - `"claude-sonnet-4-5-20250929"` + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - High-performance model for agents and coding + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` - - `string` + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `to: BetaFallbackInfo` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + - `"invalid_tool_input"` - - `trigger: BetaFallbackRefusalTrigger` + - `"unavailable"` - What caused the `from` model to hand over at this hop. + - `"too_many_requests"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `"execution_time_exceeded"` - The policy category that triggered a refusal. + - `"file_not_found"` - - `"cyber"` + - `error_message: string or null` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `type: "text_editor_code_execution_tool_result_error"` - - `"bio"` + - `"text_editor_code_execution_tool_result_error"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `"frontier_llm"` + - `content: string` - 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. + - `file_type: "text" or "image" or "pdf"` - - `"reasoning_extraction"` + - `"text"` - 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). + - `"image"` - - `"general_harms"` + - `"pdf"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `num_lines: number or null` - - `type: "refusal"` + - `start_line: number or null` - - `"refusal"` + - `total_lines: number or null` - - `type: "fallback"` + - `type: "text_editor_code_execution_view_result"` - - `"fallback"` + - `"text_editor_code_execution_view_result"` -### Beta Fallback Block Param + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` -- `BetaFallbackBlockParam object { from, to, type, trigger }` + - `is_file_update: boolean` - A `fallback` block echoed back from a prior response. + - `type: "text_editor_code_execution_create_result"` - Accepted in `messages[].content` and not rendered into the prompt; not - validated against the request's `fallbacks` chain or top-level `model`. + - `"text_editor_code_execution_create_result"` - Echo the assistant turn back verbatim, including this block in its - original position. The block marks the boundary between content produced - before and after a fallback hop, and the server relies on that boundary - to validate the turn: when thinking runs flank the boundary, omitting - the block merges them into one span the server cannot validate (the - request is rejected), and moving it into the middle of a single run is - likewise rejected; between non-thinking blocks the block's placement has - no validation effect. + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `from: BetaFallbackInfoParam` + - `lines: array of string or null` - Identifies one hop of a fallback transition. + - `new_lines: number or null` - - `model: Model` + - `new_start: number or null` - The model that will complete your prompt. + - `old_lines: number or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `old_start: number or null` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "text_editor_code_execution_str_replace_result"` - The model that will complete your prompt. + - `"text_editor_code_execution_str_replace_result"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `tool_use_id: string` - - `"claude-sonnet-5"` + - `type: "text_editor_code_execution_tool_result"` - High-performance model for coding and agents + - `"text_editor_code_execution_tool_result"` - - `"claude-fable-5"` + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` - Next generation of intelligence for the hardest knowledge work and coding problems + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` - - `"claude-mythos-5"` + - `BetaToolSearchToolResultError object { error_code, error_message, type }` - Most capable model for cybersecurity and biology research + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `"claude-opus-5"` + - `"invalid_tool_input"` - Powerful intelligence for long-running agents and coding + - `"unavailable"` - - `"claude-opus-4-8"` + - `"too_many_requests"` - Powerful intelligence for long-running agents and coding + - `"execution_time_exceeded"` - - `"claude-opus-4-7"` + - `error_message: string or null` - Powerful intelligence for long-running agents and coding + - `type: "tool_search_tool_result_error"` - - `"claude-mythos-preview"` + - `"tool_search_tool_result_error"` - New class of intelligence, strongest in coding and cybersecurity + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` - - `"claude-opus-4-6"` + - `tool_references: array of BetaToolReferenceBlock` - Powerful intelligence for long-running agents and coding + - `tool_name: string` - - `"claude-sonnet-4-6"` + - `type: "tool_reference"` - Best combination of speed and intelligence + - `"tool_reference"` - - `"claude-haiku-4-5"` + - `type: "tool_search_tool_search_result"` - Fastest model with near-frontier intelligence + - `"tool_search_tool_search_result"` - - `"claude-haiku-4-5-20251001"` + - `tool_use_id: string` - Fastest model with near-frontier intelligence + - `type: "tool_search_tool_result"` - - `"claude-opus-4-5"` + - `"tool_search_tool_result"` - Powerful intelligence for long-running agents and coding + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` - - `"claude-opus-4-5-20251101"` + - `id: string` - Powerful intelligence for long-running agents and coding + - `input: map[unknown]` - - `"claude-sonnet-4-5"` + - `name: string` - High-performance model for agents and coding + The name of the MCP tool - - `"claude-sonnet-4-5-20250929"` + - `server_name: string` - High-performance model for agents and coding + The name of the MCP server - - `string` + - `type: "mcp_tool_use"` - - `to: BetaFallbackInfoParam` + - `"mcp_tool_use"` - Identifies one hop of a fallback transition. + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` - - `type: "fallback"` + - `content: string or array of BetaTextBlock` - - `"fallback"` + - `string` - - `trigger: optional unknown` + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` - The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. + - `citations: array of BetaTextCitation or null` -### Beta Fallback Credit Not Applied + Citations supporting the text block. -- `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + 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`. - No reprice was applied; `reason` says why. + - `text: string` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `type: "text"` - Why the reprice was not applied. + - `is_error: boolean` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `tool_use_id: string` - - `"body_mismatch"` + - `type: "mcp_tool_result"` - - `"continuation_excluded"` + - `"mcp_tool_result"` - - `"continuation_only"` + - `BetaContainerUploadBlock object { file_id, type }` - - `"expired"` + Response model for a file uploaded to the container. - - `"invalid_target_model"` + - `file_id: string` - - `"not_enabled"` + - `type: "container_upload"` - - `"reprice_unavailable"` + - `"container_upload"` - - `"temporarily_unavailable"` + - `BetaCompactionBlock object { content, encrypted_content, type }` - - `"variant_fields_present"` + A compaction block returned when autocompact is triggered. - - `"wrong_organization"` + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. - - `"wrong_platform"` + - `content: string or null` - - `"wrong_workspace"` + Summary of compacted content, or null if compaction failed - - `type: "not_applied"` + - `encrypted_content: string or null` - - `"not_applied"` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `remove_to_redeem: optional array of string or null` + - `type: "compaction"` - Request fields to remove before retrying, so the retry can redeem this - token. + - `"compaction"` - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `BetaFallbackBlock object { from, to, trigger, type }` -### Beta Fallback Credit Redeemed + Marks the point in `content` where one model's output gives way to the next. -- `BetaFallbackCreditRedeemed object { type }` + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. - - `type: "redeemed"` + - `from: BetaFallbackInfo` - - `"redeemed"` + 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. -### Beta Fallback Credit Token Param + - `model: Model` -- `BetaFallbackCreditTokenParam object { token, mode }` + The model that will complete your prompt. - Object form of `fallback_credit_token`: the token plus a redemption - mode. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - Requires `anthropic-beta: fallback-credit-2026-07-01`; without that - header the field accepts the bare string only. The bare string and the - mode-less object are equivalent (both select `strict`), so wrapping - an existing token changes nothing by itself. + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `token: string` + The model that will complete your prompt. - The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `mode: optional "strict" or "best_effort"` + - `"claude-sonnet-5"` - 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`. + High-performance model for coding and agents - - `"strict"` + - `"claude-fable-5"` - - `"best_effort"` + Next generation of intelligence for the hardest knowledge work and coding problems -### Beta Fallback Credit Usage + - `"claude-mythos-5"` -- `BetaFallbackCreditUsage object { status }` + Most capable model for cybersecurity and biology research - Outcome of the `fallback_credit_token` presented on this request. + - `"claude-opus-5"` - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + Powerful intelligence for long-running agents and coding - Whether the fallback-credit reprice was applied to this response's billing. + - `"claude-opus-4-8"` - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + Powerful intelligence for long-running agents and coding - - `BetaFallbackCreditRedeemed object { type }` + - `"claude-opus-4-7"` - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + Powerful intelligence for long-running agents and coding - - `type: "redeemed"` + - `"claude-mythos-preview"` - - `"redeemed"` + New class of intelligence, strongest in coding and cybersecurity - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `"claude-opus-4-6"` - No reprice was applied; `reason` says why. + Powerful intelligence for long-running agents and coding - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `"claude-sonnet-4-6"` - Why the reprice was not applied. + Best combination of speed and intelligence - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `"claude-haiku-4-5"` - - `"body_mismatch"` + Fastest model with near-frontier intelligence - - `"continuation_excluded"` + - `"claude-haiku-4-5-20251001"` - - `"continuation_only"` + Fastest model with near-frontier intelligence - - `"expired"` + - `"claude-opus-4-5"` - - `"invalid_target_model"` + Powerful intelligence for long-running agents and coding - - `"not_enabled"` + - `"claude-opus-4-5-20251101"` - - `"reprice_unavailable"` + Powerful intelligence for long-running agents and coding - - `"temporarily_unavailable"` + - `"claude-sonnet-4-5"` - - `"variant_fields_present"` + High-performance model for agents and coding - - `"wrong_organization"` + - `"claude-sonnet-4-5-20250929"` - - `"wrong_platform"` + High-performance model for agents and coding - - `"wrong_workspace"` + - `string` - - `type: "not_applied"` + - `to: BetaFallbackInfo` - - `"not_applied"` + The fallback model producing the content that follows this block. Its `model` is always the canonical id. - - `remove_to_redeem: optional array of string or null` + - `trigger: BetaFallbackRefusalTrigger` - Request fields to remove before retrying, so the retry can redeem this - token. + What caused the `from` model to hand over at this hop. - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` -### Beta Fallback Info + The policy category that triggered a refusal. -- `BetaFallbackInfo object { model }` + - `"cyber"` - Identifies one hop of a fallback transition. + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `model: Model` + - `"bio"` - The model that will complete your prompt. + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"frontier_llm"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + 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. - The model that will complete your prompt. + - `"reasoning_extraction"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + 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). - - `"claude-sonnet-5"` + - `"general_harms"` - High-performance model for coding and agents + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `"claude-fable-5"` + - `type: "refusal"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `"refusal"` - - `"claude-mythos-5"` + - `type: "fallback"` - Most capable model for cybersecurity and biology research + - `"fallback"` - - `"claude-opus-5"` +### Beta Content Block Param - Powerful intelligence for long-running agents and coding +- `BetaContentBlockParam = BetaTextBlockParam or BetaImageBlockParam or BetaRequestDocumentBlock or 20 more` - - `"claude-opus-4-8"` + Regular text content. - Powerful intelligence for long-running agents and coding + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `"claude-opus-4-7"` + - `text: string` - Powerful intelligence for long-running agents and coding + - `type: "text"` - - `"claude-mythos-preview"` + - `"text"` - New class of intelligence, strongest in coding and cybersecurity + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-opus-4-6"` + Create a cache control breakpoint at this content block. - Powerful intelligence for long-running agents and coding + - `type: "ephemeral"` - - `"claude-sonnet-4-6"` + - `"ephemeral"` - Best combination of speed and intelligence + - `ttl: optional "5m" or "1h"` - - `"claude-haiku-4-5"` + The time-to-live for the cache control breakpoint. - Fastest model with near-frontier intelligence + This may be one the following values: - - `"claude-haiku-4-5-20251001"` + - `5m`: 5 minutes + - `1h`: 1 hour - Fastest model with near-frontier intelligence + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"claude-opus-4-5"` + - `"5m"` - Powerful intelligence for long-running agents and coding + - `"1h"` - - `"claude-opus-4-5-20251101"` + - `citations: optional array of BetaTextCitationParam or null` - Powerful intelligence for long-running agents and coding + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"claude-sonnet-4-5"` + - `cited_text: string` - High-performance model for agents and coding + - `document_index: number` - - `"claude-sonnet-4-5-20250929"` + - `document_title: string or null` - High-performance model for agents and coding + - `end_char_index: number` - - `string` + - `start_char_index: number` -### Beta Fallback Info Param + - `type: "char_location"` -- `BetaFallbackInfoParam object { model }` + - `"char_location"` - Identifies one hop of a fallback transition. + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `model: Model` + - `cited_text: string` - The model that will complete your prompt. + - `document_index: number` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `document_title: string or null` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `end_page_number: number` - The model that will complete your prompt. + - `start_page_number: number` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "page_location"` - - `"claude-sonnet-5"` + - `"page_location"` - High-performance model for coding and agents + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"claude-fable-5"` + - `cited_text: string` - Next generation of intelligence for the hardest knowledge work and coding problems + The full text of the cited block range, concatenated. - - `"claude-mythos-5"` + 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. - Most capable model for cybersecurity and biology research + - `document_index: number` - - `"claude-opus-5"` + - `document_title: string or null` - Powerful intelligence for long-running agents and coding + - `end_block_index: number` - - `"claude-opus-4-8"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Powerful intelligence for long-running agents and coding + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"claude-opus-4-7"` + - `start_block_index: number` - Powerful intelligence for long-running agents and coding + 0-based index of the first cited block in the source's `content` array. - - `"claude-mythos-preview"` + - `type: "content_block_location"` - New class of intelligence, strongest in coding and cybersecurity + - `"content_block_location"` - - `"claude-opus-4-6"` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - Powerful intelligence for long-running agents and coding + - `cited_text: string` - - `"claude-sonnet-4-6"` + - `encrypted_index: string` - Best combination of speed and intelligence + - `title: string or null` - - `"claude-haiku-4-5"` + - `type: "web_search_result_location"` - Fastest model with near-frontier intelligence + - `"web_search_result_location"` - - `"claude-haiku-4-5-20251001"` + - `url: string` - Fastest model with near-frontier intelligence + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"claude-opus-4-5"` + - `cited_text: string` - Powerful intelligence for long-running agents and coding + The full text of the cited block range, concatenated. - - `"claude-opus-4-5-20251101"` + 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. - Powerful intelligence for long-running agents and coding + - `end_block_index: number` - - `"claude-sonnet-4-5"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - High-performance model for agents and coding + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"claude-sonnet-4-5-20250929"` + - `search_result_index: number` - High-performance model for agents and coding + 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. - - `string` + Counted separately from `document_index`; server-side web search results are not included in this count. -### Beta Fallback Message Iteration Usage + - `source: string` -- `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `start_block_index: number` - Token usage for the fallback-model attempt of a server-side fallback request. + 0-based index of the first cited block in the source's `content` array. - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + - `title: string or null` - - `cache_creation: BetaCacheCreation or null` + - `type: "search_result_location"` - Breakdown of cached tokens by TTL + - `"search_result_location"` - - `ephemeral_1h_input_tokens: number` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - The number of input tokens used to create the 1 hour cache entry. + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - - `ephemeral_5m_input_tokens: number` + - `BetaBase64ImageSource object { data, media_type, type }` - The number of input tokens used to create the 5 minute cache entry. + - `data: string` - - `cache_creation_input_tokens: number` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - The number of input tokens used to create the cache entry. + - `"image/jpeg"` - - `cache_read_input_tokens: number` + - `"image/png"` - The number of input tokens read from the cache. + - `"image/gif"` - - `input_tokens: number` + - `"image/webp"` - The number of input tokens which were used. + - `type: "base64"` - - `model: Model` + - `"base64"` - The model that will complete your prompt. + - `BetaURLImageSource object { type, url }` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "url"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `"url"` - The model that will complete your prompt. + - `url: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `BetaFileImageSource object { file_id, type }` - - `"claude-sonnet-5"` + - `file_id: string` - High-performance model for coding and agents + - `type: "file"` - - `"claude-fable-5"` + - `"file"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `type: "image"` - - `"claude-mythos-5"` + - `"image"` - Most capable model for cybersecurity and biology research + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-opus-5"` + Create a cache control breakpoint at this content block. - Powerful intelligence for long-running agents and coding + - `transformations: optional BetaImageTransformationsParam or null` - - `"claude-opus-4-8"` + 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. - Powerful intelligence for long-running agents and coding + - `oversized_image: optional "downsize" or "error"` - - `"claude-opus-4-7"` + 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. - Powerful intelligence for long-running agents and coding + - `"downsize"` - - `"claude-mythos-preview"` + - `"error"` - New class of intelligence, strongest in coding and cybersecurity + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - - `"claude-opus-4-6"` + - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` - Powerful intelligence for long-running agents and coding + - `BetaBase64PDFSource object { data, media_type, type }` - - `"claude-sonnet-4-6"` + - `data: string` - Best combination of speed and intelligence + - `media_type: "application/pdf"` - - `"claude-haiku-4-5"` + - `"application/pdf"` - Fastest model with near-frontier intelligence + - `type: "base64"` - - `"claude-haiku-4-5-20251001"` + - `"base64"` - Fastest model with near-frontier intelligence + - `BetaPlainTextSource object { data, media_type, type }` - - `"claude-opus-4-5"` + - `data: string` - Powerful intelligence for long-running agents and coding + - `media_type: "text/plain"` - - `"claude-opus-4-5-20251101"` + - `"text/plain"` - Powerful intelligence for long-running agents and coding + - `type: "text"` - - `"claude-sonnet-4-5"` + - `"text"` - High-performance model for agents and coding + - `BetaContentBlockSource object { content, type }` - - `"claude-sonnet-4-5-20250929"` + - `content: string or array of BetaContentBlockSourceContent` - High-performance model for agents and coding + - `string` - - `string` + - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` - - `output_tokens: number` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - The number of output tokens which were used. + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - - `type: "fallback_message"` + - `type: "content"` - Usage for the fallback-model attempt that served the response + - `"content"` - - `"fallback_message"` + - `BetaURLPDFSource object { type, url }` -### Beta Fallback Param + - `type: "url"` -- `BetaFallbackParam object { model, max_tokens, output_config, 2 more }` + - `"url"` - One entry in the `fallbacks` chain on a `/v1/messages` request. + - `url: string` - `model` is required. The override fields (`max_tokens`, `thinking`, - `output_config`, and `speed`) set the corresponding parameter for this - attempt only and are validated as if the request were made to `model`. - Any other key is rejected at parse time. + - `BetaFileDocumentSource object { file_id, type }` - - `model: Model` + - `file_id: string` - The model that will complete your prompt. + - `type: "file"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"file"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "document"` - The model that will complete your prompt. + - `"document"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-sonnet-5"` + Create a cache control breakpoint at this content block. - High-performance model for coding and agents + - `citations: optional BetaCitationsConfigParam or null` - - `"claude-fable-5"` + - `enabled: optional boolean` - Next generation of intelligence for the hardest knowledge work and coding problems + - `context: optional string or null` - - `"claude-mythos-5"` + - `title: optional string or null` - Most capable model for cybersecurity and biology research + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - - `"claude-opus-5"` + - `content: array of BetaTextBlockParam` - Powerful intelligence for long-running agents and coding + - `text: string` - - `"claude-opus-4-8"` + - `type: "text"` - Powerful intelligence for long-running agents and coding + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-opus-4-7"` + Create a cache control breakpoint at this content block. - Powerful intelligence for long-running agents and coding + - `citations: optional array of BetaTextCitationParam or null` - - `"claude-mythos-preview"` + - `source: string` - New class of intelligence, strongest in coding and cybersecurity + - `title: string` - - `"claude-opus-4-6"` + - `type: "search_result"` - Powerful intelligence for long-running agents and coding + - `"search_result"` - - `"claude-sonnet-4-6"` + - `cache_control: optional BetaCacheControlEphemeral or null` - Best combination of speed and intelligence + Create a cache control breakpoint at this content block. - - `"claude-haiku-4-5"` + - `citations: optional BetaCitationsConfigParam` - Fastest model with near-frontier intelligence + - `BetaThinkingBlockParam object { signature, thinking, type }` - - `"claude-haiku-4-5-20251001"` + - `signature: string` - Fastest model with near-frontier intelligence + 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. - - `"claude-opus-4-5"` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - Powerful intelligence for long-running agents and coding + - `thinking: string` - - `"claude-opus-4-5-20251101"` + The `thinking` text of this block as returned by the API. - Powerful intelligence for long-running agents and coding + - `type: "thinking"` - - `"claude-sonnet-4-5"` + - `"thinking"` - High-performance model for agents and coding + - `BetaRedactedThinkingBlockParam object { data, type }` - - `"claude-sonnet-4-5-20250929"` + - `data: string` - High-performance model for agents and coding + 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. - - `string` + - `type: "redacted_thinking"` - - `max_tokens: optional number or null` + - `"redacted_thinking"` - - `output_config: optional BetaOutputConfig or null` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - - `effort: optional "low" or "medium" or "high" or 2 more or null` + - `id: string` - All possible effort levels. + - `input: map[unknown]` - - `"low"` + - `name: string` - - `"medium"` + - `type: "tool_use"` - - `"high"` + - `"tool_use"` - - `"xhigh"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"max"` + Create a cache control breakpoint at this content block. - - `format: optional BetaJSONOutputFormat or null` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + Tool invocation directly from the model. - - `schema: map[unknown]` + - `BetaDirectCaller object { type }` - The JSON schema of the format + Tool invocation directly from the model. - - `type: "json_schema"` + - `type: "direct"` - - `"json_schema"` + - `"direct"` - - `task_budget: optional BetaTokenTaskBudget or null` + - `BetaServerToolCaller object { tool_id, type }` - User-configurable total token budget across contexts. + Tool invocation generated by a server-side tool. - - `total: number` + - `tool_id: string` - Total token budget across all contexts in the session. + - `type: "code_execution_20250825"` - - `type: "tokens"` + - `"code_execution_20250825"` - The budget type. Currently only 'tokens' is supported. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"tokens"` + - `tool_id: string` - - `remaining: optional number or null` + - `type: "code_execution_20260120"` - Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. + - `"code_execution_20260120"` - - `speed: optional "standard" or "fast" or null` + - `toolset_name: optional string or null` - 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. + For a toolset member tool_use, the toolset family this member belongs to. - - `"standard"` + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `"fast"` + - `tool_use_id: string` - - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null` + - `type: "tool_result"` - - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` + - `"tool_result"` - - `budget_tokens: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - Must be ≥1024 and less than `max_tokens`. + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `string` - - `type: "enabled"` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - - `"enabled"` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `display: optional "summarized" or "omitted" or null` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - 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`. + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - - `"summarized"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - - `"omitted"` + - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` - - `BetaThinkingConfigDisabled object { type }` + Tool reference block that can be included in tool_result content. - - `type: "disabled"` + - `tool_name: string` - - `"disabled"` + - `type: "tool_reference"` - - `BetaThinkingConfigAdaptive object { type, display }` + - `"tool_reference"` - - `type: "adaptive"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"adaptive"` + Create a cache control breakpoint at this content block. - - `display: optional "summarized" or "omitted" or null` + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - 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`. + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - - `"summarized"` + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `"omitted"` + - `tabs: array of BetaBrowserStateTabEntry` -### Beta Fallback Refusal Trigger + 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`. -- `BetaFallbackRefusalTrigger object { category, type }` + - `tab_id: string` - The `from` model declined for policy reasons. + The caller-assigned identifier for this tab, unique within the inventory. - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `title: string` - The policy category that triggered a refusal. + The title of the page the tab is showing. May be empty. - - `"cyber"` + - `url: string` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + The URL of the page the tab is showing. May be empty. - - `"bio"` + - `active: optional boolean` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `"frontier_llm"` + - `type: "browser_state"` - 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. + - `"browser_state"` - - `"reasoning_extraction"` + - `cache_control: optional BetaCacheControlEphemeral or null` - 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). + Create a cache control breakpoint at this content block. - - `"general_harms"` + - `state_changes: optional array of BetaBrowserStateChange or null` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `type: "refusal"` + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` - - `"refusal"` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. -### Beta Fallbacks Param + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. -- `BetaFallbacksParam = array of BetaFallbackParam or "default"` + - `tab_id: string` - 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. + The `tab_id` of the opened tab, present in `tabs`. - - `array of BetaFallbackParam` + - `type: "tab_opened"` - - `model: Model` + - `"tab_opened"` - The model that will complete your prompt. + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + A file download that started during this call. - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `download_id: string` - The model that will complete your prompt. + The caller-assigned identifier for this download, stable across the state changes reporting it. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "download_started"` - - `"claude-sonnet-5"` + - `"download_started"` - High-performance model for coding and agents + - `url: string` - - `"claude-fable-5"` + The final post-redirect URL the download was served from. - Next generation of intelligence for the hardest knowledge work and coding problems + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `"claude-mythos-5"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - Most capable model for cybersecurity and biology research + - `download_id: string` - - `"claude-opus-5"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Powerful intelligence for long-running agents and coding + - `type: "download_completed"` - - `"claude-opus-4-8"` + - `"download_completed"` - Powerful intelligence for long-running agents and coding + - `url: string` - - `"claude-opus-4-7"` + The final post-redirect URL the download was served from. - Powerful intelligence for long-running agents and coding + - `path: optional string or null` - - `"claude-mythos-preview"` + 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. - New class of intelligence, strongest in coding and cybersecurity + - `size_bytes: optional number or null` - - `"claude-opus-4-6"` + The completed download's size. - Powerful intelligence for long-running agents and coding + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `"claude-sonnet-4-6"` + A file download that failed — or was cancelled — during this call. - Best combination of speed and intelligence + - `download_id: string` - - `"claude-haiku-4-5"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Fastest model with near-frontier intelligence + - `type: "download_failed"` - - `"claude-haiku-4-5-20251001"` + - `"download_failed"` - Fastest model with near-frontier intelligence + - `url: string` - - `"claude-opus-4-5"` + The final post-redirect URL the download was served from. - Powerful intelligence for long-running agents and coding + - `error: optional string or null` - - `"claude-opus-4-5-20251101"` + The failure or cancellation detail, when known. - Powerful intelligence for long-running agents and coding + - `is_error: optional boolean` - - `"claude-sonnet-4-5"` + - `toolset_name: optional string or null` - High-performance model for agents and coding + For a toolset member tool_result, the toolset family of the paired tool_use. - - `"claude-sonnet-4-5-20250929"` + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - High-performance model for agents and coding + - `id: string` - - `string` + - `input: map[unknown]` - - `max_tokens: optional number or null` + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `output_config: optional BetaOutputConfig or null` + - `"advisor"` - - `effort: optional "low" or "medium" or "high" or 2 more or null` + - `"web_search"` - All possible effort levels. + - `"web_fetch"` - - `"low"` + - `"code_execution"` - - `"medium"` + - `"bash_code_execution"` - - `"high"` + - `"text_editor_code_execution"` - - `"xhigh"` + - `"tool_search_tool_regex"` - - `"max"` + - `"tool_search_tool_bm25"` - - `format: optional BetaJSONOutputFormat or null` + - `type: "server_tool_use"` - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + - `"server_tool_use"` - - `schema: map[unknown]` + - `cache_control: optional BetaCacheControlEphemeral or null` - The JSON schema of the format + Create a cache control breakpoint at this content block. - - `type: "json_schema"` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"json_schema"` + Tool invocation directly from the model. - - `task_budget: optional BetaTokenTaskBudget or null` + - `BetaDirectCaller object { type }` - User-configurable total token budget across contexts. + Tool invocation directly from the model. - - `total: number` + - `BetaServerToolCaller object { tool_id, type }` - Total token budget across all contexts in the session. + Tool invocation generated by a server-side tool. - - `type: "tokens"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - The budget type. Currently only 'tokens' is supported. + - `BetaWebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `"tokens"` + - `content: BetaWebSearchToolResultBlockParamContent` - - `remaining: optional number or null` + - `ResultBlock = array of BetaWebSearchResultBlockParam` - Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. + - `encrypted_content: string` - - `speed: optional "standard" or "fast" or null` + - `title: string` - 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. + - `type: "web_search_result"` - - `"standard"` + - `"web_search_result"` - - `"fast"` + - `url: string` - - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null` + - `page_age: optional string or null` - - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` + - `BetaWebSearchToolRequestError object { error_code, type }` - - `budget_tokens: number` + - `error_code: BetaWebSearchToolResultErrorCode` - 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. + - `"invalid_tool_input"` - Must be ≥1024 and less than `max_tokens`. + - `"unavailable"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `"max_uses_exceeded"` - - `type: "enabled"` + - `"too_many_requests"` - - `"enabled"` + - `"query_too_long"` - - `display: optional "summarized" or "omitted" or null` + - `"request_too_large"` - 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`. + - `type: "web_search_tool_result_error"` - - `"summarized"` + - `"web_search_tool_result_error"` - - `"omitted"` + - `tool_use_id: string` - - `BetaThinkingConfigDisabled object { type }` + - `type: "web_search_tool_result"` - - `type: "disabled"` + - `"web_search_tool_result"` - - `"disabled"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaThinkingConfigAdaptive object { type, display }` + Create a cache control breakpoint at this content block. - - `type: "adaptive"` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"adaptive"` + Tool invocation directly from the model. - - `display: optional "summarized" or "omitted" or null` + - `BetaDirectCaller object { type }` - 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`. + Tool invocation directly from the model. - - `"summarized"` + - `BetaServerToolCaller object { tool_id, type }` - - `"omitted"` + Tool invocation generated by a server-side tool. - - `Default = "default"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"default"` + - `BetaWebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` -### Beta File Document Source + - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam` -- `BetaFileDocumentSource object { file_id, type }` + - `BetaWebFetchToolResultErrorBlockParam object { error_code, type }` - - `file_id: string` + - `error_code: BetaWebFetchToolResultErrorCode` - - `type: "file"` + - `"invalid_tool_input"` - - `"file"` + - `"url_too_long"` -### Beta File Image Source + - `"url_not_allowed"` -- `BetaFileImageSource object { file_id, type }` + - `"url_not_in_prior_context"` - - `file_id: string` + - `"url_not_accessible"` - - `type: "file"` + - `"unsupported_content_type"` - - `"file"` + - `"too_many_requests"` -### Beta Image Block Param + - `"max_uses_exceeded"` -- `BetaImageBlockParam object { source, type, cache_control }` + - `"unavailable"` - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `type: "web_fetch_tool_result_error"` - - `BetaBase64ImageSource object { data, media_type, type }` + - `"web_fetch_tool_result_error"` - - `data: string` + - `BetaWebFetchBlockParam object { content, type, url, retrieved_at }` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `content: BetaRequestDocumentBlock` - - `"image/jpeg"` + - `type: "web_fetch_result"` - - `"image/png"` + - `"web_fetch_result"` - - `"image/gif"` + - `url: string` - - `"image/webp"` + Fetched content URL - - `type: "base64"` + - `retrieved_at: optional string or null` - - `"base64"` + ISO 8601 timestamp when the content was retrieved - - `BetaURLImageSource object { type, url }` + - `tool_use_id: string` - - `type: "url"` + - `type: "web_fetch_tool_result"` - - `"url"` + - `"web_fetch_tool_result"` - - `url: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaFileImageSource object { file_id, type }` + Create a cache control breakpoint at this content block. - - `file_id: string` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `type: "file"` + Tool invocation directly from the model. - - `"file"` + - `BetaDirectCaller object { type }` - - `type: "image"` + Tool invocation directly from the model. - - `"image"` + - `BetaServerToolCaller object { tool_id, type }` - - `cache_control: optional BetaCacheControlEphemeral or null` + Tool invocation generated by a server-side tool. - Create a cache control breakpoint at this content block. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `type: "ephemeral"` + - `BetaAdvisorToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `"ephemeral"` + - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam` - - `ttl: optional "5m" or "1h"` + - `BetaAdvisorToolResultErrorParam object { error_code, type }` - The time-to-live for the cache control breakpoint. + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - This may be one the following values: + - `"max_uses_exceeded"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"prompt_too_long"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"too_many_requests"` - - `"5m"` + - `"overloaded"` - - `"1h"` + - `"unavailable"` -### Beta Input JSON Delta + - `"execution_time_exceeded"` -- `BetaInputJSONDelta object { partial_json, type }` + - `"model_not_found"` - - `partial_json: string` + - `type: "advisor_tool_result_error"` - - `type: "input_json_delta"` + - `"advisor_tool_result_error"` - - `"input_json_delta"` + - `BetaAdvisorResultBlockParam object { text, type, stop_reason }` -### Beta Input Tokens Clear At Least + - `text: string` -- `BetaInputTokensClearAtLeast object { type, value }` + - `type: "advisor_result"` - - `type: "input_tokens"` + - `"advisor_result"` - - `"input_tokens"` + - `stop_reason: optional string or null` - - `value: number` + - `BetaAdvisorRedactedResultBlockParam object { encrypted_content, type, stop_reason }` -### Beta Input Tokens Trigger + - `encrypted_content: string` -- `BetaInputTokensTrigger object { type, value }` + Opaque blob produced by a prior response; must be round-tripped verbatim. - - `type: "input_tokens"` + - `type: "advisor_redacted_result"` - - `"input_tokens"` + - `"advisor_redacted_result"` - - `value: number` + - `stop_reason: optional string or null` -### Beta Iterations Usage + - `tool_use_id: string` -- `BetaIterationsUsage = array of BetaMessageIterationUsage or BetaCompactionIterationUsage or BetaAdvisorMessageIterationUsage or BetaFallbackMessageIterationUsage` + - `type: "advisor_tool_result"` - Per-iteration token usage breakdown. + - `"advisor_tool_result"` - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + - `cache_control: optional BetaCacheControlEphemeral or null` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + Create a cache control breakpoint at this content block. - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - Token usage for a sampling iteration. + - `content: BetaCodeExecutionToolResultBlockParamContent` - - `cache_creation: BetaCacheCreation or null` + Code execution result with encrypted stdout for PFC + web_search results. - Breakdown of cached tokens by TTL + - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` - - `ephemeral_1h_input_tokens: number` + - `error_code: BetaCodeExecutionToolResultErrorCode` - The number of input tokens used to create the 1 hour cache entry. + - `"invalid_tool_input"` - - `ephemeral_5m_input_tokens: number` + - `"unavailable"` - The number of input tokens used to create the 5 minute cache entry. + - `"too_many_requests"` - - `cache_creation_input_tokens: number` + - `"execution_time_exceeded"` - The number of input tokens used to create the cache entry. + - `type: "code_execution_tool_result_error"` - - `cache_read_input_tokens: number` + - `"code_execution_tool_result_error"` - The number of input tokens read from the cache. + - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `input_tokens: number` + - `content: array of BetaCodeExecutionOutputBlockParam` - The number of input tokens which were used. + - `file_id: string` - - `model: Model` + - `type: "code_execution_output"` - The model that will complete your prompt. + - `"code_execution_output"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `return_code: number` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `stderr: string` - The model that will complete your prompt. + - `stdout: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "code_execution_result"` - - `"claude-sonnet-5"` + - `"code_execution_result"` - High-performance model for coding and agents + - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `"claude-fable-5"` + Code execution result with encrypted stdout for PFC + web_search results. - Next generation of intelligence for the hardest knowledge work and coding problems + - `content: array of BetaCodeExecutionOutputBlockParam` - - `"claude-mythos-5"` + - `file_id: string` - Most capable model for cybersecurity and biology research + - `type: "code_execution_output"` - - `"claude-opus-5"` + - `encrypted_stdout: string` - Powerful intelligence for long-running agents and coding + - `return_code: number` - - `"claude-opus-4-8"` + - `stderr: string` - Powerful intelligence for long-running agents and coding + - `type: "encrypted_code_execution_result"` - - `"claude-opus-4-7"` + - `"encrypted_code_execution_result"` - Powerful intelligence for long-running agents and coding + - `tool_use_id: string` - - `"claude-mythos-preview"` + - `type: "code_execution_tool_result"` - New class of intelligence, strongest in coding and cybersecurity + - `"code_execution_tool_result"` - - `"claude-opus-4-6"` + - `cache_control: optional BetaCacheControlEphemeral or null` - Powerful intelligence for long-running agents and coding + Create a cache control breakpoint at this content block. - - `"claude-sonnet-4-6"` + - `BetaBashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - Best combination of speed and intelligence + - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam` - - `"claude-haiku-4-5"` + - `BetaBashCodeExecutionToolResultErrorParam object { error_code, type }` - Fastest model with near-frontier intelligence + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `"claude-haiku-4-5-20251001"` + - `"invalid_tool_input"` - Fastest model with near-frontier intelligence + - `"unavailable"` - - `"claude-opus-4-5"` + - `"too_many_requests"` - Powerful intelligence for long-running agents and coding + - `"execution_time_exceeded"` - - `"claude-opus-4-5-20251101"` + - `"output_file_too_large"` - Powerful intelligence for long-running agents and coding + - `type: "bash_code_execution_tool_result_error"` - - `"claude-sonnet-4-5"` + - `"bash_code_execution_tool_result_error"` - High-performance model for agents and coding + - `BetaBashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `"claude-sonnet-4-5-20250929"` + - `content: array of BetaBashCodeExecutionOutputBlockParam` - High-performance model for agents and coding + - `file_id: string` - - `string` + - `type: "bash_code_execution_output"` - - `output_tokens: number` + - `"bash_code_execution_output"` - The number of output tokens which were used. + - `return_code: number` - - `type: "message"` + - `stderr: string` - Usage for a sampling iteration + - `stdout: string` - - `"message"` + - `type: "bash_code_execution_result"` - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `"bash_code_execution_result"` - Token usage for a compaction iteration. + - `tool_use_id: string` - - `cache_creation: BetaCacheCreation or null` + - `type: "bash_code_execution_tool_result"` - Breakdown of cached tokens by TTL + - `"bash_code_execution_tool_result"` - - `cache_creation_input_tokens: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - The number of input tokens used to create the cache entry. + Create a cache control breakpoint at this content block. - - `cache_read_input_tokens: number` + - `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - The number of input tokens read from the cache. + - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` - - `input_tokens: number` + - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - The number of input tokens which were used. + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `output_tokens: number` + - `"invalid_tool_input"` - The number of output tokens which were used. + - `"unavailable"` - - `type: "compaction"` + - `"too_many_requests"` - Usage for a compaction iteration + - `"execution_time_exceeded"` - - `"compaction"` + - `"file_not_found"` - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `type: "text_editor_code_execution_tool_result_error"` - Token usage for an advisor sub-inference iteration. + - `"text_editor_code_execution_tool_result_error"` - - `cache_creation: BetaCacheCreation or null` + - `error_message: optional string or null` - Breakdown of cached tokens by TTL + - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `cache_creation_input_tokens: number` + - `content: string` - The number of input tokens used to create the cache entry. + - `file_type: "text" or "image" or "pdf"` - - `cache_read_input_tokens: number` + - `"text"` - The number of input tokens read from the cache. + - `"image"` - - `input_tokens: number` + - `"pdf"` - The number of input tokens which were used. + - `type: "text_editor_code_execution_view_result"` - - `model: Model` + - `"text_editor_code_execution_view_result"` - The model that will complete your prompt. + - `num_lines: optional number or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `start_line: optional number or null` - - `output_tokens: number` + - `total_lines: optional number or null` - The number of output tokens which were used. + - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `type: "advisor_message"` + - `is_file_update: boolean` - Usage for an advisor sub-inference iteration + - `type: "text_editor_code_execution_create_result"` - - `"advisor_message"` + - `"text_editor_code_execution_create_result"` - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - Token usage for the fallback-model attempt of a server-side fallback request. + - `type: "text_editor_code_execution_str_replace_result"` - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + - `"text_editor_code_execution_str_replace_result"` - - `cache_creation: BetaCacheCreation or null` + - `lines: optional array of string or null` - Breakdown of cached tokens by TTL + - `new_lines: optional number or null` - - `cache_creation_input_tokens: number` + - `new_start: optional number or null` - The number of input tokens used to create the cache entry. + - `old_lines: optional number or null` - - `cache_read_input_tokens: number` + - `old_start: optional number or null` - The number of input tokens read from the cache. + - `tool_use_id: string` - - `input_tokens: number` + - `type: "text_editor_code_execution_tool_result"` - The number of input tokens which were used. + - `"text_editor_code_execution_tool_result"` - - `model: Model` + - `cache_control: optional BetaCacheControlEphemeral or null` - The model that will complete your prompt. + Create a cache control breakpoint at this content block. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `output_tokens: number` + - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` - The number of output tokens which were used. + - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` - - `type: "fallback_message"` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - Usage for the fallback-model attempt that served the response + - `"invalid_tool_input"` - - `"fallback_message"` + - `"unavailable"` -### Beta JSON Output Format + - `"too_many_requests"` -- `BetaJSONOutputFormat object { schema, type }` + - `"execution_time_exceeded"` - - `schema: map[unknown]` + - `type: "tool_search_tool_result_error"` - The JSON schema of the format + - `"tool_search_tool_result_error"` - - `type: "json_schema"` + - `error_message: optional string or null` - - `"json_schema"` + - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` -### Beta MCP Tool Config + - `tool_references: array of BetaToolReferenceBlockParam` -- `BetaMCPToolConfig object { defer_loading, enabled }` + - `tool_name: string` - Configuration for a specific tool in an MCP toolset. + - `type: "tool_reference"` - - `defer_loading: optional boolean` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `enabled: optional boolean` + Create a cache control breakpoint at this content block. -### Beta MCP Tool Default Config + - `type: "tool_search_tool_search_result"` -- `BetaMCPToolDefaultConfig object { defer_loading, enabled }` + - `"tool_search_tool_search_result"` - Default configuration for tools in an MCP toolset. + - `tool_use_id: string` - - `defer_loading: optional boolean` + - `type: "tool_search_tool_result"` - - `enabled: optional boolean` + - `"tool_search_tool_result"` -### Beta MCP Tool Result Block + - `cache_control: optional BetaCacheControlEphemeral or null` -- `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + Create a cache control breakpoint at this content block. - - `content: string or array of BetaTextBlock` + - `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` - - `string` + - `id: string` - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + - `input: map[unknown]` - - `citations: array of BetaTextCitation or null` + - `name: string` - Citations supporting the text block. + - `server_name: string` - 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`. + The name of the MCP server - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "mcp_tool_use"` - - `cited_text: string` + - `"mcp_tool_use"` - - `document_index: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `document_title: string or null` + Create a cache control breakpoint at this content block. - - `end_char_index: number` + - `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` - - `file_id: string or null` + - `tool_use_id: string` - - `start_char_index: number` + - `type: "mcp_tool_result"` - - `type: "char_location"` + - `"mcp_tool_result"` - - `"char_location"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + Create a cache control breakpoint at this content block. - - `cited_text: string` + - `content: optional string or array of BetaTextBlockParam` - - `document_index: number` + - `string` - - `document_title: string or null` + - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` - - `end_page_number: number` + - `text: string` - - `file_id: string or null` + - `type: "text"` - - `start_page_number: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "page_location"` + Create a cache control breakpoint at this content block. - - `"page_location"` + - `citations: optional array of BetaTextCitationParam or null` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `is_error: optional boolean` - - `cited_text: string` + - `BetaContainerUploadBlockParam object { file_id, type, cache_control }` - The full text of the cited block range, concatenated. + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - 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. + - `file_id: string` - - `document_index: number` + - `type: "container_upload"` - - `document_title: string or null` + - `"container_upload"` - - `end_block_index: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Create a cache control breakpoint at this content block. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` - - `file_id: string or null` + A compaction block containing summary of previous context. - - `start_block_index: number` + Users should round-trip these blocks from responses to subsequent requests + to maintain context across compaction boundaries. - 0-based index of the first cited block in the source's `content` array. + When content is None, the block represents a failed compaction. The server + treats these as no-ops. Empty string content is not allowed. - - `type: "content_block_location"` + - `type: "compaction"` - - `"content_block_location"` + - `"compaction"` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `cited_text: string` + Create a cache control breakpoint at this content block. - - `encrypted_index: string` + - `content: optional string or null` - - `title: string or null` + Summary of previously compacted content, or null if compaction failed - - `type: "web_search_result_location"` + - `encrypted_content: optional string or null` - - `"web_search_result_location"` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `url: string` + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + Mid-conversation directive to surface a declared tool. - - `cited_text: string` + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - The full text of the cited block range, concatenated. + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - 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. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `end_block_index: number` + - `BetaToolChangeToolReference object { name, type }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `name: string` - - `search_result_index: number` + - `type: "tool_reference"` - 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. + - `"tool_reference"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `source: string` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `start_block_index: number` + - `name: string` - 0-based index of the first cited block in the source's `content` array. + - `server_name: string` - - `title: string or null` + - `type: "mcp_tool_reference"` - - `type: "search_result_location"` + - `"mcp_tool_reference"` - - `"search_result_location"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `text: string` + Reference to every tool in the named MCP server's toolset. - - `type: "text"` + - `server_name: string` - - `"text"` + - `type: "mcp_toolset_reference"` - - `is_error: boolean` + - `"mcp_toolset_reference"` - - `tool_use_id: string` + - `type: "tool_addition"` - - `type: "mcp_tool_result"` + - `"tool_addition"` - - `"mcp_tool_result"` + - `cache_control: optional BetaCacheControlEphemeral or null` -### Beta MCP Tool Use Block + Create a cache control breakpoint at this content block. -- `BetaMCPToolUseBlock object { id, input, name, 2 more }` + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `id: string` + Mid-conversation directive to withdraw a tool. - - `input: map[unknown]` + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - The name of the MCP tool + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `server_name: string` + - `BetaToolChangeToolReference object { name, type }` - The name of the MCP server + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "mcp_tool_use"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_use"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. -### Beta MCP Tool Use Block Param + - `BetaToolChangeMCPToolsetReference object { server_name, type }` -- `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` + Reference to every tool in the named MCP server's toolset. - - `id: string` + - `type: "tool_removal"` - - `input: map[unknown]` + - `"tool_removal"` - - `name: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `server_name: string` + Create a cache control breakpoint at this content block. - The name of the MCP server + - `BetaFallbackBlockParam object { from, to, type, trigger }` - - `type: "mcp_tool_use"` + A `fallback` block echoed back from a prior response. - - `"mcp_tool_use"` + Accepted in `messages[].content` and not rendered into the prompt; not + validated against the request's `fallbacks` chain or top-level `model`. - - `cache_control: optional BetaCacheControlEphemeral or null` + Echo the assistant turn back verbatim, including this block in its + original position. The block marks the boundary between content produced + before and after a fallback hop, and the server relies on that boundary + to validate the turn: when thinking runs flank the boundary, omitting + the block merges them into one span the server cannot validate (the + request is rejected), and moving it into the middle of a single run is + likewise rejected; between non-thinking blocks the block's placement has + no validation effect. - Create a cache control breakpoint at this content block. + - `from: BetaFallbackInfoParam` - - `type: "ephemeral"` + Identifies one hop of a fallback transition. - - `"ephemeral"` + - `model: Model` - - `ttl: optional "5m" or "1h"` + The model that will complete your prompt. - The time-to-live for the cache control breakpoint. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - This may be one the following values: + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `5m`: 5 minutes - - `1h`: 1 hour + The model that will complete your prompt. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"5m"` + - `"claude-sonnet-5"` - - `"1h"` + High-performance model for coding and agents -### Beta MCP Toolset + - `"claude-fable-5"` -- `BetaMCPToolset object { mcp_server_name, type, cache_control, 2 more }` + Next generation of intelligence for the hardest knowledge work and coding problems - Configuration for a group of tools from an MCP server. + - `"claude-mythos-5"` - Allows configuring enabled status and defer_loading for all tools - from an MCP server, with optional per-tool overrides. + Most capable model for cybersecurity and biology research - - `mcp_server_name: string` + - `"claude-opus-5"` - Name of the MCP server to configure tools for + Powerful intelligence for long-running agents and coding - - `type: "mcp_toolset"` + - `"claude-opus-4-8"` - - `"mcp_toolset"` + Powerful intelligence for long-running agents and coding - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"claude-opus-4-7"` - Create a cache control breakpoint at this content block. + Powerful intelligence for long-running agents and coding - - `type: "ephemeral"` + - `"claude-mythos-preview"` - - `"ephemeral"` + New class of intelligence, strongest in coding and cybersecurity - - `ttl: optional "5m" or "1h"` + - `"claude-opus-4-6"` - The time-to-live for the cache control breakpoint. + Powerful intelligence for long-running agents and coding - This may be one the following values: + - `"claude-sonnet-4-6"` - - `5m`: 5 minutes - - `1h`: 1 hour + Best combination of speed and intelligence - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"claude-haiku-4-5"` - - `"5m"` + Fastest model with near-frontier intelligence - - `"1h"` + - `"claude-haiku-4-5-20251001"` - - `configs: optional map[BetaMCPToolConfig] or null` + Fastest model with near-frontier intelligence - Configuration overrides for specific tools, keyed by tool name + - `"claude-opus-4-5"` - - `defer_loading: optional boolean` + Powerful intelligence for long-running agents and coding - - `enabled: optional boolean` + - `"claude-opus-4-5-20251101"` - - `default_config: optional BetaMCPToolDefaultConfig` + Powerful intelligence for long-running agents and coding - Default configuration applied to all tools from this server + - `"claude-sonnet-4-5"` - - `defer_loading: optional boolean` + High-performance model for agents and coding - - `enabled: optional boolean` + - `"claude-sonnet-4-5-20250929"` -### Beta Memory Tool 20250818 + High-performance model for agents and coding -- `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `string` - - `name: "memory"` + - `to: BetaFallbackInfoParam` - Name of the tool. + Identifies one hop of a fallback transition. - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "fallback"` - - `"memory"` + - `"fallback"` - - `type: "memory_20250818"` + - `trigger: optional unknown` - - `"memory_20250818"` + The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +### Beta Content Block Source - - `"direct"` +- `BetaContentBlockSource object { content, type }` - - `"code_execution_20250825"` + - `content: string or array of BetaContentBlockSourceContent` - - `"code_execution_20260120"` + - `string` - - `"code_execution_20260521"` + - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - Create a cache control breakpoint at this content block. + - `text: string` - - `type: "ephemeral"` + - `type: "text"` - - `"ephemeral"` + - `"text"` - - `ttl: optional "5m" or "1h"` + - `cache_control: optional BetaCacheControlEphemeral or null` - The time-to-live for the cache control breakpoint. + Create a cache control breakpoint at this content block. - This may be one the following values: + - `type: "ephemeral"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"ephemeral"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `ttl: optional "5m" or "1h"` - - `"5m"` + The time-to-live for the cache control breakpoint. - - `"1h"` + This may be one the following values: - - `defer_loading: optional boolean` + - `5m`: 5 minutes + - `1h`: 1 hour - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `input_examples: optional array of map[unknown]` + - `"5m"` - - `strict: optional boolean` + - `"1h"` - When true, guarantees schema validation on tool names and inputs + - `citations: optional array of BetaTextCitationParam or null` -### Beta Memory Tool 20250818 Command + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` -- `BetaMemoryTool20250818Command = BetaMemoryTool20250818ViewCommand or BetaMemoryTool20250818CreateCommand or BetaMemoryTool20250818StrReplaceCommand or 3 more` + - `cited_text: string` - - `BetaMemoryTool20250818ViewCommand object { command, path, view_range }` + - `document_index: number` - - `command: "view"` + - `document_title: string or null` - Command type identifier + - `end_char_index: number` - - `"view"` + - `start_char_index: number` - - `path: string` + - `type: "char_location"` - Path to directory or file to view + - `"char_location"` - - `view_range: optional array of number` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - Optional line range for viewing specific lines + - `cited_text: string` - - `BetaMemoryTool20250818CreateCommand object { command, file_text, path }` + - `document_index: number` - - `command: "create"` + - `document_title: string or null` - Command type identifier + - `end_page_number: number` - - `"create"` + - `start_page_number: number` - - `file_text: string` + - `type: "page_location"` - Content to write to the file + - `"page_location"` - - `path: string` + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - Path where the file should be created + - `cited_text: string` - - `BetaMemoryTool20250818StrReplaceCommand object { command, new_str, old_str, path }` + The full text of the cited block range, concatenated. - - `command: "str_replace"` + 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. - Command type identifier + - `document_index: number` - - `"str_replace"` + - `document_title: string or null` - - `new_str: string` + - `end_block_index: number` - Text to replace with + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `old_str: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Text to search for and replace + - `start_block_index: number` - - `path: string` + 0-based index of the first cited block in the source's `content` array. - Path to the file where text should be replaced + - `type: "content_block_location"` - - `BetaMemoryTool20250818InsertCommand object { command, insert_line, insert_text, path }` + - `"content_block_location"` - - `command: "insert"` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - Command type identifier + - `cited_text: string` - - `"insert"` + - `encrypted_index: string` - - `insert_line: number` + - `title: string or null` - Line number where text should be inserted + - `type: "web_search_result_location"` - - `insert_text: string` + - `"web_search_result_location"` - Text to insert at the specified line + - `url: string` - - `path: string` + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - Path to the file where text should be inserted + - `cited_text: string` - - `BetaMemoryTool20250818DeleteCommand object { command, path }` + The full text of the cited block range, concatenated. - - `command: "delete"` + 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. - Command type identifier + - `end_block_index: number` - - `"delete"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `path: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Path to the file or directory to delete + - `search_result_index: number` - - `BetaMemoryTool20250818RenameCommand object { command, new_path, old_path }` + 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. - - `command: "rename"` + Counted separately from `document_index`; server-side web search results are not included in this count. - Command type identifier + - `source: string` - - `"rename"` + - `start_block_index: number` - - `new_path: string` + 0-based index of the first cited block in the source's `content` array. - New path for the file or directory + - `title: string or null` - - `old_path: string` + - `type: "search_result_location"` - Current path of the file or directory + - `"search_result_location"` -### Beta Memory Tool 20250818 Create Command + - `BetaImageBlockParam object { source, type, cache_control, transformations }` -- `BetaMemoryTool20250818CreateCommand object { command, file_text, path }` + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - - `command: "create"` + - `BetaBase64ImageSource object { data, media_type, type }` - Command type identifier + - `data: string` - - `"create"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `file_text: string` + - `"image/jpeg"` - Content to write to the file + - `"image/png"` - - `path: string` + - `"image/gif"` - Path where the file should be created + - `"image/webp"` -### Beta Memory Tool 20250818 Delete Command + - `type: "base64"` -- `BetaMemoryTool20250818DeleteCommand object { command, path }` + - `"base64"` - - `command: "delete"` + - `BetaURLImageSource object { type, url }` - Command type identifier + - `type: "url"` - - `"delete"` + - `"url"` - - `path: string` + - `url: string` - Path to the file or directory to delete + - `BetaFileImageSource object { file_id, type }` -### Beta Memory Tool 20250818 Insert Command + - `file_id: string` -- `BetaMemoryTool20250818InsertCommand object { command, insert_line, insert_text, path }` + - `type: "file"` - - `command: "insert"` + - `"file"` - Command type identifier + - `type: "image"` - - `"insert"` + - `"image"` - - `insert_line: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - Line number where text should be inserted + Create a cache control breakpoint at this content block. - - `insert_text: string` + - `transformations: optional BetaImageTransformationsParam or null` - Text to insert at the specified line + 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. - - `path: string` + - `oversized_image: optional "downsize" or "error"` - Path to the file where text should be inserted + 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. -### Beta Memory Tool 20250818 Rename Command + - `"downsize"` -- `BetaMemoryTool20250818RenameCommand object { command, new_path, old_path }` + - `"error"` - - `command: "rename"` + - `type: "content"` - Command type identifier + - `"content"` - - `"rename"` +### Beta Content Block Source Content - - `new_path: string` +- `BetaContentBlockSourceContent = BetaTextBlockParam or BetaImageBlockParam` - New path for the file or directory + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `old_path: string` + - `text: string` - Current path of the file or directory + - `type: "text"` -### Beta Memory Tool 20250818 Str Replace Command + - `"text"` -- `BetaMemoryTool20250818StrReplaceCommand object { command, new_str, old_str, path }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `command: "str_replace"` + Create a cache control breakpoint at this content block. - Command type identifier + - `type: "ephemeral"` - - `"str_replace"` + - `"ephemeral"` - - `new_str: string` + - `ttl: optional "5m" or "1h"` - Text to replace with + The time-to-live for the cache control breakpoint. - - `old_str: string` + This may be one the following values: - Text to search for and replace + - `5m`: 5 minutes + - `1h`: 1 hour - - `path: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Path to the file where text should be replaced + - `"5m"` -### Beta Memory Tool 20250818 View Command + - `"1h"` -- `BetaMemoryTool20250818ViewCommand object { command, path, view_range }` + - `citations: optional array of BetaTextCitationParam or null` - - `command: "view"` + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - Command type identifier + - `cited_text: string` - - `"view"` + - `document_index: number` - - `path: string` + - `document_title: string or null` - Path to directory or file to view + - `end_char_index: number` - - `view_range: optional array of number` + - `start_char_index: number` - Optional line range for viewing specific lines + - `type: "char_location"` -### Beta Message + - `"char_location"` -- `BetaMessage object { id, container, content, 9 more }` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `id: string` + - `cited_text: string` - Unique object identifier. + - `document_index: number` - The format and length of IDs may change over time. + - `document_title: string or null` - - `container: BetaContainer or null` + - `end_page_number: number` - Information about the container used in the request (for the code execution tool) + - `start_page_number: number` - - `id: string` + - `type: "page_location"` - Identifier for the container used in this request + - `"page_location"` - - `expires_at: string` + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - The time at which the container will expire. + - `cited_text: string` - - `skills: array of BetaSkill or null` + The full text of the cited block range, concatenated. - Skills loaded in the container + 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. - - `skill_id: string` + - `document_index: number` - Skill ID + - `document_title: string or null` - - `type: "anthropic" or "custom"` + - `end_block_index: number` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"anthropic"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"custom"` + - `start_block_index: number` - - `version: string` + 0-based index of the first cited block in the source's `content` array. - Skill version or 'latest' for most recent version + - `type: "content_block_location"` - - `content: array of BetaContentBlock` + - `"content_block_location"` - Content generated by the model. + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - This is an array of content blocks, each of which has a `type` that determines its shape. + - `cited_text: string` - Example: + - `encrypted_index: string` - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `title: string or null` - 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. + - `type: "web_search_result_location"` - For example, if the input `messages` were: + - `"web_search_result_location"` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + - `url: string` - Then the response `content` might be: + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `cited_text: string` - - `BetaTextBlock object { citations, text, type }` + The full text of the cited block range, concatenated. - - `citations: array of BetaTextCitation or null` + 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. - Citations supporting the text block. + - `end_block_index: number` - 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`. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `cited_text: string` + - `search_result_index: number` - - `document_index: number` + 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. - - `document_title: string or null` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `end_char_index: number` + - `source: string` - - `file_id: string or null` + - `start_block_index: number` - - `start_char_index: number` + 0-based index of the first cited block in the source's `content` array. - - `type: "char_location"` + - `title: string or null` - - `"char_location"` + - `type: "search_result_location"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"search_result_location"` - - `cited_text: string` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - - `document_index: number` + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - - `document_title: string or null` + - `BetaBase64ImageSource object { data, media_type, type }` - - `end_page_number: number` + - `data: string` - - `file_id: string or null` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `start_page_number: number` + - `"image/jpeg"` - - `type: "page_location"` + - `"image/png"` - - `"page_location"` + - `"image/gif"` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `"image/webp"` - - `cited_text: string` + - `type: "base64"` - The full text of the cited block range, concatenated. + - `"base64"` - 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. + - `BetaURLImageSource object { type, url }` - - `document_index: number` + - `type: "url"` - - `document_title: string or null` + - `"url"` - - `end_block_index: number` + - `url: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `BetaFileImageSource object { file_id, type }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `file_id: string` - - `file_id: string or null` + - `type: "file"` - - `start_block_index: number` + - `"file"` - 0-based index of the first cited block in the source's `content` array. + - `type: "image"` - - `type: "content_block_location"` + - `"image"` - - `"content_block_location"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + Create a cache control breakpoint at this content block. - - `cited_text: string` + - `transformations: optional BetaImageTransformationsParam or null` - - `encrypted_index: string` + 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. - - `title: string or null` + - `oversized_image: optional "downsize" or "error"` - - `type: "web_search_result_location"` + 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. - - `"web_search_result_location"` + - `"downsize"` - - `url: string` + - `"error"` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` +### Beta Context Management Config - - `cited_text: string` +- `BetaContextManagementConfig object { edits }` - The full text of the cited block range, concatenated. + - `edits: optional array of BetaClearToolUses20250919Edit or BetaClearThinking20251015Edit or BetaCompact20260112Edit` - 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. + List of context management edits to apply - - `end_block_index: number` + - `BetaClearToolUses20250919Edit object { type, clear_at_least, clear_tool_inputs, 3 more }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "clear_tool_uses_20250919"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"clear_tool_uses_20250919"` - - `search_result_index: number` + - `clear_at_least: optional BetaInputTokensClearAtLeast or null` - 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. + Minimum number of tokens that must be cleared when triggered. Context will only be modified if at least this many tokens can be removed. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `type: "input_tokens"` - - `source: string` + - `"input_tokens"` - - `start_block_index: number` + - `value: number` - 0-based index of the first cited block in the source's `content` array. + - `clear_tool_inputs: optional boolean or array of string or null` - - `title: string or null` + Whether to clear all tool inputs (bool) or specific tool inputs to clear (list) - - `type: "search_result_location"` + - `boolean` - - `"search_result_location"` + - `array of string` - - `text: string` + - `exclude_tools: optional array of string or null` - - `type: "text"` + Tool names whose uses are preserved from clearing - - `"text"` + - `keep: optional BetaToolUsesKeep` - - `BetaThinkingBlock object { signature, thinking, type }` + Number of tool uses to retain in the conversation - - `signature: string` + - `type: "tool_uses"` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `"tool_uses"` - 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. + - `value: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `trigger: optional BetaInputTokensTrigger or BetaToolUsesTrigger` - - `thinking: string` + Condition that triggers the context management strategy - The text of Claude's thinking process for this block. + - `BetaInputTokensTrigger object { type, value }` - - `type: "thinking"` + - `type: "input_tokens"` - - `"thinking"` + - `"input_tokens"` - - `BetaRedactedThinkingBlock object { data, type }` + - `value: number` - - `data: string` + - `BetaToolUsesTrigger object { type, value }` - 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. + - `type: "tool_uses"` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `"tool_uses"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `value: number` - - `type: "redacted_thinking"` + - `BetaClearThinking20251015Edit object { type, keep }` - - `"redacted_thinking"` + - `type: "clear_thinking_20251015"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `"clear_thinking_20251015"` - - `id: string` + - `keep: optional BetaThinkingTurns or BetaAllThinkingTurns or "all"` - - `input: map[unknown]` + Number of most recent assistant turns to keep thinking blocks for. Older turns will have their thinking blocks removed. - - `name: string` + - `BetaThinkingTurns object { type, value }` - - `type: "tool_use"` + - `type: "thinking_turns"` - - `"tool_use"` + - `"thinking_turns"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `value: number` - Tool invocation directly from the model. + - `BetaAllThinkingTurns object { type }` - - `BetaDirectCaller object { type }` + - `type: "all"` - Tool invocation directly from the model. + - `"all"` - - `type: "direct"` + - `"all"` - - `"direct"` + - `"all"` - - `BetaServerToolCaller object { tool_id, type }` + - `BetaCompact20260112Edit object { type, instructions, pause_after_compaction, trigger }` - Tool invocation generated by a server-side tool. + Automatically compact older context when reaching the configured trigger threshold. - - `tool_id: string` + - `type: "compact_20260112"` - - `type: "code_execution_20250825"` + - `"compact_20260112"` - - `"code_execution_20250825"` + - `instructions: optional string or null` - - `BetaServerToolCaller20260120 object { tool_id, type }` + Additional instructions for summarization. - - `tool_id: string` + - `pause_after_compaction: optional boolean` - - `type: "code_execution_20260120"` + Whether to pause after compaction and return the compaction block to the user. - - `"code_execution_20260120"` + - `trigger: optional BetaInputTokensTrigger or null` - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + When to trigger compaction. Defaults to 150000 input tokens. - - `id: string` +### Beta Context Management Response - - `input: map[unknown]` +- `BetaContextManagementResponse object { applied_edits }` - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` - - `"advisor"` + List of context management edits that were applied. - - `"web_search"` + - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` - - `"web_fetch"` + - `cleared_input_tokens: number` - - `"code_execution"` + Number of input tokens cleared by this edit. - - `"bash_code_execution"` + - `cleared_tool_uses: number` - - `"text_editor_code_execution"` + Number of tool uses that were cleared. - - `"tool_search_tool_regex"` + - `type: "clear_tool_uses_20250919"` - - `"tool_search_tool_bm25"` + The type of context management edit applied. - - `type: "server_tool_use"` + - `"clear_tool_uses_20250919"` - - `"server_tool_use"` + - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `cleared_input_tokens: number` - Tool invocation directly from the model. + Number of input tokens cleared by this edit. - - `BetaDirectCaller object { type }` + - `cleared_thinking_turns: number` - Tool invocation directly from the model. + Number of thinking turns that were cleared. - - `BetaServerToolCaller object { tool_id, type }` + - `type: "clear_thinking_20251015"` - Tool invocation generated by a server-side tool. + The type of context management edit applied. - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"clear_thinking_20251015"` - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` +### Beta Count Tokens Context Management Response - - `content: BetaWebSearchToolResultBlockContent` +- `BetaCountTokensContextManagementResponse object { original_input_tokens }` - - `BetaWebSearchToolResultError object { error_code, type }` + - `original_input_tokens: number` - - `error_code: BetaWebSearchToolResultErrorCode` + The original token count before context management was applied - - `"invalid_tool_input"` +### Beta Diagnostics - - `"unavailable"` +- `BetaDiagnostics object { cache_miss_reason }` - - `"max_uses_exceeded"` + Response envelope for request-level diagnostics. Present (possibly + null) whenever the caller supplied `diagnostics` on the request. - - `"too_many_requests"` + - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` - - `"query_too_long"` + 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. - - `"request_too_large"` + - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` - - `type: "web_search_tool_result_error"` + - `cache_missed_input_tokens: number` - - `"web_search_tool_result_error"` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `array of BetaWebSearchResultBlock` + - `type: "model_changed"` - - `encrypted_content: string` + - `"model_changed"` - - `page_age: string or null` + - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` - - `title: string` + - `cache_missed_input_tokens: number` - - `type: "web_search_result"` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `"web_search_result"` + - `type: "system_changed"` - - `url: string` + - `"system_changed"` - - `tool_use_id: string` + - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` - - `type: "web_search_tool_result"` + - `cache_missed_input_tokens: number` - - `"web_search_tool_result"` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `type: "tools_changed"` - Tool invocation directly from the model. + - `"tools_changed"` - - `BetaDirectCaller object { type }` + - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` - Tool invocation directly from the model. + - `cache_missed_input_tokens: number` - - `BetaServerToolCaller object { tool_id, type }` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - Tool invocation generated by a server-side tool. + - `type: "messages_changed"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"messages_changed"` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + - `BetaCacheMissPreviousMessageNotFound object { type }` - - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + - `type: "previous_message_not_found"` - - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + - `"previous_message_not_found"` - - `error_code: BetaWebFetchToolResultErrorCode` + - `BetaCacheMissUnavailable object { type }` - - `"invalid_tool_input"` + - `type: "unavailable"` - - `"url_too_long"` + - `"unavailable"` - - `"url_not_allowed"` +### Beta Diagnostics Param - - `"url_not_in_prior_context"` +- `BetaDiagnosticsParam object { previous_message_id }` - - `"url_not_accessible"` + Request-level diagnostics. Currently carries the previous response + id for prompt-cache divergence reporting. - - `"unsupported_content_type"` + - `previous_message_id: optional string or null` - - `"too_many_requests"` + 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. - - `"max_uses_exceeded"` +### Beta Direct Caller - - `"unavailable"` +- `BetaDirectCaller object { type }` - - `type: "web_fetch_tool_result_error"` + Tool invocation directly from the model. - - `"web_fetch_tool_result_error"` + - `type: "direct"` - - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + - `"direct"` - - `content: BetaDocumentBlock` +### Beta Document Block - - `citations: BetaCitationConfig or null` +- `BetaDocumentBlock object { citations, source, title, type }` - Citation configuration for the document + - `citations: BetaCitationConfig or null` - - `enabled: boolean` + Citation configuration for the document - - `source: BetaBase64PDFSource or BetaPlainTextSource` + - `enabled: boolean` - - `BetaBase64PDFSource object { data, media_type, type }` + - `source: BetaBase64PDFSource or BetaPlainTextSource` - - `data: string` + - `BetaBase64PDFSource object { data, media_type, type }` - - `media_type: "application/pdf"` + - `data: string` - - `"application/pdf"` + - `media_type: "application/pdf"` - - `type: "base64"` + - `"application/pdf"` - - `"base64"` + - `type: "base64"` - - `BetaPlainTextSource object { data, media_type, type }` + - `"base64"` - - `data: string` + - `BetaPlainTextSource object { data, media_type, type }` - - `media_type: "text/plain"` + - `data: string` - - `"text/plain"` + - `media_type: "text/plain"` - - `type: "text"` + - `"text/plain"` - - `"text"` + - `type: "text"` - - `title: string or null` + - `"text"` - The title of the document + - `title: string or null` - - `type: "document"` + The title of the document - - `"document"` + - `type: "document"` - - `retrieved_at: string or null` + - `"document"` - ISO 8601 timestamp when the content was retrieved +### Beta Encrypted Code Execution Result Block - - `type: "web_fetch_result"` +- `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `"web_fetch_result"` + Code execution result with encrypted stdout for PFC + web_search results. - - `url: string` + - `content: array of BetaCodeExecutionOutputBlock` - Fetched content URL + - `file_id: string` - - `tool_use_id: string` + - `type: "code_execution_output"` - - `type: "web_fetch_tool_result"` + - `"code_execution_output"` - - `"web_fetch_tool_result"` + - `encrypted_stdout: string` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `return_code: number` - Tool invocation directly from the model. + - `stderr: string` - - `BetaDirectCaller object { type }` + - `type: "encrypted_code_execution_result"` - Tool invocation directly from the model. + - `"encrypted_code_execution_result"` - - `BetaServerToolCaller object { tool_id, type }` +### Beta Encrypted Code Execution Result Block Param - Tool invocation generated by a server-side tool. +- `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `BetaServerToolCaller20260120 object { tool_id, type }` + Code execution result with encrypted stdout for PFC + web_search results. - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + - `content: array of BetaCodeExecutionOutputBlockParam` - - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` + - `file_id: string` - - `BetaAdvisorToolResultError object { error_code, type }` + - `type: "code_execution_output"` - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + - `"code_execution_output"` - - `"max_uses_exceeded"` + - `encrypted_stdout: string` - - `"prompt_too_long"` + - `return_code: number` - - `"too_many_requests"` + - `stderr: string` - - `"overloaded"` + - `type: "encrypted_code_execution_result"` - - `"unavailable"` + - `"encrypted_code_execution_result"` - - `"execution_time_exceeded"` +### Beta Fallback Block - - `"model_not_found"` +- `BetaFallbackBlock object { from, to, trigger, type }` - - `type: "advisor_tool_result_error"` + Marks the point in `content` where one model's output gives way to the next. - - `"advisor_tool_result_error"` + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. - - `BetaAdvisorResultBlock object { stop_reason, text, type }` + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. - - `stop_reason: string or null` + - `from: BetaFallbackInfo` - 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. + 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. - - `text: string` + - `model: Model` - - `type: "advisor_result"` + The model that will complete your prompt. - - `"advisor_result"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `encrypted_content: string` + The model that will complete your prompt. - Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `stop_reason: string or null` + - `"claude-sonnet-5"` - The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + High-performance model for coding and agents - - `type: "advisor_redacted_result"` + - `"claude-fable-5"` - - `"advisor_redacted_result"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `tool_use_id: string` + - `"claude-mythos-5"` - - `type: "advisor_tool_result"` + Most capable model for cybersecurity and biology research - - `"advisor_tool_result"` + - `"claude-opus-5"` - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Powerful intelligence for long-running agents and coding - - `content: BetaCodeExecutionToolResultBlockContent` + - `"claude-opus-4-8"` - Code execution result with encrypted stdout for PFC + web_search results. + Powerful intelligence for long-running agents and coding - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `"claude-opus-4-7"` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Powerful intelligence for long-running agents and coding - - `"invalid_tool_input"` + - `"claude-mythos-preview"` - - `"unavailable"` + New class of intelligence, strongest in coding and cybersecurity - - `"too_many_requests"` + - `"claude-opus-4-6"` - - `"execution_time_exceeded"` + Powerful intelligence for long-running agents and coding - - `type: "code_execution_tool_result_error"` + - `"claude-sonnet-4-6"` - - `"code_execution_tool_result_error"` + Best combination of speed and intelligence - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"claude-haiku-4-5"` - - `content: array of BetaCodeExecutionOutputBlock` + Fastest model with near-frontier intelligence - - `file_id: string` + - `"claude-haiku-4-5-20251001"` - - `type: "code_execution_output"` + Fastest model with near-frontier intelligence - - `"code_execution_output"` + - `"claude-opus-4-5"` - - `return_code: number` + Powerful intelligence for long-running agents and coding - - `stderr: string` + - `"claude-opus-4-5-20251101"` - - `stdout: string` + Powerful intelligence for long-running agents and coding - - `type: "code_execution_result"` + - `"claude-sonnet-4-5"` - - `"code_execution_result"` + High-performance model for agents and coding - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"claude-sonnet-4-5-20250929"` - Code execution result with encrypted stdout for PFC + web_search results. + High-performance model for agents and coding - - `content: array of BetaCodeExecutionOutputBlock` + - `string` - - `file_id: string` + - `to: BetaFallbackInfo` - - `type: "code_execution_output"` + The fallback model producing the content that follows this block. Its `model` is always the canonical id. - - `encrypted_stdout: string` + - `trigger: BetaFallbackRefusalTrigger` - - `return_code: number` + What caused the `from` model to hand over at this hop. - - `stderr: string` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `type: "encrypted_code_execution_result"` + The policy category that triggered a refusal. - - `"encrypted_code_execution_result"` + - `"cyber"` - - `tool_use_id: string` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `type: "code_execution_tool_result"` + - `"bio"` - - `"code_execution_tool_result"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"frontier_llm"` - - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + 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. - - `BetaBashCodeExecutionToolResultError object { error_code, type }` + - `"reasoning_extraction"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + 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). - - `"invalid_tool_input"` + - `"general_harms"` - - `"unavailable"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `"too_many_requests"` + - `type: "refusal"` - - `"execution_time_exceeded"` + - `"refusal"` - - `"output_file_too_large"` + - `type: "fallback"` - - `type: "bash_code_execution_tool_result_error"` + - `"fallback"` - - `"bash_code_execution_tool_result_error"` +### Beta Fallback Block Param - - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` +- `BetaFallbackBlockParam object { from, to, type, trigger }` - - `content: array of BetaBashCodeExecutionOutputBlock` + A `fallback` block echoed back from a prior response. - - `file_id: string` + Accepted in `messages[].content` and not rendered into the prompt; not + validated against the request's `fallbacks` chain or top-level `model`. - - `type: "bash_code_execution_output"` + Echo the assistant turn back verbatim, including this block in its + original position. The block marks the boundary between content produced + before and after a fallback hop, and the server relies on that boundary + to validate the turn: when thinking runs flank the boundary, omitting + the block merges them into one span the server cannot validate (the + request is rejected), and moving it into the middle of a single run is + likewise rejected; between non-thinking blocks the block's placement has + no validation effect. - - `"bash_code_execution_output"` + - `from: BetaFallbackInfoParam` - - `return_code: number` + Identifies one hop of a fallback transition. - - `stderr: string` + - `model: Model` - - `stdout: string` + The model that will complete your prompt. - - `type: "bash_code_execution_result"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"bash_code_execution_result"` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `tool_use_id: string` + The model that will complete your prompt. - - `type: "bash_code_execution_tool_result"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"bash_code_execution_tool_result"` + - `"claude-sonnet-5"` - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + High-performance model for coding and agents - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + - `"claude-fable-5"` - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + Next generation of intelligence for the hardest knowledge work and coding problems - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `"claude-mythos-5"` - - `"invalid_tool_input"` + Most capable model for cybersecurity and biology research - - `"unavailable"` + - `"claude-opus-5"` - - `"too_many_requests"` + Powerful intelligence for long-running agents and coding - - `"execution_time_exceeded"` + - `"claude-opus-4-8"` - - `"file_not_found"` + Powerful intelligence for long-running agents and coding - - `error_message: string or null` + - `"claude-opus-4-7"` - - `type: "text_editor_code_execution_tool_result_error"` + Powerful intelligence for long-running agents and coding - - `"text_editor_code_execution_tool_result_error"` + - `"claude-mythos-preview"` - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + New class of intelligence, strongest in coding and cybersecurity - - `content: string` + - `"claude-opus-4-6"` - - `file_type: "text" or "image" or "pdf"` + Powerful intelligence for long-running agents and coding - - `"text"` + - `"claude-sonnet-4-6"` - - `"image"` + Best combination of speed and intelligence - - `"pdf"` + - `"claude-haiku-4-5"` - - `num_lines: number or null` + Fastest model with near-frontier intelligence - - `start_line: number or null` + - `"claude-haiku-4-5-20251001"` - - `total_lines: number or null` + Fastest model with near-frontier intelligence - - `type: "text_editor_code_execution_view_result"` + - `"claude-opus-4-5"` - - `"text_editor_code_execution_view_result"` + Powerful intelligence for long-running agents and coding - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `"claude-opus-4-5-20251101"` - - `is_file_update: boolean` + Powerful intelligence for long-running agents and coding - - `type: "text_editor_code_execution_create_result"` + - `"claude-sonnet-4-5"` - - `"text_editor_code_execution_create_result"` + High-performance model for agents and coding - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `"claude-sonnet-4-5-20250929"` - - `lines: array of string or null` + High-performance model for agents and coding - - `new_lines: number or null` + - `string` - - `new_start: number or null` + - `to: BetaFallbackInfoParam` - - `old_lines: number or null` + Identifies one hop of a fallback transition. - - `old_start: number or null` + - `type: "fallback"` - - `type: "text_editor_code_execution_str_replace_result"` + - `"fallback"` - - `"text_editor_code_execution_str_replace_result"` + - `trigger: optional unknown` - - `tool_use_id: string` + The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. - - `type: "text_editor_code_execution_tool_result"` +### Beta Fallback Credit Not Applied - - `"text_editor_code_execution_tool_result"` +- `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + No reprice was applied; `reason` says why. - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + Why the reprice was not applied. - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. - - `"invalid_tool_input"` + - `"body_mismatch"` - - `"unavailable"` + - `"continuation_excluded"` - - `"too_many_requests"` + - `"continuation_only"` - - `"execution_time_exceeded"` + - `"expired"` - - `error_message: string or null` + - `"invalid_target_model"` - - `type: "tool_search_tool_result_error"` + - `"not_enabled"` - - `"tool_search_tool_result_error"` + - `"reprice_unavailable"` - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + - `"temporarily_unavailable"` - - `tool_references: array of BetaToolReferenceBlock` + - `"variant_fields_present"` - - `tool_name: string` + - `"wrong_organization"` - - `type: "tool_reference"` + - `"wrong_platform"` - - `"tool_reference"` + - `"wrong_workspace"` - - `type: "tool_search_tool_search_result"` + - `type: "not_applied"` - - `"tool_search_tool_search_result"` + - `"not_applied"` - - `tool_use_id: string` + - `remove_to_redeem: optional array of string or null` - - `type: "tool_search_tool_result"` + Request fields to remove before retrying, so the retry can redeem this + token. - - `"tool_search_tool_result"` + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` +### Beta Fallback Credit Redeemed - - `id: string` +- `BetaFallbackCreditRedeemed object { type }` - - `input: map[unknown]` + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. - - `name: string` + - `type: "redeemed"` - The name of the MCP tool + - `"redeemed"` - - `server_name: string` +### Beta Fallback Credit Token Param - The name of the MCP server +- `BetaFallbackCreditTokenParam object { token, mode }` - - `type: "mcp_tool_use"` + Object form of `fallback_credit_token`: the token plus a redemption + mode. - - `"mcp_tool_use"` + Requires `anthropic-beta: fallback-credit-2026-07-01`; without that + header the field accepts the bare string only. The bare string and the + mode-less object are equivalent (both select `strict`), so wrapping + an existing token changes nothing by itself. - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `token: string` - - `content: string or array of BetaTextBlock` + The opaque `fallback_credit_token` from a prior refusal's `stop_details` — the same string the bare-string form carries. - - `string` + - `mode: optional "strict" or "best_effort"` - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + 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`. - - `citations: array of BetaTextCitation or null` + - `"strict"` - Citations supporting the text block. + - `"best_effort"` - 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`. +### Beta Fallback Credit Usage - - `text: string` +- `BetaFallbackCreditUsage object { status }` - - `type: "text"` + Outcome of the `fallback_credit_token` presented on this request. - - `is_error: boolean` + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` - - `tool_use_id: string` + Whether the fallback-credit reprice was applied to this response's billing. - - `type: "mcp_tool_result"` + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. - - `"mcp_tool_result"` + - `BetaFallbackCreditRedeemed object { type }` - - `BetaContainerUploadBlock object { file_id, type }` + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. - Response model for a file uploaded to the container. + - `type: "redeemed"` - - `file_id: string` + - `"redeemed"` - - `type: "container_upload"` + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` - - `"container_upload"` + No reprice was applied; `reason` says why. - - `BetaCompactionBlock object { content, encrypted_content, type }` + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` - A compaction block returned when autocompact is triggered. + Why the reprice was not applied. - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. - - `content: string or null` + - `"body_mismatch"` - Summary of compacted content, or null if compaction failed + - `"continuation_excluded"` - - `encrypted_content: string or null` + - `"continuation_only"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `"expired"` - - `type: "compaction"` + - `"invalid_target_model"` - - `"compaction"` + - `"not_enabled"` - - `BetaFallbackBlock object { from, to, trigger, type }` + - `"reprice_unavailable"` - Marks the point in `content` where one model's output gives way to the next. + - `"temporarily_unavailable"` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + - `"variant_fields_present"` - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `"wrong_organization"` - - `from: BetaFallbackInfo` + - `"wrong_platform"` - 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. + - `"wrong_workspace"` - - `model: Model` + - `type: "not_applied"` - The model that will complete your prompt. + - `"not_applied"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `remove_to_redeem: optional array of string or null` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + Request fields to remove before retrying, so the retry can redeem this + token. - The model that will complete your prompt. + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. +### Beta Fallback Info - - `"claude-sonnet-5"` +- `BetaFallbackInfo object { model }` - High-performance model for coding and agents + Identifies one hop of a fallback transition. - - `"claude-fable-5"` + - `model: Model` - Next generation of intelligence for the hardest knowledge work and coding problems + The model that will complete your prompt. - - `"claude-mythos-5"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - Most capable model for cybersecurity and biology research + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `"claude-opus-5"` + The model that will complete your prompt. - Powerful intelligence for long-running agents and coding + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"claude-opus-4-8"` + - `"claude-sonnet-5"` - Powerful intelligence for long-running agents and coding + High-performance model for coding and agents - - `"claude-opus-4-7"` + - `"claude-fable-5"` - Powerful intelligence for long-running agents and coding + Next generation of intelligence for the hardest knowledge work and coding problems - - `"claude-mythos-preview"` + - `"claude-mythos-5"` - New class of intelligence, strongest in coding and cybersecurity + Most capable model for cybersecurity and biology research - - `"claude-opus-4-6"` + - `"claude-opus-5"` - Powerful intelligence for long-running agents and coding + Powerful intelligence for long-running agents and coding - - `"claude-sonnet-4-6"` + - `"claude-opus-4-8"` - Best combination of speed and intelligence + Powerful intelligence for long-running agents and coding - - `"claude-haiku-4-5"` + - `"claude-opus-4-7"` - Fastest model with near-frontier intelligence + Powerful intelligence for long-running agents and coding - - `"claude-haiku-4-5-20251001"` + - `"claude-mythos-preview"` - Fastest model with near-frontier intelligence + New class of intelligence, strongest in coding and cybersecurity - - `"claude-opus-4-5"` + - `"claude-opus-4-6"` - Powerful intelligence for long-running agents and coding + Powerful intelligence for long-running agents and coding - - `"claude-opus-4-5-20251101"` + - `"claude-sonnet-4-6"` - Powerful intelligence for long-running agents and coding + Best combination of speed and intelligence - - `"claude-sonnet-4-5"` + - `"claude-haiku-4-5"` - High-performance model for agents and coding + Fastest model with near-frontier intelligence - - `"claude-sonnet-4-5-20250929"` + - `"claude-haiku-4-5-20251001"` - High-performance model for agents and coding + Fastest model with near-frontier intelligence - - `string` + - `"claude-opus-4-5"` - - `to: BetaFallbackInfo` + Powerful intelligence for long-running agents and coding - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + - `"claude-opus-4-5-20251101"` - - `trigger: BetaFallbackRefusalTrigger` + Powerful intelligence for long-running agents and coding - What caused the `from` model to hand over at this hop. + - `"claude-sonnet-4-5"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + High-performance model for agents and coding - The policy category that triggered a refusal. + - `"claude-sonnet-4-5-20250929"` - - `"cyber"` + High-performance model for agents and coding - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `string` - - `"bio"` +### Beta Fallback Info Param - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. +- `BetaFallbackInfoParam object { model }` - - `"frontier_llm"` + Identifies one hop of a fallback transition. - 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. + - `model: Model` - - `"reasoning_extraction"` + The model that will complete your prompt. - 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). + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"general_harms"` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + The model that will complete your prompt. - - `type: "refusal"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"refusal"` + - `"claude-sonnet-5"` - - `type: "fallback"` + High-performance model for coding and agents - - `"fallback"` + - `"claude-fable-5"` - - `context_management: BetaContextManagementResponse or null` + Next generation of intelligence for the hardest knowledge work and coding problems - Context management response. + - `"claude-mythos-5"` - Information about context management strategies applied during the request. + Most capable model for cybersecurity and biology research - - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + - `"claude-opus-5"` - List of context management edits that were applied. + Powerful intelligence for long-running agents and coding - - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + - `"claude-opus-4-8"` - - `cleared_input_tokens: number` + Powerful intelligence for long-running agents and coding - Number of input tokens cleared by this edit. + - `"claude-opus-4-7"` - - `cleared_tool_uses: number` + Powerful intelligence for long-running agents and coding - Number of tool uses that were cleared. + - `"claude-mythos-preview"` - - `type: "clear_tool_uses_20250919"` + New class of intelligence, strongest in coding and cybersecurity - The type of context management edit applied. + - `"claude-opus-4-6"` - - `"clear_tool_uses_20250919"` + Powerful intelligence for long-running agents and coding - - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `"claude-sonnet-4-6"` - - `cleared_input_tokens: number` + Best combination of speed and intelligence - Number of input tokens cleared by this edit. + - `"claude-haiku-4-5"` - - `cleared_thinking_turns: number` + Fastest model with near-frontier intelligence - Number of thinking turns that were cleared. + - `"claude-haiku-4-5-20251001"` - - `type: "clear_thinking_20251015"` + Fastest model with near-frontier intelligence - The type of context management edit applied. + - `"claude-opus-4-5"` - - `"clear_thinking_20251015"` + Powerful intelligence for long-running agents and coding - - `diagnostics: BetaDiagnostics or null` + - `"claude-opus-4-5-20251101"` - Response envelope for request-level diagnostics. Present (possibly - null) whenever the caller supplied `diagnostics` on the request. + Powerful intelligence for long-running agents and coding - - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + - `"claude-sonnet-4-5"` - 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. + High-performance model for agents and coding - - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + - `"claude-sonnet-4-5-20250929"` - - `cache_missed_input_tokens: number` + High-performance model for agents and coding - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `string` - - `type: "model_changed"` +### Beta Fallback Message Iteration Usage - - `"model_changed"` +- `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + Token usage for the fallback-model attempt of a server-side fallback request. - - `cache_missed_input_tokens: number` + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `cache_creation: BetaCacheCreation or null` - - `type: "system_changed"` + Breakdown of cached tokens by TTL - - `"system_changed"` + - `ephemeral_1h_input_tokens: number` - - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + The number of input tokens used to create the 1 hour cache entry. - - `cache_missed_input_tokens: number` + - `ephemeral_5m_input_tokens: number` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + The number of input tokens used to create the 5 minute cache entry. - - `type: "tools_changed"` + - `cache_creation_input_tokens: number` - - `"tools_changed"` + The number of input tokens used to create the cache entry. - - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + - `cache_read_input_tokens: number` - - `cache_missed_input_tokens: number` + The number of input tokens read from the cache. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `input_tokens: number` - - `type: "messages_changed"` + The number of input tokens which were used. - - `"messages_changed"` + - `model: Model` - - `BetaCacheMissPreviousMessageNotFound object { type }` + The model that will complete your prompt. - - `type: "previous_message_not_found"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"previous_message_not_found"` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `BetaCacheMissUnavailable object { type }` + The model that will complete your prompt. - - `type: "unavailable"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"unavailable"` + - `"claude-sonnet-5"` - - `model: Model` + High-performance model for coding and agents - The model that will complete your prompt. + - `"claude-fable-5"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Next generation of intelligence for the hardest knowledge work and coding problems - - `role: "assistant"` + - `"claude-mythos-5"` - Conversational role of the generated message. + Most capable model for cybersecurity and biology research - This will always be `"assistant"`. + - `"claude-opus-5"` - - `"assistant"` + Powerful intelligence for long-running agents and coding - - `stop_details: BetaRefusalStopDetails or null` + - `"claude-opus-4-8"` - Structured information about a refusal. + Powerful intelligence for long-running agents and coding - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `"claude-opus-4-7"` - The policy category that triggered a refusal. + Powerful intelligence for long-running agents and coding - - `"cyber"` + - `"claude-mythos-preview"` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + New class of intelligence, strongest in coding and cybersecurity - - `"bio"` + - `"claude-opus-4-6"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + Powerful intelligence for long-running agents and coding - - `"frontier_llm"` + - `"claude-sonnet-4-6"` - 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. + Best combination of speed and intelligence - - `"reasoning_extraction"` + - `"claude-haiku-4-5"` - 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). + Fastest model with near-frontier intelligence - - `"general_harms"` + - `"claude-haiku-4-5-20251001"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + Fastest model with near-frontier intelligence - - `explanation: string or null` + - `"claude-opus-4-5"` - Human-readable explanation of the refusal. + Powerful intelligence for long-running agents and coding - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `"claude-opus-4-5-20251101"` - - `fallback_credit_token: string or null` + Powerful intelligence for long-running agents and coding - Opaque code that refunds the cache-miss cost when retrying this refused - request on the fallback model. Pass it as `fallback_credit_token` on the - retry request. Expires 5 minutes after the refusal. + - `"claude-sonnet-4-5"` - The retry is sent either with the same request body (`system`, `messages`, - `tools`, and other render-shaping fields), or with the same body plus one - appended `assistant` message whose content is the partial text (with any - trailing whitespace stripped from the final text block) and paired - server-tool blocks from this refusal — which also authorizes that - appended turn as an assistant-prefill continuation on models that otherwise - disallow prefill. A token minted mid-server-tool-loop whose partial content - was continuable may only be redeemed the second way — if a same-body retry - is rejected with a 400 saying the token must be redeemed by continuing the - partial response, retry the second way instead. Either way: same workspace, - same platform; a mismatch is a 400. Resending a token for an already-warm - prefix is permitted but yields no additional credit. + High-performance model for agents and coding - `null` when the refused model isn't eligible for a fallback credit. + - `"claude-sonnet-4-5-20250929"` - - `fallback_has_prefill_claim: boolean or null` + High-performance model for agents and coding - Whether the accompanying `fallback_credit_token` may be redeemed with the - appended-assistant retry form. Only set when `fallback_credit_token` is - present. + - `string` - `true`: retry by resending the same request body plus one appended - `assistant` message whose content is this response's `content` with any - trailing whitespace stripped from the final text block and unpaired - `tool_use` blocks omitted (the same appended-turn shape described on - `fallback_credit_token`), with the token attached. `false`: retry by - resending the original request body unchanged, with the token attached — - the appended-assistant form is not available for this refusal (no - continuable partial content, or the request uses `output_format` or a - `tool_choice` that forces tool use). One exception: when the request used - `output_format` or a forced `tool_choice` and the refusal arrived after - server tools (including MCP connector tools) had already executed, the - token may not be redeemable by either retry form; if the exact-body retry - is then rejected with a 400 saying the token must be redeemed by - continuing the partial response, discard the token and retry without it. + - `output_tokens: number` - Advisory: if an appended-assistant retry is rejected with a 400 despite - `true`, fall back to resending the original request body with the token. + The number of output tokens which were used. - - `recommended_model: string or null` + - `type: "fallback_message"` - 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. + Usage for the fallback-model attempt that served the response - - `type: "refusal"` + - `"fallback_message"` - - `"refusal"` +### Beta Fallback Param - - `stop_reason: BetaStopReason or null` +- `BetaFallbackParam object { model, max_tokens, output_config, 2 more }` - The reason that we stopped. + One entry in the `fallbacks` chain on a `/v1/messages` request. - This may be one the following values: + `model` is required. The override fields (`max_tokens`, `thinking`, + `output_config`, and `speed`) set the corresponding parameter for this + attempt only and are validated as if the request were made to `model`. + Any other key is rejected at parse time. - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `model: Model` - 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. + The model that will complete your prompt. - - `"end_turn"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"max_tokens"` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `"stop_sequence"` + The model that will complete your prompt. - - `"tool_use"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"pause_turn"` + - `"claude-sonnet-5"` - - `"compaction"` + High-performance model for coding and agents - - `"refusal"` + - `"claude-fable-5"` - - `"model_context_window_exceeded"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `stop_sequence: string or null` + - `"claude-mythos-5"` - Which custom stop sequence was generated, if any. + Most capable model for cybersecurity and biology research - This value will be a non-null string if one of your custom stop sequences was generated. + - `"claude-opus-5"` - - `type: "message"` + Powerful intelligence for long-running agents and coding - Object type. + - `"claude-opus-4-8"` - For Messages, this is always `"message"`. + Powerful intelligence for long-running agents and coding - - `"message"` + - `"claude-opus-4-7"` - - `usage: BetaUsage` + Powerful intelligence for long-running agents and coding - Billing and rate-limit usage. + - `"claude-mythos-preview"` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + New class of intelligence, strongest in coding and cybersecurity - 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. + - `"claude-opus-4-6"` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + Powerful intelligence for long-running agents and coding - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `"claude-sonnet-4-6"` - - `cache_creation: BetaCacheCreation or null` + Best combination of speed and intelligence - Breakdown of cached tokens by TTL + - `"claude-haiku-4-5"` - - `ephemeral_1h_input_tokens: number` + Fastest model with near-frontier intelligence - The number of input tokens used to create the 1 hour cache entry. + - `"claude-haiku-4-5-20251001"` - - `ephemeral_5m_input_tokens: number` + Fastest model with near-frontier intelligence - The number of input tokens used to create the 5 minute cache entry. + - `"claude-opus-4-5"` - - `cache_creation_input_tokens: number or null` + Powerful intelligence for long-running agents and coding - The number of input tokens used to create the cache entry. + - `"claude-opus-4-5-20251101"` - - `cache_read_input_tokens: number or null` + Powerful intelligence for long-running agents and coding - The number of input tokens read from the cache. + - `"claude-sonnet-4-5"` - - `fallback_credit: BetaFallbackCreditUsage or null` + High-performance model for agents and coding - Outcome of the `fallback_credit_token` presented on this request. + - `"claude-sonnet-4-5-20250929"` - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + High-performance model for agents and coding - Whether the fallback-credit reprice was applied to this response's billing. + - `string` - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + - `max_tokens: optional number or null` - - `BetaFallbackCreditRedeemed object { type }` + - `output_config: optional BetaOutputConfig or null` - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + - `effort: optional "low" or "medium" or "high" or 2 more or null` - - `type: "redeemed"` + All possible effort levels. - - `"redeemed"` + - `"low"` - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `"medium"` - No reprice was applied; `reason` says why. + - `"high"` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `"xhigh"` - Why the reprice was not applied. + - `"max"` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `format: optional BetaJSONOutputFormat or null` - - `"body_mismatch"` + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) - - `"continuation_excluded"` + - `schema: map[unknown]` - - `"continuation_only"` + The JSON schema of the format - - `"expired"` + - `type: "json_schema"` - - `"invalid_target_model"` + - `"json_schema"` - - `"not_enabled"` + - `task_budget: optional BetaTokenTaskBudget or null` - - `"reprice_unavailable"` + User-configurable total token budget across contexts. - - `"temporarily_unavailable"` + - `total: number` - - `"variant_fields_present"` + Total token budget across all contexts in the session. - - `"wrong_organization"` + - `type: "tokens"` - - `"wrong_platform"` + The budget type. Currently only 'tokens' is supported. - - `"wrong_workspace"` + - `"tokens"` - - `type: "not_applied"` + - `remaining: optional number or null` - - `"not_applied"` + Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. - - `remove_to_redeem: optional array of string or null` + - `speed: optional "standard" or "fast" or null` - Request fields to remove before retrying, so the retry can redeem this - token. + 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. - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `"standard"` - - `inference_geo: string or null` + - `"fast"` - The geographic region where inference was performed for this request. + - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null` - - `input_tokens: number` + - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` - The number of input tokens which were used. + - `budget_tokens: number` - - `iterations: BetaIterationsUsage or null` + 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. - Per-iteration token usage breakdown. + Must be ≥1024 and less than `max_tokens`. - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + - `type: "enabled"` - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `"enabled"` - Token usage for a sampling iteration. + - `display: optional "summarized" or "omitted" or null` - - `cache_creation: BetaCacheCreation or null` + 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`. - Breakdown of cached tokens by TTL + - `"summarized"` - - `cache_creation_input_tokens: number` + - `"omitted"` - The number of input tokens used to create the cache entry. + - `BetaThinkingConfigDisabled object { type }` - - `cache_read_input_tokens: number` + - `type: "disabled"` - The number of input tokens read from the cache. + - `"disabled"` - - `input_tokens: number` + - `BetaThinkingConfigAdaptive object { type, display }` - The number of input tokens which were used. + - `type: "adaptive"` - - `model: Model` + - `"adaptive"` - The model that will complete your prompt. + - `display: optional "summarized" or "omitted" or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + 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`. - - `output_tokens: number` + - `"summarized"` - The number of output tokens which were used. + - `"omitted"` - - `type: "message"` +### Beta Fallback Refusal Trigger - Usage for a sampling iteration +- `BetaFallbackRefusalTrigger object { category, type }` - - `"message"` + The `from` model declined for policy reasons. - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - Token usage for a compaction iteration. + The policy category that triggered a refusal. - - `cache_creation: BetaCacheCreation or null` + - `"cyber"` - Breakdown of cached tokens by TTL + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `cache_creation_input_tokens: number` + - `"bio"` - The number of input tokens used to create the cache entry. + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `cache_read_input_tokens: number` + - `"frontier_llm"` - The number of input tokens read from the cache. + 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. - - `input_tokens: number` + - `"reasoning_extraction"` - The number of input tokens which were used. + 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). - - `output_tokens: number` + - `"general_harms"` - The number of output tokens which were used. + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `type: "compaction"` + - `type: "refusal"` - Usage for a compaction iteration + - `"refusal"` - - `"compaction"` +### Beta Fallbacks Param - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` +- `BetaFallbacksParam = array of BetaFallbackParam or "default"` - Token usage for an advisor sub-inference iteration. + 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. - - `cache_creation: BetaCacheCreation or null` + - `array of BetaFallbackParam` - Breakdown of cached tokens by TTL + - `model: Model` - - `cache_creation_input_tokens: number` + The model that will complete your prompt. - The number of input tokens used to create the cache entry. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `cache_read_input_tokens: number` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - The number of input tokens read from the cache. + The model that will complete your prompt. - - `input_tokens: number` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - The number of input tokens which were used. + - `"claude-sonnet-5"` - - `model: Model` + High-performance model for coding and agents - The model that will complete your prompt. + - `"claude-fable-5"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Next generation of intelligence for the hardest knowledge work and coding problems - - `output_tokens: number` + - `"claude-mythos-5"` - The number of output tokens which were used. + Most capable model for cybersecurity and biology research - - `type: "advisor_message"` + - `"claude-opus-5"` - Usage for an advisor sub-inference iteration + Powerful intelligence for long-running agents and coding - - `"advisor_message"` + - `"claude-opus-4-8"` - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + Powerful intelligence for long-running agents and coding - Token usage for the fallback-model attempt of a server-side fallback request. + - `"claude-opus-4-7"` - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + Powerful intelligence for long-running agents and coding - - `cache_creation: BetaCacheCreation or null` + - `"claude-mythos-preview"` - Breakdown of cached tokens by TTL + New class of intelligence, strongest in coding and cybersecurity - - `cache_creation_input_tokens: number` + - `"claude-opus-4-6"` - The number of input tokens used to create the cache entry. + Powerful intelligence for long-running agents and coding - - `cache_read_input_tokens: number` + - `"claude-sonnet-4-6"` - The number of input tokens read from the cache. + Best combination of speed and intelligence - - `input_tokens: number` + - `"claude-haiku-4-5"` - The number of input tokens which were used. + Fastest model with near-frontier intelligence - - `model: Model` + - `"claude-haiku-4-5-20251001"` - The model that will complete your prompt. + Fastest model with near-frontier intelligence - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"claude-opus-4-5"` - - `output_tokens: number` + Powerful intelligence for long-running agents and coding - The number of output tokens which were used. + - `"claude-opus-4-5-20251101"` - - `type: "fallback_message"` + Powerful intelligence for long-running agents and coding - Usage for the fallback-model attempt that served the response + - `"claude-sonnet-4-5"` - - `"fallback_message"` + High-performance model for agents and coding - - `output_tokens: number` + - `"claude-sonnet-4-5-20250929"` - The number of output tokens which were used. + High-performance model for agents and coding - - `output_tokens_details: BetaOutputTokensDetails or null` + - `string` - Breakdown of output tokens by category. + - `max_tokens: optional number or null` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `output_config: optional BetaOutputConfig or null` - - `thinking_tokens: number` + - `effort: optional "low" or "medium" or "high" or 2 more or null` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + All possible effort levels. - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `"low"` - - `server_tool_use: BetaServerToolUsage or null` + - `"medium"` - The number of server tool requests. + - `"high"` - - `web_fetch_requests: number` + - `"xhigh"` - The number of web fetch tool requests. + - `"max"` - - `web_search_requests: number` + - `format: optional BetaJSONOutputFormat or null` - The number of web search tool requests. + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) - - `service_tier: "standard" or "priority" or "batch" or null` + - `schema: map[unknown]` - If the request used the priority, standard, or batch tier. + The JSON schema of the format - - `"standard"` + - `type: "json_schema"` - - `"priority"` + - `"json_schema"` - - `"batch"` + - `task_budget: optional BetaTokenTaskBudget or null` - - `speed: "standard" or "fast" or null` + User-configurable total token budget across contexts. - 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. + - `total: number` - - `"standard"` + Total token budget across all contexts in the session. - - `"fast"` + - `type: "tokens"` -### Beta Message Delta Usage + The budget type. Currently only 'tokens' is supported. -- `BetaMessageDeltaUsage object { cache_creation_input_tokens, cache_read_input_tokens, fallback_credit, 5 more }` + - `"tokens"` - - `cache_creation_input_tokens: number or null` + - `remaining: optional number or null` - The cumulative number of input tokens used to create the cache entry. + Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. - - `cache_read_input_tokens: number or null` + - `speed: optional "standard" or "fast" or null` - The cumulative number of input tokens read from the cache. + 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. - - `fallback_credit: BetaFallbackCreditUsage or null` + - `"standard"` - Outcome of the `fallback_credit_token` presented on this request. + - `"fast"` - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + - `thinking: optional BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive or null` - Whether the fallback-credit reprice was applied to this response's billing. + - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + - `budget_tokens: number` - - `BetaFallbackCreditRedeemed object { type }` + 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. - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + Must be ≥1024 and less than `max_tokens`. - - `type: "redeemed"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"redeemed"` + - `type: "enabled"` - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `"enabled"` - No reprice was applied; `reason` says why. + - `display: optional "summarized" or "omitted" or null` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + 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`. - Why the reprice was not applied. + - `"summarized"` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `"omitted"` - - `"body_mismatch"` + - `BetaThinkingConfigDisabled object { type }` - - `"continuation_excluded"` + - `type: "disabled"` - - `"continuation_only"` + - `"disabled"` - - `"expired"` + - `BetaThinkingConfigAdaptive object { type, display }` - - `"invalid_target_model"` + - `type: "adaptive"` - - `"not_enabled"` + - `"adaptive"` - - `"reprice_unavailable"` + - `display: optional "summarized" or "omitted" or null` - - `"temporarily_unavailable"` + 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`. - - `"variant_fields_present"` + - `"summarized"` - - `"wrong_organization"` + - `"omitted"` - - `"wrong_platform"` + - `Default = "default"` - - `"wrong_workspace"` + - `"default"` - - `type: "not_applied"` +### Beta File Document Source - - `"not_applied"` +- `BetaFileDocumentSource object { file_id, type }` - - `remove_to_redeem: optional array of string or null` + - `file_id: string` - Request fields to remove before retrying, so the retry can redeem this - token. + - `type: "file"` - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `"file"` - - `input_tokens: number or null` +### Beta File Image Source - The cumulative number of input tokens which were used. +- `BetaFileImageSource object { file_id, type }` - - `iterations: BetaIterationsUsage or null` + - `file_id: string` - Per-iteration token usage breakdown. + - `type: "file"` - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + - `"file"` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops +### Beta Image Block Param - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` +- `BetaImageBlockParam object { source, type, cache_control, transformations }` - Token usage for a sampling iteration. + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - - `cache_creation: BetaCacheCreation or null` + - `BetaBase64ImageSource object { data, media_type, type }` - Breakdown of cached tokens by TTL + - `data: string` - - `ephemeral_1h_input_tokens: number` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - The number of input tokens used to create the 1 hour cache entry. + - `"image/jpeg"` - - `ephemeral_5m_input_tokens: number` + - `"image/png"` - The number of input tokens used to create the 5 minute cache entry. + - `"image/gif"` - - `cache_creation_input_tokens: number` + - `"image/webp"` - The number of input tokens used to create the cache entry. + - `type: "base64"` - - `cache_read_input_tokens: number` + - `"base64"` - The number of input tokens read from the cache. + - `BetaURLImageSource object { type, url }` - - `input_tokens: number` + - `type: "url"` - The number of input tokens which were used. + - `"url"` - - `model: Model` + - `url: string` - The model that will complete your prompt. + - `BetaFileImageSource object { file_id, type }` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `file_id: string` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "file"` - The model that will complete your prompt. + - `"file"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "image"` - - `"claude-sonnet-5"` + - `"image"` - High-performance model for coding and agents + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-fable-5"` + Create a cache control breakpoint at this content block. - Next generation of intelligence for the hardest knowledge work and coding problems + - `type: "ephemeral"` - - `"claude-mythos-5"` + - `"ephemeral"` - Most capable model for cybersecurity and biology research + - `ttl: optional "5m" or "1h"` - - `"claude-opus-5"` + The time-to-live for the cache control breakpoint. - Powerful intelligence for long-running agents and coding + This may be one the following values: - - `"claude-opus-4-8"` + - `5m`: 5 minutes + - `1h`: 1 hour - Powerful intelligence for long-running agents and coding + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"claude-opus-4-7"` + - `"5m"` - Powerful intelligence for long-running agents and coding + - `"1h"` - - `"claude-mythos-preview"` + - `transformations: optional BetaImageTransformationsParam or null` - New class of intelligence, strongest in coding and cybersecurity + 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. - - `"claude-opus-4-6"` + - `oversized_image: optional "downsize" or "error"` - Powerful intelligence for long-running agents and coding + 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. - - `"claude-sonnet-4-6"` + - `"downsize"` - Best combination of speed and intelligence + - `"error"` - - `"claude-haiku-4-5"` +### Beta Image Transformations Param - Fastest model with near-frontier intelligence +- `BetaImageTransformationsParam object { oversized_image }` - - `"claude-haiku-4-5-20251001"` + 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. - Fastest model with near-frontier intelligence + - `oversized_image: optional "downsize" or "error"` - - `"claude-opus-4-5"` + 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. - Powerful intelligence for long-running agents and coding + - `"downsize"` - - `"claude-opus-4-5-20251101"` + - `"error"` - Powerful intelligence for long-running agents and coding +### Beta Input JSON Delta - - `"claude-sonnet-4-5"` +- `BetaInputJSONDelta object { partial_json, type }` - High-performance model for agents and coding + - `partial_json: string` - - `"claude-sonnet-4-5-20250929"` + - `type: "input_json_delta"` - High-performance model for agents and coding + - `"input_json_delta"` - - `string` +### Beta Input Tokens Clear At Least - - `output_tokens: number` +- `BetaInputTokensClearAtLeast object { type, value }` - The number of output tokens which were used. + - `type: "input_tokens"` - - `type: "message"` + - `"input_tokens"` - Usage for a sampling iteration + - `value: number` - - `"message"` +### Beta Input Tokens Trigger - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` +- `BetaInputTokensTrigger object { type, value }` - Token usage for a compaction iteration. + - `type: "input_tokens"` - - `cache_creation: BetaCacheCreation or null` + - `"input_tokens"` - Breakdown of cached tokens by TTL + - `value: number` - - `cache_creation_input_tokens: number` +### Beta Iterations Usage - The number of input tokens used to create the cache entry. +- `BetaIterationsUsage = array of BetaMessageIterationUsage or BetaCompactionIterationUsage or BetaAdvisorMessageIterationUsage or BetaFallbackMessageIterationUsage` - - `cache_read_input_tokens: number` + Per-iteration token usage breakdown. - The number of input tokens read from the cache. + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: - - `input_tokens: number` + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops - The number of input tokens which were used. + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `output_tokens: number` + Token usage for a sampling iteration. - The number of output tokens which were used. + - `cache_creation: BetaCacheCreation or null` - - `type: "compaction"` + Breakdown of cached tokens by TTL - Usage for a compaction iteration + - `ephemeral_1h_input_tokens: number` - - `"compaction"` + The number of input tokens used to create the 1 hour cache entry. - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `ephemeral_5m_input_tokens: number` - Token usage for an advisor sub-inference iteration. + The number of input tokens used to create the 5 minute cache entry. - - `cache_creation: BetaCacheCreation or null` + - `cache_creation_input_tokens: number` - Breakdown of cached tokens by TTL + The number of input tokens used to create the cache entry. - - `cache_creation_input_tokens: number` + - `cache_read_input_tokens: number` - The number of input tokens used to create the cache entry. + The number of input tokens read from the cache. - - `cache_read_input_tokens: number` + - `input_tokens: number` - The number of input tokens read from the cache. + The number of input tokens which were used. - - `input_tokens: number` + - `model: Model` - The number of input tokens which were used. + The model that will complete your prompt. - - `model: Model` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` The model that will complete your prompt. See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `output_tokens: number` + - `"claude-sonnet-5"` - The number of output tokens which were used. + High-performance model for coding and agents - - `type: "advisor_message"` + - `"claude-fable-5"` - Usage for an advisor sub-inference iteration + Next generation of intelligence for the hardest knowledge work and coding problems - - `"advisor_message"` + - `"claude-mythos-5"` - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + Most capable model for cybersecurity and biology research - Token usage for the fallback-model attempt of a server-side fallback request. + - `"claude-opus-5"` - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + Powerful intelligence for long-running agents and coding - - `cache_creation: BetaCacheCreation or null` + - `"claude-opus-4-8"` - Breakdown of cached tokens by TTL + Powerful intelligence for long-running agents and coding - - `cache_creation_input_tokens: number` + - `"claude-opus-4-7"` - The number of input tokens used to create the cache entry. + Powerful intelligence for long-running agents and coding - - `cache_read_input_tokens: number` + - `"claude-mythos-preview"` - The number of input tokens read from the cache. + New class of intelligence, strongest in coding and cybersecurity - - `input_tokens: number` + - `"claude-opus-4-6"` - The number of input tokens which were used. + Powerful intelligence for long-running agents and coding - - `model: Model` + - `"claude-sonnet-4-6"` - The model that will complete your prompt. + Best combination of speed and intelligence - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"claude-haiku-4-5"` - - `output_tokens: number` + Fastest model with near-frontier intelligence - The number of output tokens which were used. + - `"claude-haiku-4-5-20251001"` - - `type: "fallback_message"` + Fastest model with near-frontier intelligence - Usage for the fallback-model attempt that served the response + - `"claude-opus-4-5"` - - `"fallback_message"` + Powerful intelligence for long-running agents and coding - - `output_tokens: number` + - `"claude-opus-4-5-20251101"` - The cumulative number of output tokens which were used. + Powerful intelligence for long-running agents and coding - - `output_tokens_details: BetaOutputTokensDetails or null` + - `"claude-sonnet-4-5"` - Breakdown of output tokens by category. + High-performance model for agents and coding - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `"claude-sonnet-4-5-20250929"` - - `thinking_tokens: number` + High-performance model for agents and coding - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `output_tokens: number` - - `server_tool_use: BetaServerToolUsage or null` + The number of output tokens which were used. - The number of server tool requests. + - `type: "message"` - - `web_fetch_requests: number` + Usage for a sampling iteration - The number of web fetch tool requests. + - `"message"` - - `web_search_requests: number` + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` - The number of web search tool requests. + Token usage for a compaction iteration. -### Beta Message Iteration Usage + - `cache_creation: BetaCacheCreation or null` -- `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + Breakdown of cached tokens by TTL - Token usage for a sampling iteration. + - `cache_creation_input_tokens: number` - - `cache_creation: BetaCacheCreation or null` + The number of input tokens used to create the cache entry. - Breakdown of cached tokens by TTL + - `cache_read_input_tokens: number` - - `ephemeral_1h_input_tokens: number` + The number of input tokens read from the cache. - The number of input tokens used to create the 1 hour cache entry. + - `input_tokens: number` - - `ephemeral_5m_input_tokens: number` + The number of input tokens which were used. - The number of input tokens used to create the 5 minute cache entry. + - `output_tokens: number` - - `cache_creation_input_tokens: number` + The number of output tokens which were used. - The number of input tokens used to create the cache entry. + - `type: "compaction"` - - `cache_read_input_tokens: number` + Usage for a compaction iteration - The number of input tokens read from the cache. + - `"compaction"` - - `input_tokens: number` + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - The number of input tokens which were used. + Token usage for an advisor sub-inference iteration. - - `model: Model` + - `cache_creation: BetaCacheCreation or null` - The model that will complete your prompt. + Breakdown of cached tokens by TTL - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `cache_creation_input_tokens: number` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + The number of input tokens used to create the cache entry. - The model that will complete your prompt. + - `cache_read_input_tokens: number` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + The number of input tokens read from the cache. - - `"claude-sonnet-5"` + - `input_tokens: number` - High-performance model for coding and agents + The number of input tokens which were used. - - `"claude-fable-5"` + - `model: Model` - Next generation of intelligence for the hardest knowledge work and coding problems + The model that will complete your prompt. - - `"claude-mythos-5"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - Most capable model for cybersecurity and biology research + - `output_tokens: number` - - `"claude-opus-5"` + The number of output tokens which were used. - Powerful intelligence for long-running agents and coding + - `type: "advisor_message"` - - `"claude-opus-4-8"` + Usage for an advisor sub-inference iteration - Powerful intelligence for long-running agents and coding + - `"advisor_message"` - - `"claude-opus-4-7"` + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - Powerful intelligence for long-running agents and coding + Token usage for the fallback-model attempt of a server-side fallback request. - - `"claude-mythos-preview"` + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. - New class of intelligence, strongest in coding and cybersecurity + - `cache_creation: BetaCacheCreation or null` - - `"claude-opus-4-6"` + Breakdown of cached tokens by TTL - Powerful intelligence for long-running agents and coding + - `cache_creation_input_tokens: number` - - `"claude-sonnet-4-6"` + The number of input tokens used to create the cache entry. - Best combination of speed and intelligence + - `cache_read_input_tokens: number` - - `"claude-haiku-4-5"` + The number of input tokens read from the cache. - Fastest model with near-frontier intelligence + - `input_tokens: number` - - `"claude-haiku-4-5-20251001"` + The number of input tokens which were used. - Fastest model with near-frontier intelligence + - `model: Model` - - `"claude-opus-4-5"` + The model that will complete your prompt. - Powerful intelligence for long-running agents and coding + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"claude-opus-4-5-20251101"` + - `output_tokens: number` - Powerful intelligence for long-running agents and coding + The number of output tokens which were used. - - `"claude-sonnet-4-5"` + - `type: "fallback_message"` - High-performance model for agents and coding + Usage for the fallback-model attempt that served the response - - `"claude-sonnet-4-5-20250929"` + - `"fallback_message"` - High-performance model for agents and coding +### Beta JSON Output Format - - `string` +- `BetaJSONOutputFormat object { schema, type }` - - `output_tokens: number` + - `schema: map[unknown]` - The number of output tokens which were used. + The JSON schema of the format - - `type: "message"` + - `type: "json_schema"` - Usage for a sampling iteration + - `"json_schema"` - - `"message"` +### Beta MCP Tool Config -### Beta Message Param +- `BetaMCPToolConfig object { defer_loading, enabled }` -- `BetaMessageParam object { content, role }` + Configuration for a specific tool in an MCP toolset. - - `content: string or array of BetaContentBlockParam` + - `defer_loading: optional boolean` - - `string` + - `enabled: optional boolean` - - `array of BetaContentBlockParam` +### Beta MCP Tool Default Config - - `BetaTextBlockParam object { text, type, cache_control, citations }` +- `BetaMCPToolDefaultConfig object { defer_loading, enabled }` - - `text: string` + Default configuration for tools in an MCP toolset. - - `type: "text"` + - `defer_loading: optional boolean` - - `"text"` + - `enabled: optional boolean` - - `cache_control: optional BetaCacheControlEphemeral or null` +### Beta MCP Tool Result Block - Create a cache control breakpoint at this content block. +- `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` - - `type: "ephemeral"` + - `content: string or array of BetaTextBlock` - - `"ephemeral"` + - `string` - - `ttl: optional "5m" or "1h"` + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` - The time-to-live for the cache control breakpoint. + - `citations: array of BetaTextCitation or null` - This may be one the following values: + Citations supporting the text block. - - `5m`: 5 minutes - - `1h`: 1 hour + 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`. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `"5m"` + - `cited_text: string` - - `"1h"` + - `document_index: number` - - `citations: optional array of BetaTextCitationParam or null` + - `document_title: string or null` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `end_char_index: number` - - `cited_text: string` + - `file_id: string or null` - - `document_index: number` + - `start_char_index: number` - - `document_title: string or null` + - `type: "char_location"` - - `end_char_index: number` + - `"char_location"` - - `start_char_index: number` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `type: "char_location"` + - `cited_text: string` - - `"char_location"` + - `document_index: number` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `document_title: string or null` - - `cited_text: string` + - `end_page_number: number` - - `document_index: number` + - `file_id: string or null` - - `document_title: string or null` + - `start_page_number: number` - - `end_page_number: number` + - `type: "page_location"` - - `start_page_number: number` + - `"page_location"` - - `type: "page_location"` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `"page_location"` + - `cited_text: string` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + The full text of the cited block range, concatenated. - - `cited_text: string` + 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. - The full text of the cited block range, concatenated. + - `document_index: number` - 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. + - `document_title: string or null` - - `document_index: number` + - `end_block_index: number` - - `document_title: string or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `end_block_index: number` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `file_id: string or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `start_block_index: number` - - `start_block_index: number` + 0-based index of the first cited block in the source's `content` array. - 0-based index of the first cited block in the source's `content` array. + - `type: "content_block_location"` - - `type: "content_block_location"` + - `"content_block_location"` - - `"content_block_location"` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `cited_text: string` - - `cited_text: string` + - `encrypted_index: string` - - `encrypted_index: string` + - `title: string or null` - - `title: string or null` + - `type: "web_search_result_location"` - - `type: "web_search_result_location"` + - `"web_search_result_location"` - - `"web_search_result_location"` + - `url: string` - - `url: string` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `cited_text: string` - - `cited_text: string` + The full text of the cited block range, concatenated. - The full text of the cited block range, concatenated. + 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. - 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. + - `end_block_index: number` - - `end_block_index: number` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Exclusive 0-based end index of the cited block range in the source's `content` array. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `search_result_index: number` - - `search_result_index: number` + 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. - 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. + Counted separately from `document_index`; server-side web search results are not included in this count. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `source: string` - - `source: string` + - `start_block_index: number` - - `start_block_index: number` + 0-based index of the first cited block in the source's `content` array. - 0-based index of the first cited block in the source's `content` array. + - `title: string or null` - - `title: string or null` + - `type: "search_result_location"` - - `type: "search_result_location"` + - `"search_result_location"` - - `"search_result_location"` + - `text: string` - - `BetaImageBlockParam object { source, type, cache_control }` + - `type: "text"` - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `"text"` - - `BetaBase64ImageSource object { data, media_type, type }` + - `is_error: boolean` - - `data: string` + - `tool_use_id: string` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `type: "mcp_tool_result"` - - `"image/jpeg"` + - `"mcp_tool_result"` - - `"image/png"` +### Beta MCP Tool Use Block - - `"image/gif"` +- `BetaMCPToolUseBlock object { id, input, name, 2 more }` - - `"image/webp"` + - `id: string` - - `type: "base64"` + - `input: map[unknown]` - - `"base64"` + - `name: string` - - `BetaURLImageSource object { type, url }` + The name of the MCP tool - - `type: "url"` + - `server_name: string` - - `"url"` + The name of the MCP server - - `url: string` + - `type: "mcp_tool_use"` - - `BetaFileImageSource object { file_id, type }` + - `"mcp_tool_use"` - - `file_id: string` +### Beta MCP Tool Use Block Param - - `type: "file"` +- `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` - - `"file"` + - `id: string` - - `type: "image"` + - `input: map[unknown]` - - `"image"` + - `name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `server_name: string` - Create a cache control breakpoint at this content block. + The name of the MCP server - - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + - `type: "mcp_tool_use"` - - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` + - `"mcp_tool_use"` - - `BetaBase64PDFSource object { data, media_type, type }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `data: string` + Create a cache control breakpoint at this content block. - - `media_type: "application/pdf"` + - `type: "ephemeral"` - - `"application/pdf"` + - `"ephemeral"` - - `type: "base64"` + - `ttl: optional "5m" or "1h"` - - `"base64"` + The time-to-live for the cache control breakpoint. - - `BetaPlainTextSource object { data, media_type, type }` + This may be one the following values: - - `data: string` + - `5m`: 5 minutes + - `1h`: 1 hour - - `media_type: "text/plain"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"text/plain"` + - `"5m"` - - `type: "text"` + - `"1h"` - - `"text"` +### Beta MCP Toolset - - `BetaContentBlockSource object { content, type }` +- `BetaMCPToolset object { mcp_server_name, type, cache_control, 2 more }` - - `content: string or array of BetaContentBlockSourceContent` + Configuration for a group of tools from an MCP server. - - `string` + Allows configuring enabled status and defer_loading for all tools + from an MCP server, with optional per-tool overrides. - - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + - `mcp_server_name: string` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + Name of the MCP server to configure tools for - - `BetaImageBlockParam object { source, type, cache_control }` + - `type: "mcp_toolset"` - - `type: "content"` + - `"mcp_toolset"` - - `"content"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaURLPDFSource object { type, url }` + Create a cache control breakpoint at this content block. - - `type: "url"` + - `type: "ephemeral"` - - `"url"` + - `"ephemeral"` - - `url: string` + - `ttl: optional "5m" or "1h"` - - `BetaFileDocumentSource object { file_id, type }` + The time-to-live for the cache control breakpoint. - - `file_id: string` + This may be one the following values: - - `type: "file"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"file"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `type: "document"` + - `"5m"` - - `"document"` + - `"1h"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `configs: optional map[BetaMCPToolConfig] or null` - Create a cache control breakpoint at this content block. + Configuration overrides for specific tools, keyed by tool name - - `citations: optional BetaCitationsConfigParam or null` + - `defer_loading: optional boolean` - - `enabled: optional boolean` + - `enabled: optional boolean` - - `context: optional string or null` + - `default_config: optional BetaMCPToolDefaultConfig` - - `title: optional string or null` + Default configuration applied to all tools from this server - - `BetaSearchResultBlockParam object { content, source, title, 3 more }` + - `defer_loading: optional boolean` - - `content: array of BetaTextBlockParam` + - `enabled: optional boolean` - - `text: string` +### Beta Memory Tool 20250818 - - `type: "text"` +- `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `name: "memory"` - Create a cache control breakpoint at this content block. + Name of the tool. - - `citations: optional array of BetaTextCitationParam or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `source: string` + - `"memory"` - - `title: string` + - `type: "memory_20250818"` - - `type: "search_result"` + - `"memory_20250818"` - - `"search_result"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"direct"` - Create a cache control breakpoint at this content block. + - `"code_execution_20250825"` - - `citations: optional BetaCitationsConfigParam` + - `"code_execution_20260120"` - - `BetaThinkingBlockParam object { signature, thinking, type }` + - `"code_execution_20260521"` - - `signature: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `type: "ephemeral"` - - `thinking: string` + - `"ephemeral"` - The `thinking` text of this block as returned by the API. + - `ttl: optional "5m" or "1h"` - - `type: "thinking"` + The time-to-live for the cache control breakpoint. - - `"thinking"` + This may be one the following values: - - `BetaRedactedThinkingBlockParam object { data, type }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `data: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - 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. + - `"5m"` - - `type: "redacted_thinking"` + - `"1h"` - - `"redacted_thinking"` + - `defer_loading: optional boolean` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `id: string` + - `input_examples: optional array of map[unknown]` - - `input: map[unknown]` + - `strict: optional boolean` - - `name: string` + When true, guarantees schema validation on tool names and inputs - - `type: "tool_use"` +### Beta Memory Tool 20250818 Command - - `"tool_use"` +- `BetaMemoryTool20250818Command = BetaMemoryTool20250818ViewCommand or BetaMemoryTool20250818CreateCommand or BetaMemoryTool20250818StrReplaceCommand or 3 more` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaMemoryTool20250818ViewCommand object { command, path, view_range }` - Create a cache control breakpoint at this content block. + - `command: "view"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + Command type identifier - Tool invocation directly from the model. + - `"view"` - - `BetaDirectCaller object { type }` + - `path: string` - Tool invocation directly from the model. + Path to directory or file to view - - `type: "direct"` + - `view_range: optional array of number` - - `"direct"` + Optional line range for viewing specific lines - - `BetaServerToolCaller object { tool_id, type }` + - `BetaMemoryTool20250818CreateCommand object { command, file_text, path }` - Tool invocation generated by a server-side tool. + - `command: "create"` - - `tool_id: string` + Command type identifier - - `type: "code_execution_20250825"` + - `"create"` - - `"code_execution_20250825"` + - `file_text: string` - - `BetaServerToolCaller20260120 object { tool_id, type }` + Content to write to the file - - `tool_id: string` + - `path: string` - - `type: "code_execution_20260120"` + Path where the file should be created - - `"code_execution_20260120"` + - `BetaMemoryTool20250818StrReplaceCommand object { command, new_str, old_str, path }` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `command: "str_replace"` - - `tool_use_id: string` + Command type identifier - - `type: "tool_result"` + - `"str_replace"` - - `"tool_result"` + - `new_str: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + Text to replace with - Create a cache control breakpoint at this content block. + - `old_str: string` - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + Text to search for and replace - - `string` + - `path: string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + Path to the file where text should be replaced - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `BetaMemoryTool20250818InsertCommand object { command, insert_line, insert_text, path }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `command: "insert"` - - `BetaSearchResultBlockParam object { content, source, title, 3 more }` + Command type identifier - - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + - `"insert"` - - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` + - `insert_line: number` - Tool reference block that can be included in tool_result content. + Line number where text should be inserted - - `tool_name: string` + - `insert_text: string` - - `type: "tool_reference"` + Text to insert at the specified line - - `"tool_reference"` + - `path: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + Path to the file where text should be inserted - Create a cache control breakpoint at this content block. + - `BetaMemoryTool20250818DeleteCommand object { command, path }` - - `is_error: optional boolean` + - `command: "delete"` - - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` + Command type identifier - - `id: string` + - `"delete"` - - `input: map[unknown]` + - `path: string` - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + Path to the file or directory to delete - - `"advisor"` + - `BetaMemoryTool20250818RenameCommand object { command, new_path, old_path }` - - `"web_search"` + - `command: "rename"` - - `"web_fetch"` + Command type identifier - - `"code_execution"` + - `"rename"` - - `"bash_code_execution"` + - `new_path: string` - - `"text_editor_code_execution"` + New path for the file or directory - - `"tool_search_tool_regex"` + - `old_path: string` - - `"tool_search_tool_bm25"` + Current path of the file or directory - - `type: "server_tool_use"` +### Beta Memory Tool 20250818 Create Command - - `"server_tool_use"` +- `BetaMemoryTool20250818CreateCommand object { command, file_text, path }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `command: "create"` - Create a cache control breakpoint at this content block. + Command type identifier - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"create"` - Tool invocation directly from the model. + - `file_text: string` - - `BetaDirectCaller object { type }` + Content to write to the file - Tool invocation directly from the model. + - `path: string` - - `BetaServerToolCaller object { tool_id, type }` + Path where the file should be created - Tool invocation generated by a server-side tool. +### Beta Memory Tool 20250818 Delete Command - - `BetaServerToolCaller20260120 object { tool_id, type }` +- `BetaMemoryTool20250818DeleteCommand object { command, path }` - - `BetaWebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `command: "delete"` - - `content: BetaWebSearchToolResultBlockParamContent` + Command type identifier - - `ResultBlock = array of BetaWebSearchResultBlockParam` + - `"delete"` - - `encrypted_content: string` + - `path: string` - - `title: string` + Path to the file or directory to delete - - `type: "web_search_result"` +### Beta Memory Tool 20250818 Insert Command - - `"web_search_result"` +- `BetaMemoryTool20250818InsertCommand object { command, insert_line, insert_text, path }` - - `url: string` + - `command: "insert"` - - `page_age: optional string or null` + Command type identifier - - `BetaWebSearchToolRequestError object { error_code, type }` + - `"insert"` - - `error_code: BetaWebSearchToolResultErrorCode` + - `insert_line: number` - - `"invalid_tool_input"` + Line number where text should be inserted - - `"unavailable"` + - `insert_text: string` - - `"max_uses_exceeded"` + Text to insert at the specified line - - `"too_many_requests"` + - `path: string` - - `"query_too_long"` + Path to the file where text should be inserted - - `"request_too_large"` +### Beta Memory Tool 20250818 Rename Command - - `type: "web_search_tool_result_error"` +- `BetaMemoryTool20250818RenameCommand object { command, new_path, old_path }` - - `"web_search_tool_result_error"` + - `command: "rename"` - - `tool_use_id: string` + Command type identifier - - `type: "web_search_tool_result"` + - `"rename"` - - `"web_search_tool_result"` + - `new_path: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + New path for the file or directory - Create a cache control breakpoint at this content block. + - `old_path: string` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + Current path of the file or directory - Tool invocation directly from the model. +### Beta Memory Tool 20250818 Str Replace Command - - `BetaDirectCaller object { type }` +- `BetaMemoryTool20250818StrReplaceCommand object { command, new_str, old_str, path }` - Tool invocation directly from the model. + - `command: "str_replace"` - - `BetaServerToolCaller object { tool_id, type }` + Command type identifier - Tool invocation generated by a server-side tool. + - `"str_replace"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `new_str: string` - - `BetaWebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + Text to replace with - - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam` + - `old_str: string` - - `BetaWebFetchToolResultErrorBlockParam object { error_code, type }` + Text to search for and replace - - `error_code: BetaWebFetchToolResultErrorCode` + - `path: string` - - `"invalid_tool_input"` + Path to the file where text should be replaced - - `"url_too_long"` +### Beta Memory Tool 20250818 View Command - - `"url_not_allowed"` +- `BetaMemoryTool20250818ViewCommand object { command, path, view_range }` - - `"url_not_in_prior_context"` + - `command: "view"` - - `"url_not_accessible"` + Command type identifier - - `"unsupported_content_type"` + - `"view"` - - `"too_many_requests"` + - `path: string` - - `"max_uses_exceeded"` + Path to directory or file to view - - `"unavailable"` + - `view_range: optional array of number` - - `type: "web_fetch_tool_result_error"` + Optional line range for viewing specific lines - - `"web_fetch_tool_result_error"` +### Beta Message - - `BetaWebFetchBlockParam object { content, type, url, retrieved_at }` +- `BetaMessage object { id, container, content, 9 more }` - - `content: BetaRequestDocumentBlock` + - `id: string` - - `type: "web_fetch_result"` + Unique object identifier. - - `"web_fetch_result"` + The format and length of IDs may change over time. - - `url: string` + - `container: BetaContainer or null` - Fetched content URL + Information about the container used in the request (for the code execution tool) - - `retrieved_at: optional string or null` + - `id: string` - ISO 8601 timestamp when the content was retrieved + Identifier for the container used in this request - - `tool_use_id: string` + - `expires_at: string` - - `type: "web_fetch_tool_result"` + The time at which the container will expire. - - `"web_fetch_tool_result"` + - `skills: array of BetaSkill or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Skills loaded in the container - Create a cache control breakpoint at this content block. + - `skill_id: string` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + Skill ID - Tool invocation directly from the model. + - `type: "anthropic" or "custom"` - - `BetaDirectCaller object { type }` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - Tool invocation directly from the model. + - `"anthropic"` - - `BetaServerToolCaller object { tool_id, type }` + - `"custom"` - Tool invocation generated by a server-side tool. + - `version: string` - - `BetaServerToolCaller20260120 object { tool_id, type }` + Skill version or 'latest' for most recent version - - `BetaAdvisorToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `content: array of BetaContentBlock` - - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam` + Content generated by the model. - - `BetaAdvisorToolResultErrorParam object { error_code, type }` + This is an array of content blocks, each of which has a `type` that determines its shape. - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + Example: - - `"max_uses_exceeded"` + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `"prompt_too_long"` + 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. - - `"too_many_requests"` + For example, if the input `messages` were: - - `"overloaded"` + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - - `"unavailable"` + Then the response `content` might be: - - `"execution_time_exceeded"` + ```json + [{"type": "text", "text": "B)"}] + ``` - - `"model_not_found"` + - `BetaTextBlock object { citations, text, type }` - - `type: "advisor_tool_result_error"` + - `citations: array of BetaTextCitation or null` - - `"advisor_tool_result_error"` + Citations supporting the text block. - - `BetaAdvisorResultBlockParam object { text, type, stop_reason }` + 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`. - - `text: string` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `type: "advisor_result"` + - `cited_text: string` - - `"advisor_result"` + - `document_index: number` - - `stop_reason: optional string or null` + - `document_title: string or null` - - `BetaAdvisorRedactedResultBlockParam object { encrypted_content, type, stop_reason }` + - `end_char_index: number` - - `encrypted_content: string` + - `file_id: string or null` - Opaque blob produced by a prior response; must be round-tripped verbatim. + - `start_char_index: number` - - `type: "advisor_redacted_result"` + - `type: "char_location"` - - `"advisor_redacted_result"` + - `"char_location"` - - `stop_reason: optional string or null` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `tool_use_id: string` + - `cited_text: string` - - `type: "advisor_tool_result"` + - `document_index: number` - - `"advisor_tool_result"` + - `document_title: string or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `end_page_number: number` - Create a cache control breakpoint at this content block. + - `file_id: string or null` - - `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `start_page_number: number` - - `content: BetaCodeExecutionToolResultBlockParamContent` + - `type: "page_location"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"page_location"` - - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `error_code: BetaCodeExecutionToolResultErrorCode` + - `cited_text: string` - - `"invalid_tool_input"` + The full text of the cited block range, concatenated. - - `"unavailable"` + 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. - - `"too_many_requests"` + - `document_index: number` - - `"execution_time_exceeded"` + - `document_title: string or null` - - `type: "code_execution_tool_result_error"` + - `end_block_index: number` - - `"code_execution_tool_result_error"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `content: array of BetaCodeExecutionOutputBlockParam` + - `file_id: string or null` - - `file_id: string` + - `start_block_index: number` - - `type: "code_execution_output"` + 0-based index of the first cited block in the source's `content` array. - - `"code_execution_output"` + - `type: "content_block_location"` - - `return_code: number` + - `"content_block_location"` - - `stderr: string` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `stdout: string` + - `cited_text: string` - - `type: "code_execution_result"` + - `encrypted_index: string` - - `"code_execution_result"` + - `title: string or null` - - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `type: "web_search_result_location"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"web_search_result_location"` - - `content: array of BetaCodeExecutionOutputBlockParam` + - `url: string` - - `file_id: string` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `type: "code_execution_output"` + - `cited_text: string` - - `encrypted_stdout: string` + The full text of the cited block range, concatenated. - - `return_code: number` + 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. - - `stderr: string` + - `end_block_index: number` - - `type: "encrypted_code_execution_result"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"encrypted_code_execution_result"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `tool_use_id: string` + - `search_result_index: number` - - `type: "code_execution_tool_result"` + 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. - - `"code_execution_tool_result"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `source: string` - Create a cache control breakpoint at this content block. + - `start_block_index: number` - - `BetaBashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + 0-based index of the first cited block in the source's `content` array. - - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam` + - `title: string or null` - - `BetaBashCodeExecutionToolResultErrorParam object { error_code, type }` + - `type: "search_result_location"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `"search_result_location"` - - `"invalid_tool_input"` + - `text: string` - - `"unavailable"` + - `type: "text"` - - `"too_many_requests"` + - `"text"` - - `"execution_time_exceeded"` + - `BetaThinkingBlock object { signature, thinking, type }` - - `"output_file_too_large"` + - `signature: string` - - `type: "bash_code_execution_tool_result_error"` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"bash_code_execution_tool_result_error"` + 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. - - `BetaBashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `content: array of BetaBashCodeExecutionOutputBlockParam` + - `thinking: string` - - `file_id: string` + The text of Claude's thinking process for this block. - - `type: "bash_code_execution_output"` + - `type: "thinking"` - - `"bash_code_execution_output"` + - `"thinking"` - - `return_code: number` + - `BetaRedactedThinkingBlock object { data, type }` - - `stderr: string` + - `data: string` - - `stdout: string` + 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. - - `type: "bash_code_execution_result"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"bash_code_execution_result"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `tool_use_id: string` + - `type: "redacted_thinking"` - - `type: "bash_code_execution_tool_result"` + - `"redacted_thinking"` - - `"bash_code_execution_tool_result"` + - `BetaToolUseBlock object { id, input, name, 3 more }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `id: string` - Create a cache control breakpoint at this content block. + - `input: map[unknown]` - - `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `name: string` - - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` + - `type: "tool_use"` - - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `"tool_use"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"invalid_tool_input"` + Tool invocation directly from the model. - - `"unavailable"` + - `BetaDirectCaller object { type }` - - `"too_many_requests"` + Tool invocation directly from the model. - - `"execution_time_exceeded"` + - `type: "direct"` - - `"file_not_found"` + - `"direct"` - - `type: "text_editor_code_execution_tool_result_error"` + - `BetaServerToolCaller object { tool_id, type }` - - `"text_editor_code_execution_tool_result_error"` + Tool invocation generated by a server-side tool. - - `error_message: optional string or null` + - `tool_id: string` - - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `type: "code_execution_20250825"` - - `content: string` + - `"code_execution_20250825"` - - `file_type: "text" or "image" or "pdf"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"text"` + - `tool_id: string` - - `"image"` + - `type: "code_execution_20260120"` - - `"pdf"` + - `"code_execution_20260120"` - - `type: "text_editor_code_execution_view_result"` + - `toolset_name: optional string or null` - - `"text_editor_code_execution_view_result"` + For a toolset member tool_use, the toolset family. - - `num_lines: optional number or null` + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - - `start_line: optional number or null` + - `id: string` - - `total_lines: optional number or null` + - `input: map[unknown]` - - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `is_file_update: boolean` + - `"advisor"` - - `type: "text_editor_code_execution_create_result"` + - `"web_search"` - - `"text_editor_code_execution_create_result"` + - `"web_fetch"` - - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `"code_execution"` - - `type: "text_editor_code_execution_str_replace_result"` + - `"bash_code_execution"` - - `"text_editor_code_execution_str_replace_result"` + - `"text_editor_code_execution"` - - `lines: optional array of string or null` + - `"tool_search_tool_regex"` - - `new_lines: optional number or null` + - `"tool_search_tool_bm25"` - - `new_start: optional number or null` + - `type: "server_tool_use"` - - `old_lines: optional number or null` + - `"server_tool_use"` - - `old_start: optional number or null` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `tool_use_id: string` + Tool invocation directly from the model. - - `type: "text_editor_code_execution_tool_result"` + - `BetaDirectCaller object { type }` - - `"text_editor_code_execution_tool_result"` + Tool invocation directly from the model. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaServerToolCaller object { tool_id, type }` - Create a cache control breakpoint at this content block. + Tool invocation generated by a server-side tool. - - `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` - - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `content: BetaWebSearchToolResultBlockContent` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `BetaWebSearchToolResultError object { error_code, type }` - - `"invalid_tool_input"` + - `error_code: BetaWebSearchToolResultErrorCode` - - `"unavailable"` + - `"invalid_tool_input"` - - `"too_many_requests"` + - `"unavailable"` - - `"execution_time_exceeded"` + - `"max_uses_exceeded"` - - `type: "tool_search_tool_result_error"` + - `"too_many_requests"` - - `"tool_search_tool_result_error"` + - `"query_too_long"` - - `error_message: optional string or null` + - `"request_too_large"` - - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` + - `type: "web_search_tool_result_error"` - - `tool_references: array of BetaToolReferenceBlockParam` + - `"web_search_tool_result_error"` - - `tool_name: string` + - `array of BetaWebSearchResultBlock` - - `type: "tool_reference"` + - `encrypted_content: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `page_age: string or null` - Create a cache control breakpoint at this content block. + - `title: string` - - `type: "tool_search_tool_search_result"` + - `type: "web_search_result"` - - `"tool_search_tool_search_result"` + - `"web_search_result"` - - `tool_use_id: string` + - `url: string` - - `type: "tool_search_tool_result"` + - `tool_use_id: string` - - `"tool_search_tool_result"` + - `type: "web_search_tool_result"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"web_search_tool_result"` - Create a cache control breakpoint at this content block. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` + Tool invocation directly from the model. - - `id: string` + - `BetaDirectCaller object { type }` - - `input: map[unknown]` + Tool invocation directly from the model. - - `name: string` + - `BetaServerToolCaller object { tool_id, type }` - - `server_name: string` + Tool invocation generated by a server-side tool. - The name of the MCP server + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `type: "mcp_tool_use"` + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` - - `"mcp_tool_use"` + - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaWebFetchToolResultErrorBlock object { error_code, type }` - Create a cache control breakpoint at this content block. + - `error_code: BetaWebFetchToolResultErrorCode` - - `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `"invalid_tool_input"` - - `tool_use_id: string` + - `"url_too_long"` - - `type: "mcp_tool_result"` + - `"url_not_allowed"` - - `"mcp_tool_result"` + - `"url_not_in_prior_context"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"url_not_accessible"` - Create a cache control breakpoint at this content block. + - `"unsupported_content_type"` - - `content: optional string or array of BetaTextBlockParam` + - `"too_many_requests"` - - `string` + - `"max_uses_exceeded"` - - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` + - `"unavailable"` - - `text: string` + - `type: "web_fetch_tool_result_error"` - - `type: "text"` + - `"web_fetch_tool_result_error"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaWebFetchBlock object { content, retrieved_at, type, url }` - Create a cache control breakpoint at this content block. + - `content: BetaDocumentBlock` - - `citations: optional array of BetaTextCitationParam or null` + - `citations: BetaCitationConfig or null` - - `is_error: optional boolean` + Citation configuration for the document - - `BetaContainerUploadBlockParam object { file_id, type, cache_control }` + - `enabled: boolean` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + - `source: BetaBase64PDFSource or BetaPlainTextSource` - - `file_id: string` + - `BetaBase64PDFSource object { data, media_type, type }` - - `type: "container_upload"` + - `data: string` - - `"container_upload"` + - `media_type: "application/pdf"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"application/pdf"` - Create a cache control breakpoint at this content block. + - `type: "base64"` - - `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` + - `"base64"` - A compaction block containing summary of previous context. + - `BetaPlainTextSource object { data, media_type, type }` - Users should round-trip these blocks from responses to subsequent requests - to maintain context across compaction boundaries. + - `data: string` - When content is None, the block represents a failed compaction. The server - treats these as no-ops. Empty string content is not allowed. + - `media_type: "text/plain"` - - `type: "compaction"` + - `"text/plain"` - - `"compaction"` + - `type: "text"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"text"` - Create a cache control breakpoint at this content block. + - `title: string or null` - - `content: optional string or null` + The title of the document - Summary of previously compacted content, or null if compaction failed + - `type: "document"` - - `encrypted_content: optional string or null` + - `"document"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `retrieved_at: string or null` - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` + ISO 8601 timestamp when the content was retrieved - System instructions that appear mid-conversation. + - `type: "web_fetch_result"` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + - `"web_fetch_result"` - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` + - `url: string` - System instruction text blocks. + Fetched content URL - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `tool_use_id: string` - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` + - `type: "web_fetch_tool_result"` - Mid-conversation directive to surface a declared tool. + - `"web_fetch_tool_result"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Tool invocation directly from the model. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaDirectCaller object { type }` - - `BetaToolChangeToolReference object { name, type }` + Tool invocation directly from the model. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaServerToolCaller object { tool_id, type }` - - `name: string` + Tool invocation generated by a server-side tool. - - `type: "tool_reference"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"tool_reference"` + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `BetaAdvisorToolResultError object { error_code, type }` - - `name: string` + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - - `server_name: string` + - `"max_uses_exceeded"` - - `type: "mcp_tool_reference"` + - `"prompt_too_long"` - - `"mcp_tool_reference"` + - `"too_many_requests"` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `"overloaded"` - Reference to every tool in the named MCP server's toolset. + - `"unavailable"` - - `server_name: string` + - `"execution_time_exceeded"` - - `type: "mcp_toolset_reference"` + - `"model_not_found"` - - `"mcp_toolset_reference"` + - `type: "advisor_tool_result_error"` - - `type: "tool_addition"` + - `"advisor_tool_result_error"` - - `"tool_addition"` + - `BetaAdvisorResultBlock object { stop_reason, text, type }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `stop_reason: string or null` - Create a cache control breakpoint at this content block. + 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. - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `text: string` - Mid-conversation directive to withdraw a tool. + - `type: "advisor_result"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `"advisor_result"` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `encrypted_content: string` - - `BetaToolChangeToolReference object { name, type }` + Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `stop_reason: string or null` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `type: "advisor_redacted_result"` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `"advisor_redacted_result"` - Reference to every tool in the named MCP server's toolset. + - `tool_use_id: string` - - `type: "tool_removal"` + - `type: "advisor_tool_result"` - - `"tool_removal"` + - `"advisor_tool_result"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` - Create a cache control breakpoint at this content block. + - `content: BetaCodeExecutionToolResultBlockContent` - - `type: "mid_conv_system"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"mid_conv_system"` + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `error_code: BetaCodeExecutionToolResultErrorCode` - Create a cache control breakpoint at this content block. + - `"invalid_tool_input"` - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` + - `"unavailable"` - Mid-conversation directive to surface a declared tool. + - `"too_many_requests"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + - `"execution_time_exceeded"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "code_execution_tool_result_error"` - Mid-conversation directive to withdraw a tool. + - `"code_execution_tool_result_error"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `BetaFallbackBlockParam object { from, to, type, trigger }` + - `content: array of BetaCodeExecutionOutputBlock` - A `fallback` block echoed back from a prior response. + - `file_id: string` - Accepted in `messages[].content` and not rendered into the prompt; not - validated against the request's `fallbacks` chain or top-level `model`. + - `type: "code_execution_output"` - Echo the assistant turn back verbatim, including this block in its - original position. The block marks the boundary between content produced - before and after a fallback hop, and the server relies on that boundary - to validate the turn: when thinking runs flank the boundary, omitting - the block merges them into one span the server cannot validate (the - request is rejected), and moving it into the middle of a single run is - likewise rejected; between non-thinking blocks the block's placement has - no validation effect. + - `"code_execution_output"` - - `from: BetaFallbackInfoParam` + - `return_code: number` - Identifies one hop of a fallback transition. + - `stderr: string` - - `model: Model` + - `stdout: string` - The model that will complete your prompt. + - `type: "code_execution_result"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"code_execution_result"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - The model that will complete your prompt. + Code execution result with encrypted stdout for PFC + web_search results. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `content: array of BetaCodeExecutionOutputBlock` - - `"claude-sonnet-5"` + - `file_id: string` - High-performance model for coding and agents + - `type: "code_execution_output"` - - `"claude-fable-5"` + - `encrypted_stdout: string` - Next generation of intelligence for the hardest knowledge work and coding problems + - `return_code: number` - - `"claude-mythos-5"` + - `stderr: string` - Most capable model for cybersecurity and biology research + - `type: "encrypted_code_execution_result"` - - `"claude-opus-5"` + - `"encrypted_code_execution_result"` - Powerful intelligence for long-running agents and coding + - `tool_use_id: string` - - `"claude-opus-4-8"` + - `type: "code_execution_tool_result"` - Powerful intelligence for long-running agents and coding + - `"code_execution_tool_result"` - - `"claude-opus-4-7"` + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - Powerful intelligence for long-running agents and coding + - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` - - `"claude-mythos-preview"` + - `BetaBashCodeExecutionToolResultError object { error_code, type }` - New class of intelligence, strongest in coding and cybersecurity + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `"claude-opus-4-6"` + - `"invalid_tool_input"` - Powerful intelligence for long-running agents and coding + - `"unavailable"` - - `"claude-sonnet-4-6"` + - `"too_many_requests"` - Best combination of speed and intelligence + - `"execution_time_exceeded"` - - `"claude-haiku-4-5"` + - `"output_file_too_large"` - Fastest model with near-frontier intelligence + - `type: "bash_code_execution_tool_result_error"` - - `"claude-haiku-4-5-20251001"` + - `"bash_code_execution_tool_result_error"` - Fastest model with near-frontier intelligence + - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"claude-opus-4-5"` + - `content: array of BetaBashCodeExecutionOutputBlock` - Powerful intelligence for long-running agents and coding + - `file_id: string` - - `"claude-opus-4-5-20251101"` + - `type: "bash_code_execution_output"` - Powerful intelligence for long-running agents and coding + - `"bash_code_execution_output"` - - `"claude-sonnet-4-5"` + - `return_code: number` - High-performance model for agents and coding + - `stderr: string` - - `"claude-sonnet-4-5-20250929"` + - `stdout: string` - High-performance model for agents and coding + - `type: "bash_code_execution_result"` - - `string` + - `"bash_code_execution_result"` - - `to: BetaFallbackInfoParam` + - `tool_use_id: string` - Identifies one hop of a fallback transition. + - `type: "bash_code_execution_tool_result"` - - `type: "fallback"` + - `"bash_code_execution_tool_result"` - - `"fallback"` + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `trigger: optional unknown` + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` - The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `role: "user" or "assistant" or "system"` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `"user"` + - `"invalid_tool_input"` - - `"assistant"` + - `"unavailable"` - - `"system"` + - `"too_many_requests"` -### Beta Message Tokens Count + - `"execution_time_exceeded"` -- `BetaMessageTokensCount object { context_management, input_tokens }` + - `"file_not_found"` - - `context_management: BetaCountTokensContextManagementResponse or null` + - `error_message: string or null` - Information about context management applied to the message. + - `type: "text_editor_code_execution_tool_result_error"` - - `original_input_tokens: number` + - `"text_editor_code_execution_tool_result_error"` - The original token count before context management was applied + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `input_tokens: number` + - `content: string` - The total number of tokens across the provided list of messages, system prompt, and tools. + - `file_type: "text" or "image" or "pdf"` -### Beta Metadata + - `"text"` -- `BetaMetadata object { user_id }` + - `"image"` - - `user_id: optional string or null` + - `"pdf"` - An external identifier for the user who is associated with the request. + - `num_lines: number or null` - 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. + - `start_line: number or null` -### Beta Mid Conversation System Block Param + - `total_lines: number or null` -- `BetaMidConversationSystemBlockParam object { content, type, cache_control }` + - `type: "text_editor_code_execution_view_result"` - System instructions that appear mid-conversation. + - `"text_editor_code_execution_view_result"` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` + - `is_file_update: boolean` - System instruction text blocks. + - `type: "text_editor_code_execution_create_result"` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `"text_editor_code_execution_create_result"` - - `text: string` + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `type: "text"` + - `lines: array of string or null` - - `"text"` + - `new_lines: number or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `new_start: number or null` - Create a cache control breakpoint at this content block. + - `old_lines: number or null` - - `type: "ephemeral"` + - `old_start: number or null` - - `"ephemeral"` + - `type: "text_editor_code_execution_str_replace_result"` - - `ttl: optional "5m" or "1h"` + - `"text_editor_code_execution_str_replace_result"` - The time-to-live for the cache control breakpoint. + - `tool_use_id: string` - This may be one the following values: + - `type: "text_editor_code_execution_tool_result"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"text_editor_code_execution_tool_result"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` - - `"5m"` + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` - - `"1h"` + - `BetaToolSearchToolResultError object { error_code, error_message, type }` - - `citations: optional array of BetaTextCitationParam or null` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"invalid_tool_input"` - - `cited_text: string` + - `"unavailable"` - - `document_index: number` + - `"too_many_requests"` - - `document_title: string or null` + - `"execution_time_exceeded"` - - `end_char_index: number` + - `error_message: string or null` - - `start_char_index: number` + - `type: "tool_search_tool_result_error"` - - `type: "char_location"` + - `"tool_search_tool_result_error"` - - `"char_location"` + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_references: array of BetaToolReferenceBlock` - - `cited_text: string` + - `tool_name: string` - - `document_index: number` + - `type: "tool_reference"` - - `document_title: string or null` + - `"tool_reference"` - - `end_page_number: number` + - `type: "tool_search_tool_search_result"` - - `start_page_number: number` + - `"tool_search_tool_search_result"` - - `type: "page_location"` + - `tool_use_id: string` - - `"page_location"` + - `type: "tool_search_tool_result"` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"tool_search_tool_result"` - - `cited_text: string` + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` - The full text of the cited block range, concatenated. + - `id: string` - 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. + - `input: map[unknown]` - - `document_index: number` + - `name: string` - - `document_title: string or null` + The name of the MCP tool - - `end_block_index: number` + - `server_name: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + The name of the MCP server - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "mcp_tool_use"` - - `start_block_index: number` + - `"mcp_tool_use"` - 0-based index of the first cited block in the source's `content` array. + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` - - `type: "content_block_location"` + - `content: string or array of BetaTextBlock` - - `"content_block_location"` + - `string` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` - - `cited_text: string` + - `citations: array of BetaTextCitation or null` - - `encrypted_index: string` + Citations supporting the text block. - - `title: string or null` + 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`. - - `type: "web_search_result_location"` + - `text: string` - - `"web_search_result_location"` + - `type: "text"` - - `url: string` + - `is_error: boolean` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `tool_use_id: string` - - `cited_text: string` + - `type: "mcp_tool_result"` - The full text of the cited block range, concatenated. + - `"mcp_tool_result"` - 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. + - `BetaContainerUploadBlock object { file_id, type }` - - `end_block_index: number` + Response model for a file uploaded to the container. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `file_id: string` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "container_upload"` - - `search_result_index: number` + - `"container_upload"` - 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. + - `BetaCompactionBlock object { content, encrypted_content, type }` - Counted separately from `document_index`; server-side web search results are not included in this count. + A compaction block returned when autocompact is triggered. - - `source: string` + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. - - `start_block_index: number` + - `content: string or null` - 0-based index of the first cited block in the source's `content` array. + Summary of compacted content, or null if compaction failed - - `title: string or null` + - `encrypted_content: string or null` - - `type: "search_result_location"` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `"search_result_location"` + - `type: "compaction"` - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` + - `"compaction"` - Mid-conversation directive to surface a declared tool. + - `BetaFallbackBlock object { from, to, trigger, type }` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + Marks the point in `content` where one model's output gives way to the next. - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. - - `BetaToolChangeToolReference object { name, type }` + - `from: BetaFallbackInfo` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + 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. - - `name: string` + - `model: Model` - - `type: "tool_reference"` + The model that will complete your prompt. - - `"tool_reference"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + The model that will complete your prompt. - - `name: string` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `server_name: string` + - `"claude-sonnet-5"` - - `type: "mcp_tool_reference"` + High-performance model for coding and agents - - `"mcp_tool_reference"` + - `"claude-fable-5"` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + Next generation of intelligence for the hardest knowledge work and coding problems - Reference to every tool in the named MCP server's toolset. + - `"claude-mythos-5"` - - `server_name: string` + Most capable model for cybersecurity and biology research - - `type: "mcp_toolset_reference"` + - `"claude-opus-5"` - - `"mcp_toolset_reference"` + Powerful intelligence for long-running agents and coding - - `type: "tool_addition"` + - `"claude-opus-4-8"` - - `"tool_addition"` + Powerful intelligence for long-running agents and coding - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"claude-opus-4-7"` - Create a cache control breakpoint at this content block. + Powerful intelligence for long-running agents and coding - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `"claude-mythos-preview"` - Mid-conversation directive to withdraw a tool. + New class of intelligence, strongest in coding and cybersecurity - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `"claude-opus-4-6"` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Powerful intelligence for long-running agents and coding - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `"claude-sonnet-4-6"` - - `BetaToolChangeToolReference object { name, type }` + Best combination of speed and intelligence - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `"claude-haiku-4-5"` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Fastest model with near-frontier intelligence - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `"claude-haiku-4-5-20251001"` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + Fastest model with near-frontier intelligence - Reference to every tool in the named MCP server's toolset. + - `"claude-opus-4-5"` - - `type: "tool_removal"` + Powerful intelligence for long-running agents and coding - - `"tool_removal"` + - `"claude-opus-4-5-20251101"` - - `cache_control: optional BetaCacheControlEphemeral or null` + Powerful intelligence for long-running agents and coding - Create a cache control breakpoint at this content block. + - `"claude-sonnet-4-5"` - - `type: "mid_conv_system"` + High-performance model for agents and coding - - `"mid_conv_system"` + - `"claude-sonnet-4-5-20250929"` - - `cache_control: optional BetaCacheControlEphemeral or null` + High-performance model for agents and coding - Create a cache control breakpoint at this content block. + - `string` -### Beta Output Config + - `to: BetaFallbackInfo` -- `BetaOutputConfig object { effort, format, task_budget }` + The fallback model producing the content that follows this block. Its `model` is always the canonical id. - - `effort: optional "low" or "medium" or "high" or 2 more or null` + - `trigger: BetaFallbackRefusalTrigger` - All possible effort levels. + What caused the `from` model to hand over at this hop. - - `"low"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `"medium"` + The policy category that triggered a refusal. - - `"high"` + - `"cyber"` - - `"xhigh"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `"max"` + - `"bio"` - - `format: optional BetaJSONOutputFormat or null` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + - `"frontier_llm"` - - `schema: map[unknown]` + 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. - The JSON schema of the format + - `"reasoning_extraction"` - - `type: "json_schema"` + 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). - - `"json_schema"` + - `"general_harms"` - - `task_budget: optional BetaTokenTaskBudget or null` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - User-configurable total token budget across contexts. + - `type: "refusal"` - - `total: number` + - `"refusal"` - Total token budget across all contexts in the session. + - `type: "fallback"` - - `type: "tokens"` + - `"fallback"` - The budget type. Currently only 'tokens' is supported. + - `context_management: BetaContextManagementResponse or null` - - `"tokens"` + Context management response. - - `remaining: optional number or null` + Information about context management strategies applied during the request. - Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. + - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` -### Beta Output Tokens Details + List of context management edits that were applied. -- `BetaOutputTokensDetails object { thinking_tokens }` + - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` - - `thinking_tokens: number` + - `cleared_input_tokens: number` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + Number of input tokens cleared by this edit. - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `cleared_tool_uses: number` -### Beta Plain Text Source + Number of tool uses that were cleared. -- `BetaPlainTextSource object { data, media_type, type }` + - `type: "clear_tool_uses_20250919"` - - `data: string` + The type of context management edit applied. - - `media_type: "text/plain"` + - `"clear_tool_uses_20250919"` - - `"text/plain"` + - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` - - `type: "text"` + - `cleared_input_tokens: number` - - `"text"` + Number of input tokens cleared by this edit. -### Beta Raw Content Block Delta + - `cleared_thinking_turns: number` -- `BetaRawContentBlockDelta = BetaTextDelta or BetaInputJSONDelta or BetaCitationsDelta or 3 more` + Number of thinking turns that were cleared. - - `BetaTextDelta object { text, type }` + - `type: "clear_thinking_20251015"` - - `text: string` + The type of context management edit applied. - - `type: "text_delta"` + - `"clear_thinking_20251015"` - - `"text_delta"` + - `diagnostics: BetaDiagnostics or null` - - `BetaInputJSONDelta object { partial_json, type }` + Response envelope for request-level diagnostics. Present (possibly + null) whenever the caller supplied `diagnostics` on the request. - - `partial_json: string` + - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` - - `type: "input_json_delta"` + 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. - - `"input_json_delta"` + - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` - - `BetaCitationsDelta object { citation, type }` + - `cache_missed_input_tokens: number` - - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "model_changed"` - - `cited_text: string` + - `"model_changed"` - - `document_index: number` + - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` - - `document_title: string or null` + - `cache_missed_input_tokens: number` - - `end_char_index: number` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `file_id: string or null` + - `type: "system_changed"` - - `start_char_index: number` + - `"system_changed"` - - `type: "char_location"` + - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` - - `"char_location"` + - `cache_missed_input_tokens: number` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `cited_text: string` + - `type: "tools_changed"` - - `document_index: number` + - `"tools_changed"` - - `document_title: string or null` + - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` - - `end_page_number: number` + - `cache_missed_input_tokens: number` - - `file_id: string or null` + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. - - `start_page_number: number` + - `type: "messages_changed"` - - `type: "page_location"` + - `"messages_changed"` - - `"page_location"` + - `BetaCacheMissPreviousMessageNotFound object { type }` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "previous_message_not_found"` - - `cited_text: string` + - `"previous_message_not_found"` - The full text of the cited block range, concatenated. + - `BetaCacheMissUnavailable object { type }` - 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. + - `type: "unavailable"` - - `document_index: number` + - `"unavailable"` - - `document_title: string or null` + - `model: Model` - - `end_block_index: number` + The model that will complete your prompt. - Exclusive 0-based end index of the cited block range in the source's `content` array. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `role: "assistant"` - - `file_id: string or null` + Conversational role of the generated message. - - `start_block_index: number` + This will always be `"assistant"`. - 0-based index of the first cited block in the source's `content` array. + - `"assistant"` - - `type: "content_block_location"` + - `stop_details: BetaRefusalStopDetails or null` - - `"content_block_location"` + Structured information about a refusal. - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `cited_text: string` + The policy category that triggered a refusal. - - `encrypted_index: string` + - `"cyber"` - - `title: string or null` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `type: "web_search_result_location"` + - `"bio"` - - `"web_search_result_location"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `url: string` + - `"frontier_llm"` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + 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. - - `cited_text: string` + - `"reasoning_extraction"` - The full text of the cited block range, concatenated. + 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). - 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. + - `"general_harms"` - - `end_block_index: number` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `explanation: string or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Human-readable explanation of the refusal. - - `search_result_index: number` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - 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. + - `fallback_credit_token: string or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + Opaque code that refunds the cache-miss cost when retrying this refused + request on the fallback model. Pass it as `fallback_credit_token` on the + retry request. Expires 5 minutes after the refusal. - - `source: string` + The retry is sent either with the same request body (`system`, `messages`, + `tools`, and other render-shaping fields), or with the same body plus one + appended `assistant` message whose content is the partial text (with any + trailing whitespace stripped from the final text block) and paired + server-tool blocks from this refusal — which also authorizes that + appended turn as an assistant-prefill continuation on models that otherwise + disallow prefill. A token minted mid-server-tool-loop whose partial content + was continuable may only be redeemed the second way — if a same-body retry + is rejected with a 400 saying the token must be redeemed by continuing the + partial response, retry the second way instead. Either way: same workspace, + same platform; a mismatch is a 400. Resending a token for an already-warm + prefix is permitted but yields no additional credit. - - `start_block_index: number` + `null` when the refused model isn't eligible for a fallback credit. - 0-based index of the first cited block in the source's `content` array. + - `fallback_has_prefill_claim: boolean or null` - - `title: string or null` + Whether the accompanying `fallback_credit_token` may be redeemed with the + appended-assistant retry form. Only set when `fallback_credit_token` is + present. - - `type: "search_result_location"` + `true`: retry by resending the same request body plus one appended + `assistant` message whose content is this response's `content` with any + trailing whitespace stripped from the final text block and unpaired + `tool_use` blocks omitted (the same appended-turn shape described on + `fallback_credit_token`), with the token attached. `false`: retry by + resending the original request body unchanged, with the token attached — + the appended-assistant form is not available for this refusal (no + continuable partial content, or the request uses `output_format` or a + `tool_choice` that forces tool use). One exception: when the request used + `output_format` or a forced `tool_choice` and the refusal arrived after + server tools (including MCP connector tools) had already executed, the + token may not be redeemable by either retry form; if the exact-body retry + is then rejected with a 400 saying the token must be redeemed by + continuing the partial response, discard the token and retry without it. - - `"search_result_location"` + Advisory: if an appended-assistant retry is rejected with a 400 despite + `true`, fall back to resending the original request body with the token. - - `type: "citations_delta"` + - `recommended_model: string or null` - - `"citations_delta"` + 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. - - `BetaThinkingDelta object { estimated_tokens, thinking, type }` + - `type: "refusal"` - - `estimated_tokens: number or null` + - `"refusal"` - 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. + - `stop_reason: BetaStopReason or null` - - `thinking: string` + The reason that we stopped. - 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. + This may be one the following values: - - `type: "thinking_delta"` + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window - - `"thinking_delta"` + 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. - - `BetaSignatureDelta object { signature, type }` + - `"end_turn"` - - `signature: string` + - `"max_tokens"` - 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. + - `"stop_sequence"` - - `type: "signature_delta"` + - `"tool_use"` - - `"signature_delta"` + - `"pause_turn"` - - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + - `"compaction"` - - `content: string or null` + - `"refusal"` - - `encrypted_content: string or null` + - `"model_context_window_exceeded"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `stop_sequence: string or null` - - `type: "compaction_delta"` + Which custom stop sequence was generated, if any. - - `"compaction_delta"` + This value will be a non-null string if one of your custom stop sequences was generated. -### Beta Raw Content Block Delta Event + - `type: "message"` -- `BetaRawContentBlockDeltaEvent object { delta, index, type }` + Object type. - - `delta: BetaRawContentBlockDelta` + For Messages, this is always `"message"`. - - `BetaTextDelta object { text, type }` + - `"message"` - - `text: string` + - `usage: BetaUsage` - - `type: "text_delta"` + Billing and rate-limit usage. - - `"text_delta"` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - - `BetaInputJSONDelta object { partial_json, type }` + 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. - - `partial_json: string` + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `type: "input_json_delta"` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - - `"input_json_delta"` + - `cache_creation: BetaCacheCreation or null` - - `BetaCitationsDelta object { citation, type }` + Breakdown of cached tokens by TTL - - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` + - `ephemeral_1h_input_tokens: number` - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + The number of input tokens used to create the 1 hour cache entry. - - `cited_text: string` + - `ephemeral_5m_input_tokens: number` - - `document_index: number` + The number of input tokens used to create the 5 minute cache entry. - - `document_title: string or null` + - `cache_creation_input_tokens: number or null` - - `end_char_index: number` + The number of input tokens used to create the cache entry. - - `file_id: string or null` + - `cache_read_input_tokens: number or null` - - `start_char_index: number` + The number of input tokens read from the cache. - - `type: "char_location"` + - `fallback_credit: BetaFallbackCreditUsage or null` - - `"char_location"` + Outcome of the `fallback_credit_token` presented on this request. - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` - - `cited_text: string` + Whether the fallback-credit reprice was applied to this response's billing. - - `document_index: number` + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. - - `document_title: string or null` + - `BetaFallbackCreditRedeemed object { type }` - - `end_page_number: number` + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. - - `file_id: string or null` + - `type: "redeemed"` - - `start_page_number: number` + - `"redeemed"` - - `type: "page_location"` + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` - - `"page_location"` + No reprice was applied; `reason` says why. - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` - - `cited_text: string` + Why the reprice was not applied. - The full text of the cited block range, concatenated. + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. - 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. + - `"body_mismatch"` - - `document_index: number` + - `"continuation_excluded"` - - `document_title: string or null` + - `"continuation_only"` - - `end_block_index: number` + - `"expired"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"invalid_target_model"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"not_enabled"` - - `file_id: string or null` + - `"reprice_unavailable"` - - `start_block_index: number` + - `"temporarily_unavailable"` - 0-based index of the first cited block in the source's `content` array. + - `"variant_fields_present"` - - `type: "content_block_location"` + - `"wrong_organization"` - - `"content_block_location"` + - `"wrong_platform"` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"wrong_workspace"` - - `cited_text: string` + - `type: "not_applied"` - - `encrypted_index: string` + - `"not_applied"` - - `title: string or null` + - `remove_to_redeem: optional array of string or null` - - `type: "web_search_result_location"` + Request fields to remove before retrying, so the retry can redeem this + token. - - `"web_search_result_location"` + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. - - `url: string` + - `inference_geo: string or null` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + The geographic region where inference was performed for this request. - - `cited_text: string` + - `input_tokens: number` - The full text of the cited block range, concatenated. + The number of input tokens which were used. - 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. + - `iterations: BetaIterationsUsage or null` - - `end_block_index: number` + Per-iteration token usage breakdown. - Exclusive 0-based end index of the cited block range in the source's `content` array. + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops - - `search_result_index: number` + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - 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. + Token usage for a sampling iteration. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `cache_creation: BetaCacheCreation or null` - - `source: string` + Breakdown of cached tokens by TTL - - `start_block_index: number` + - `cache_creation_input_tokens: number` - 0-based index of the first cited block in the source's `content` array. + The number of input tokens used to create the cache entry. - - `title: string or null` + - `cache_read_input_tokens: number` - - `type: "search_result_location"` + The number of input tokens read from the cache. - - `"search_result_location"` + - `input_tokens: number` - - `type: "citations_delta"` + The number of input tokens which were used. - - `"citations_delta"` + - `model: Model` - - `BetaThinkingDelta object { estimated_tokens, thinking, type }` + The model that will complete your prompt. - - `estimated_tokens: number or null` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - 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. + - `output_tokens: number` - - `thinking: string` + The number of output tokens which were used. - 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. + - `type: "message"` - - `type: "thinking_delta"` + Usage for a sampling iteration - - `"thinking_delta"` + - `"message"` - - `BetaSignatureDelta object { signature, type }` + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` - - `signature: string` + Token usage for a compaction iteration. - 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. + - `cache_creation: BetaCacheCreation or null` - - `type: "signature_delta"` + Breakdown of cached tokens by TTL - - `"signature_delta"` + - `cache_creation_input_tokens: number` - - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + The number of input tokens used to create the cache entry. - - `content: string or null` + - `cache_read_input_tokens: number` - - `encrypted_content: string or null` + The number of input tokens read from the cache. - Opaque metadata from prior compaction, to be round-tripped verbatim + - `input_tokens: number` - - `type: "compaction_delta"` + The number of input tokens which were used. - - `"compaction_delta"` + - `output_tokens: number` - - `index: number` + The number of output tokens which were used. - - `type: "content_block_delta"` + - `type: "compaction"` - - `"content_block_delta"` + Usage for a compaction iteration -### Beta Raw Content Block Start Event + - `"compaction"` -- `BetaRawContentBlockStartEvent object { content_block, index, type }` + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `content_block: BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` + Token usage for an advisor sub-inference iteration. - Response model for a file uploaded to the container. + - `cache_creation: BetaCacheCreation or null` - - `BetaTextBlock object { citations, text, type }` + Breakdown of cached tokens by TTL - - `citations: array of BetaTextCitation or null` + - `cache_creation_input_tokens: number` - Citations supporting the text block. + The number of input tokens used to create the cache entry. - 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`. + - `cache_read_input_tokens: number` - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + The number of input tokens read from the cache. - - `cited_text: string` + - `input_tokens: number` - - `document_index: number` + The number of input tokens which were used. - - `document_title: string or null` + - `model: Model` - - `end_char_index: number` + The model that will complete your prompt. - - `file_id: string or null` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `start_char_index: number` + - `output_tokens: number` - - `type: "char_location"` + The number of output tokens which were used. - - `"char_location"` + - `type: "advisor_message"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + Usage for an advisor sub-inference iteration - - `cited_text: string` + - `"advisor_message"` - - `document_index: number` + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `document_title: string or null` + Token usage for the fallback-model attempt of a server-side fallback request. - - `end_page_number: number` + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. - - `file_id: string or null` + - `cache_creation: BetaCacheCreation or null` - - `start_page_number: number` + Breakdown of cached tokens by TTL - - `type: "page_location"` + - `cache_creation_input_tokens: number` - - `"page_location"` + The number of input tokens used to create the cache entry. - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `cache_read_input_tokens: number` - - `cited_text: string` + The number of input tokens read from the cache. - The full text of the cited block range, concatenated. + - `input_tokens: number` - 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. + The number of input tokens which were used. - - `document_index: number` + - `model: Model` - - `document_title: string or null` + The model that will complete your prompt. - - `end_block_index: number` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `output_tokens: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + The number of output tokens which were used. - - `file_id: string or null` + - `type: "fallback_message"` - - `start_block_index: number` + Usage for the fallback-model attempt that served the response - 0-based index of the first cited block in the source's `content` array. + - `"fallback_message"` - - `type: "content_block_location"` + - `output_tokens: number` - - `"content_block_location"` + The number of output tokens which were used. - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `output_tokens_details: BetaOutputTokensDetails or null` - - `cited_text: string` + Breakdown of output tokens by category. - - `encrypted_index: string` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `title: string or null` + - `thinking_tokens: number` - - `type: "web_search_result_location"` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `"web_search_result_location"` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `url: string` + - `server_tool_use: BetaServerToolUsage or null` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + The number of server tool requests. - - `cited_text: string` + - `web_fetch_requests: number` - The full text of the cited block range, concatenated. + The number of web fetch tool requests. - 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. + - `web_search_requests: number` - - `end_block_index: number` + The number of web search tool requests. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `service_tier: "standard" or "priority" or "batch" or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + If the request used the priority, standard, or batch tier. - - `search_result_index: number` + - `"standard"` - 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. + - `"priority"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"batch"` - - `source: string` + - `speed: "standard" or "fast" or null` - - `start_block_index: number` + 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. - 0-based index of the first cited block in the source's `content` array. + - `"standard"` - - `title: string or null` + - `"fast"` - - `type: "search_result_location"` +### Beta Message Delta Usage - - `"search_result_location"` +- `BetaMessageDeltaUsage object { cache_creation_input_tokens, cache_read_input_tokens, fallback_credit, 5 more }` - - `text: string` + - `cache_creation_input_tokens: number or null` - - `type: "text"` + The cumulative number of input tokens used to create the cache entry. - - `"text"` + - `cache_read_input_tokens: number or null` - - `BetaThinkingBlock object { signature, thinking, type }` + The cumulative number of input tokens read from the cache. - - `signature: string` + - `fallback_credit: BetaFallbackCreditUsage or null` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + Outcome of the `fallback_credit_token` presented on this request. - 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. + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + Whether the fallback-credit reprice was applied to this response's billing. - - `thinking: string` + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. - The text of Claude's thinking process for this block. + - `BetaFallbackCreditRedeemed object { type }` - - `type: "thinking"` + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. - - `"thinking"` + - `type: "redeemed"` - - `BetaRedactedThinkingBlock object { data, type }` + - `"redeemed"` - - `data: string` + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` - 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. + No reprice was applied; `reason` says why. - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + Why the reprice was not applied. - - `type: "redacted_thinking"` + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. - - `"redacted_thinking"` + - `"body_mismatch"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `"continuation_excluded"` - - `id: string` + - `"continuation_only"` - - `input: map[unknown]` + - `"expired"` - - `name: string` + - `"invalid_target_model"` - - `type: "tool_use"` + - `"not_enabled"` - - `"tool_use"` + - `"reprice_unavailable"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"temporarily_unavailable"` - Tool invocation directly from the model. + - `"variant_fields_present"` - - `BetaDirectCaller object { type }` + - `"wrong_organization"` - Tool invocation directly from the model. + - `"wrong_platform"` - - `type: "direct"` + - `"wrong_workspace"` - - `"direct"` + - `type: "not_applied"` - - `BetaServerToolCaller object { tool_id, type }` + - `"not_applied"` - Tool invocation generated by a server-side tool. + - `remove_to_redeem: optional array of string or null` - - `tool_id: string` + Request fields to remove before retrying, so the retry can redeem this + token. - - `type: "code_execution_20250825"` + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. - - `"code_execution_20250825"` + - `input_tokens: number or null` - - `BetaServerToolCaller20260120 object { tool_id, type }` + The cumulative number of input tokens which were used. - - `tool_id: string` + - `iterations: BetaIterationsUsage or null` - - `type: "code_execution_20260120"` + Per-iteration token usage breakdown. - - `"code_execution_20260120"` + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops - - `id: string` + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `input: map[unknown]` + Token usage for a sampling iteration. - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + - `cache_creation: BetaCacheCreation or null` - - `"advisor"` + Breakdown of cached tokens by TTL - - `"web_search"` + - `ephemeral_1h_input_tokens: number` - - `"web_fetch"` + The number of input tokens used to create the 1 hour cache entry. - - `"code_execution"` + - `ephemeral_5m_input_tokens: number` - - `"bash_code_execution"` + The number of input tokens used to create the 5 minute cache entry. - - `"text_editor_code_execution"` + - `cache_creation_input_tokens: number` - - `"tool_search_tool_regex"` + The number of input tokens used to create the cache entry. - - `"tool_search_tool_bm25"` + - `cache_read_input_tokens: number` - - `type: "server_tool_use"` + The number of input tokens read from the cache. - - `"server_tool_use"` + - `input_tokens: number` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + The number of input tokens which were used. - Tool invocation directly from the model. + - `model: Model` - - `BetaDirectCaller object { type }` + The model that will complete your prompt. - Tool invocation directly from the model. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaServerToolCaller object { tool_id, type }` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - Tool invocation generated by a server-side tool. + The model that will complete your prompt. - - `BetaServerToolCaller20260120 object { tool_id, type }` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + - `"claude-sonnet-5"` - - `content: BetaWebSearchToolResultBlockContent` + High-performance model for coding and agents - - `BetaWebSearchToolResultError object { error_code, type }` + - `"claude-fable-5"` - - `error_code: BetaWebSearchToolResultErrorCode` + Next generation of intelligence for the hardest knowledge work and coding problems - - `"invalid_tool_input"` + - `"claude-mythos-5"` - - `"unavailable"` + Most capable model for cybersecurity and biology research - - `"max_uses_exceeded"` + - `"claude-opus-5"` - - `"too_many_requests"` + Powerful intelligence for long-running agents and coding - - `"query_too_long"` + - `"claude-opus-4-8"` - - `"request_too_large"` + Powerful intelligence for long-running agents and coding - - `type: "web_search_tool_result_error"` + - `"claude-opus-4-7"` - - `"web_search_tool_result_error"` + Powerful intelligence for long-running agents and coding - - `array of BetaWebSearchResultBlock` + - `"claude-mythos-preview"` - - `encrypted_content: string` + New class of intelligence, strongest in coding and cybersecurity - - `page_age: string or null` + - `"claude-opus-4-6"` - - `title: string` + Powerful intelligence for long-running agents and coding - - `type: "web_search_result"` + - `"claude-sonnet-4-6"` - - `"web_search_result"` + Best combination of speed and intelligence - - `url: string` + - `"claude-haiku-4-5"` - - `tool_use_id: string` + Fastest model with near-frontier intelligence - - `type: "web_search_tool_result"` + - `"claude-haiku-4-5-20251001"` - - `"web_search_tool_result"` + Fastest model with near-frontier intelligence - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `"claude-opus-4-5"` - Tool invocation directly from the model. + Powerful intelligence for long-running agents and coding - - `BetaDirectCaller object { type }` + - `"claude-opus-4-5-20251101"` - Tool invocation directly from the model. + Powerful intelligence for long-running agents and coding - - `BetaServerToolCaller object { tool_id, type }` + - `"claude-sonnet-4-5"` - Tool invocation generated by a server-side tool. + High-performance model for agents and coding - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"claude-sonnet-4-5-20250929"` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + High-performance model for agents and coding - - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + - `string` - - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + - `output_tokens: number` - - `error_code: BetaWebFetchToolResultErrorCode` + The number of output tokens which were used. - - `"invalid_tool_input"` + - `type: "message"` - - `"url_too_long"` + Usage for a sampling iteration - - `"url_not_allowed"` + - `"message"` - - `"url_not_in_prior_context"` + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` - - `"url_not_accessible"` + Token usage for a compaction iteration. - - `"unsupported_content_type"` + - `cache_creation: BetaCacheCreation or null` - - `"too_many_requests"` + Breakdown of cached tokens by TTL - - `"max_uses_exceeded"` + - `cache_creation_input_tokens: number` - - `"unavailable"` + The number of input tokens used to create the cache entry. - - `type: "web_fetch_tool_result_error"` + - `cache_read_input_tokens: number` - - `"web_fetch_tool_result_error"` + The number of input tokens read from the cache. - - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + - `input_tokens: number` - - `content: BetaDocumentBlock` + The number of input tokens which were used. - - `citations: BetaCitationConfig or null` + - `output_tokens: number` - Citation configuration for the document + The number of output tokens which were used. - - `enabled: boolean` + - `type: "compaction"` - - `source: BetaBase64PDFSource or BetaPlainTextSource` + Usage for a compaction iteration - - `BetaBase64PDFSource object { data, media_type, type }` + - `"compaction"` - - `data: string` + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `media_type: "application/pdf"` + Token usage for an advisor sub-inference iteration. - - `"application/pdf"` + - `cache_creation: BetaCacheCreation or null` - - `type: "base64"` + Breakdown of cached tokens by TTL - - `"base64"` + - `cache_creation_input_tokens: number` - - `BetaPlainTextSource object { data, media_type, type }` + The number of input tokens used to create the cache entry. - - `data: string` + - `cache_read_input_tokens: number` - - `media_type: "text/plain"` + The number of input tokens read from the cache. - - `"text/plain"` + - `input_tokens: number` - - `type: "text"` + The number of input tokens which were used. - - `"text"` + - `model: Model` - - `title: string or null` + The model that will complete your prompt. - The title of the document + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `type: "document"` + - `output_tokens: number` - - `"document"` + The number of output tokens which were used. - - `retrieved_at: string or null` + - `type: "advisor_message"` - ISO 8601 timestamp when the content was retrieved + Usage for an advisor sub-inference iteration - - `type: "web_fetch_result"` + - `"advisor_message"` - - `"web_fetch_result"` + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `url: string` + Token usage for the fallback-model attempt of a server-side fallback request. - Fetched content URL + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. - - `tool_use_id: string` + - `cache_creation: BetaCacheCreation or null` - - `type: "web_fetch_tool_result"` + Breakdown of cached tokens by TTL - - `"web_fetch_tool_result"` + - `cache_creation_input_tokens: number` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + The number of input tokens used to create the cache entry. - Tool invocation directly from the model. + - `cache_read_input_tokens: number` - - `BetaDirectCaller object { type }` + The number of input tokens read from the cache. - Tool invocation directly from the model. + - `input_tokens: number` - - `BetaServerToolCaller object { tool_id, type }` + The number of input tokens which were used. - Tool invocation generated by a server-side tool. + - `model: Model` - - `BetaServerToolCaller20260120 object { tool_id, type }` + The model that will complete your prompt. - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` + - `output_tokens: number` - - `BetaAdvisorToolResultError object { error_code, type }` + The number of output tokens which were used. - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + - `type: "fallback_message"` - - `"max_uses_exceeded"` + Usage for the fallback-model attempt that served the response - - `"prompt_too_long"` + - `"fallback_message"` - - `"too_many_requests"` + - `output_tokens: number` - - `"overloaded"` + The cumulative number of output tokens which were used. - - `"unavailable"` + - `output_tokens_details: BetaOutputTokensDetails or null` - - `"execution_time_exceeded"` + Breakdown of output tokens by category. - - `"model_not_found"` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `type: "advisor_tool_result_error"` + - `thinking_tokens: number` - - `"advisor_tool_result_error"` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `BetaAdvisorResultBlock object { stop_reason, text, type }` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `stop_reason: string or null` + - `server_tool_use: BetaServerToolUsage or null` - 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. + The number of server tool requests. - - `text: string` + - `web_fetch_requests: number` - - `type: "advisor_result"` + The number of web fetch tool requests. - - `"advisor_result"` + - `web_search_requests: number` - - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + The number of web search tool requests. - - `encrypted_content: string` +### Beta Message Iteration Usage - Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. +- `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `stop_reason: string or null` + Token usage for a sampling iteration. - The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + - `cache_creation: BetaCacheCreation or null` - - `type: "advisor_redacted_result"` + Breakdown of cached tokens by TTL - - `"advisor_redacted_result"` + - `ephemeral_1h_input_tokens: number` - - `tool_use_id: string` + The number of input tokens used to create the 1 hour cache entry. - - `type: "advisor_tool_result"` + - `ephemeral_5m_input_tokens: number` - - `"advisor_tool_result"` + The number of input tokens used to create the 5 minute cache entry. - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `cache_creation_input_tokens: number` - - `content: BetaCodeExecutionToolResultBlockContent` + The number of input tokens used to create the cache entry. - Code execution result with encrypted stdout for PFC + web_search results. + - `cache_read_input_tokens: number` - - `BetaCodeExecutionToolResultError object { error_code, type }` + The number of input tokens read from the cache. - - `error_code: BetaCodeExecutionToolResultErrorCode` + - `input_tokens: number` - - `"invalid_tool_input"` + The number of input tokens which were used. - - `"unavailable"` + - `model: Model` - - `"too_many_requests"` + The model that will complete your prompt. - - `"execution_time_exceeded"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `type: "code_execution_tool_result_error"` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `"code_execution_tool_result_error"` + The model that will complete your prompt. - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `content: array of BetaCodeExecutionOutputBlock` + - `"claude-sonnet-5"` - - `file_id: string` + High-performance model for coding and agents - - `type: "code_execution_output"` + - `"claude-fable-5"` - - `"code_execution_output"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `return_code: number` + - `"claude-mythos-5"` - - `stderr: string` + Most capable model for cybersecurity and biology research - - `stdout: string` + - `"claude-opus-5"` - - `type: "code_execution_result"` + Powerful intelligence for long-running agents and coding - - `"code_execution_result"` + - `"claude-opus-4-8"` - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + Powerful intelligence for long-running agents and coding - Code execution result with encrypted stdout for PFC + web_search results. + - `"claude-opus-4-7"` - - `content: array of BetaCodeExecutionOutputBlock` + Powerful intelligence for long-running agents and coding - - `file_id: string` + - `"claude-mythos-preview"` - - `type: "code_execution_output"` + New class of intelligence, strongest in coding and cybersecurity - - `encrypted_stdout: string` + - `"claude-opus-4-6"` - - `return_code: number` + Powerful intelligence for long-running agents and coding - - `stderr: string` + - `"claude-sonnet-4-6"` - - `type: "encrypted_code_execution_result"` + Best combination of speed and intelligence - - `"encrypted_code_execution_result"` + - `"claude-haiku-4-5"` - - `tool_use_id: string` + Fastest model with near-frontier intelligence - - `type: "code_execution_tool_result"` + - `"claude-haiku-4-5-20251001"` - - `"code_execution_tool_result"` + Fastest model with near-frontier intelligence - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"claude-opus-4-5"` - - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + Powerful intelligence for long-running agents and coding - - `BetaBashCodeExecutionToolResultError object { error_code, type }` + - `"claude-opus-4-5-20251101"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + Powerful intelligence for long-running agents and coding - - `"invalid_tool_input"` + - `"claude-sonnet-4-5"` - - `"unavailable"` + High-performance model for agents and coding - - `"too_many_requests"` + - `"claude-sonnet-4-5-20250929"` - - `"execution_time_exceeded"` + High-performance model for agents and coding - - `"output_file_too_large"` + - `string` - - `type: "bash_code_execution_tool_result_error"` + - `output_tokens: number` - - `"bash_code_execution_tool_result_error"` + The number of output tokens which were used. - - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `type: "message"` - - `content: array of BetaBashCodeExecutionOutputBlock` + Usage for a sampling iteration - - `file_id: string` + - `"message"` - - `type: "bash_code_execution_output"` +### Beta Message Param - - `"bash_code_execution_output"` +- `BetaMessageParam object { content, role }` - - `return_code: number` + - `content: string or array of BetaContentBlockParam` - - `stderr: string` + - `string` - - `stdout: string` + - `array of BetaContentBlockParam` - - `type: "bash_code_execution_result"` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `"bash_code_execution_result"` + - `text: string` - - `tool_use_id: string` + - `type: "text"` - - `type: "bash_code_execution_tool_result"` + - `"text"` - - `"bash_code_execution_tool_result"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Create a cache control breakpoint at this content block. - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + - `type: "ephemeral"` - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"ephemeral"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `ttl: optional "5m" or "1h"` - - `"invalid_tool_input"` + The time-to-live for the cache control breakpoint. - - `"unavailable"` + This may be one the following values: - - `"too_many_requests"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"execution_time_exceeded"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"file_not_found"` + - `"5m"` - - `error_message: string or null` + - `"1h"` - - `type: "text_editor_code_execution_tool_result_error"` + - `citations: optional array of BetaTextCitationParam or null` - - `"text_editor_code_execution_tool_result_error"` + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `cited_text: string` - - `content: string` + - `document_index: number` - - `file_type: "text" or "image" or "pdf"` + - `document_title: string or null` - - `"text"` + - `end_char_index: number` - - `"image"` + - `start_char_index: number` - - `"pdf"` + - `type: "char_location"` - - `num_lines: number or null` + - `"char_location"` - - `start_line: number or null` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `total_lines: number or null` + - `cited_text: string` - - `type: "text_editor_code_execution_view_result"` + - `document_index: number` - - `"text_editor_code_execution_view_result"` + - `document_title: string or null` - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `end_page_number: number` - - `is_file_update: boolean` + - `start_page_number: number` - - `type: "text_editor_code_execution_create_result"` + - `type: "page_location"` - - `"text_editor_code_execution_create_result"` + - `"page_location"` - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `lines: array of string or null` + - `cited_text: string` - - `new_lines: number or null` + The full text of the cited block range, concatenated. - - `new_start: number or null` + 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. - - `old_lines: number or null` + - `document_index: number` - - `old_start: number or null` + - `document_title: string or null` - - `type: "text_editor_code_execution_str_replace_result"` + - `end_block_index: number` - - `"text_editor_code_execution_str_replace_result"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `tool_use_id: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "text_editor_code_execution_tool_result"` + - `start_block_index: number` - - `"text_editor_code_execution_tool_result"` + 0-based index of the first cited block in the source's `content` array. - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `type: "content_block_location"` - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + - `"content_block_location"` - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `cited_text: string` - - `"invalid_tool_input"` + - `encrypted_index: string` - - `"unavailable"` + - `title: string or null` - - `"too_many_requests"` + - `type: "web_search_result_location"` - - `"execution_time_exceeded"` + - `"web_search_result_location"` - - `error_message: string or null` + - `url: string` - - `type: "tool_search_tool_result_error"` + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"tool_search_tool_result_error"` + - `cited_text: string` - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + The full text of the cited block range, concatenated. - - `tool_references: array of BetaToolReferenceBlock` + 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. - - `tool_name: string` + - `end_block_index: number` - - `type: "tool_reference"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"tool_reference"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "tool_search_tool_search_result"` + - `search_result_index: number` - - `"tool_search_tool_search_result"` + 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. - - `tool_use_id: string` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `type: "tool_search_tool_result"` + - `source: string` - - `"tool_search_tool_result"` + - `start_block_index: number` - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + 0-based index of the first cited block in the source's `content` array. - - `id: string` + - `title: string or null` - - `input: map[unknown]` + - `type: "search_result_location"` - - `name: string` + - `"search_result_location"` - The name of the MCP tool + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - - `server_name: string` + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - The name of the MCP server + - `BetaBase64ImageSource object { data, media_type, type }` - - `type: "mcp_tool_use"` + - `data: string` - - `"mcp_tool_use"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `"image/jpeg"` - - `content: string or array of BetaTextBlock` + - `"image/png"` - - `string` + - `"image/gif"` - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + - `"image/webp"` - - `citations: array of BetaTextCitation or null` + - `type: "base64"` - Citations supporting the text block. + - `"base64"` - 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`. + - `BetaURLImageSource object { type, url }` - - `text: string` + - `type: "url"` - - `type: "text"` + - `"url"` - - `is_error: boolean` + - `url: string` - - `tool_use_id: string` + - `BetaFileImageSource object { file_id, type }` - - `type: "mcp_tool_result"` + - `file_id: string` - - `"mcp_tool_result"` + - `type: "file"` - - `BetaContainerUploadBlock object { file_id, type }` + - `"file"` - Response model for a file uploaded to the container. + - `type: "image"` - - `file_id: string` + - `"image"` - - `type: "container_upload"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"container_upload"` + Create a cache control breakpoint at this content block. - - `BetaCompactionBlock object { content, encrypted_content, type }` + - `transformations: optional BetaImageTransformationsParam or null` - A compaction block returned when autocompact is triggered. + 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. - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + - `oversized_image: optional "downsize" or "error"` - - `content: string or null` + 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. - Summary of compacted content, or null if compaction failed + - `"downsize"` - - `encrypted_content: string or null` + - `"error"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - - `type: "compaction"` + - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` - - `"compaction"` + - `BetaBase64PDFSource object { data, media_type, type }` - - `BetaFallbackBlock object { from, to, trigger, type }` + - `data: string` - Marks the point in `content` where one model's output gives way to the next. + - `media_type: "application/pdf"` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + - `"application/pdf"` - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `type: "base64"` - - `from: BetaFallbackInfo` + - `"base64"` - 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. + - `BetaPlainTextSource object { data, media_type, type }` - - `model: Model` + - `data: string` - The model that will complete your prompt. + - `media_type: "text/plain"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"text/plain"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "text"` - The model that will complete your prompt. + - `"text"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `BetaContentBlockSource object { content, type }` - - `"claude-sonnet-5"` + - `content: string or array of BetaContentBlockSourceContent` - High-performance model for coding and agents + - `string` - - `"claude-fable-5"` + - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` - Next generation of intelligence for the hardest knowledge work and coding problems + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `"claude-mythos-5"` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - Most capable model for cybersecurity and biology research + - `type: "content"` - - `"claude-opus-5"` + - `"content"` - Powerful intelligence for long-running agents and coding + - `BetaURLPDFSource object { type, url }` - - `"claude-opus-4-8"` + - `type: "url"` - Powerful intelligence for long-running agents and coding + - `"url"` - - `"claude-opus-4-7"` + - `url: string` - Powerful intelligence for long-running agents and coding + - `BetaFileDocumentSource object { file_id, type }` - - `"claude-mythos-preview"` + - `file_id: string` - New class of intelligence, strongest in coding and cybersecurity + - `type: "file"` - - `"claude-opus-4-6"` + - `"file"` - Powerful intelligence for long-running agents and coding + - `type: "document"` - - `"claude-sonnet-4-6"` + - `"document"` - Best combination of speed and intelligence + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-haiku-4-5"` + Create a cache control breakpoint at this content block. - Fastest model with near-frontier intelligence + - `citations: optional BetaCitationsConfigParam or null` - - `"claude-haiku-4-5-20251001"` + - `enabled: optional boolean` - Fastest model with near-frontier intelligence + - `context: optional string or null` - - `"claude-opus-4-5"` + - `title: optional string or null` - Powerful intelligence for long-running agents and coding + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - - `"claude-opus-4-5-20251101"` + - `content: array of BetaTextBlockParam` - Powerful intelligence for long-running agents and coding + - `text: string` - - `"claude-sonnet-4-5"` + - `type: "text"` - High-performance model for agents and coding + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"claude-sonnet-4-5-20250929"` + Create a cache control breakpoint at this content block. - High-performance model for agents and coding + - `citations: optional array of BetaTextCitationParam or null` - - `string` + - `source: string` - - `to: BetaFallbackInfo` + - `title: string` - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + - `type: "search_result"` - - `trigger: BetaFallbackRefusalTrigger` + - `"search_result"` - What caused the `from` model to hand over at this hop. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + Create a cache control breakpoint at this content block. - The policy category that triggered a refusal. + - `citations: optional BetaCitationsConfigParam` - - `"cyber"` + - `BetaThinkingBlockParam object { signature, thinking, type }` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `signature: string` - - `"bio"` + 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. - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - - `"frontier_llm"` + - `thinking: string` - 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. + The `thinking` text of this block as returned by the API. - - `"reasoning_extraction"` + - `type: "thinking"` - 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). + - `"thinking"` - - `"general_harms"` + - `BetaRedactedThinkingBlockParam object { data, type }` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `data: string` - - `type: "refusal"` + 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. - - `"refusal"` + - `type: "redacted_thinking"` - - `type: "fallback"` + - `"redacted_thinking"` - - `"fallback"` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - - `index: number` + - `id: string` - - `type: "content_block_start"` + - `input: map[unknown]` - - `"content_block_start"` + - `name: string` -### Beta Raw Content Block Stop Event + - `type: "tool_use"` -- `BetaRawContentBlockStopEvent object { index, type }` + - `"tool_use"` - - `index: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "content_block_stop"` + Create a cache control breakpoint at this content block. - - `"content_block_stop"` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` -### Beta Raw Message Delta Event + Tool invocation directly from the model. -- `BetaRawMessageDeltaEvent object { context_management, delta, type, usage }` + - `BetaDirectCaller object { type }` - - `context_management: BetaContextManagementResponse or null` + Tool invocation directly from the model. - Information about context management strategies applied during the request + - `type: "direct"` - - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + - `"direct"` - List of context management edits that were applied. + - `BetaServerToolCaller object { tool_id, type }` - - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + Tool invocation generated by a server-side tool. - - `cleared_input_tokens: number` + - `tool_id: string` - Number of input tokens cleared by this edit. + - `type: "code_execution_20250825"` - - `cleared_tool_uses: number` + - `"code_execution_20250825"` - Number of tool uses that were cleared. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `type: "clear_tool_uses_20250919"` + - `tool_id: string` - The type of context management edit applied. + - `type: "code_execution_20260120"` - - `"clear_tool_uses_20250919"` + - `"code_execution_20260120"` - - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `toolset_name: optional string or null` - - `cleared_input_tokens: number` + For a toolset member tool_use, the toolset family this member belongs to. - Number of input tokens cleared by this edit. + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `cleared_thinking_turns: number` + - `tool_use_id: string` - Number of thinking turns that were cleared. + - `type: "tool_result"` - - `type: "clear_thinking_20251015"` + - `"tool_result"` - The type of context management edit applied. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"clear_thinking_20251015"` + Create a cache control breakpoint at this content block. - - `delta: object { container, stop_details, stop_reason, stop_sequence }` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - - `container: BetaContainer or null` + - `string` - Information about the container used in the request (for the code execution tool) + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - - `id: string` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - Identifier for the container used in this request + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - - `expires_at: string` + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - The time at which the container will expire. + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - - `skills: array of BetaSkill or null` + - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` - Skills loaded in the container + Tool reference block that can be included in tool_result content. - - `skill_id: string` + - `tool_name: string` - Skill ID + - `type: "tool_reference"` - - `type: "anthropic" or "custom"` + - `"tool_reference"` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"anthropic"` + Create a cache control breakpoint at this content block. - - `"custom"` + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `version: string` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - Skill version or 'latest' for most recent version + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `stop_details: BetaRefusalStopDetails or null` + - `tabs: array of BetaBrowserStateTabEntry` - Structured information about a refusal. + 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`. - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `tab_id: string` - The policy category that triggered a refusal. + The caller-assigned identifier for this tab, unique within the inventory. - - `"cyber"` + - `title: string` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + The title of the page the tab is showing. May be empty. - - `"bio"` + - `url: string` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + The URL of the page the tab is showing. May be empty. - - `"frontier_llm"` + - `active: optional boolean` - 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. + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `"reasoning_extraction"` + - `type: "browser_state"` - 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). + - `"browser_state"` - - `"general_harms"` + - `cache_control: optional BetaCacheControlEphemeral or null` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + Create a cache control breakpoint at this content block. - - `explanation: string or null` + - `state_changes: optional array of BetaBrowserStateChange or null` - Human-readable explanation of the refusal. + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` - - `fallback_credit_token: string or null` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - Opaque code that refunds the cache-miss cost when retrying this refused - request on the fallback model. Pass it as `fallback_credit_token` on the - retry request. Expires 5 minutes after the refusal. + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - The retry is sent either with the same request body (`system`, `messages`, - `tools`, and other render-shaping fields), or with the same body plus one - appended `assistant` message whose content is the partial text (with any - trailing whitespace stripped from the final text block) and paired - server-tool blocks from this refusal — which also authorizes that - appended turn as an assistant-prefill continuation on models that otherwise - disallow prefill. A token minted mid-server-tool-loop whose partial content - was continuable may only be redeemed the second way — if a same-body retry - is rejected with a 400 saying the token must be redeemed by continuing the - partial response, retry the second way instead. Either way: same workspace, - same platform; a mismatch is a 400. Resending a token for an already-warm - prefix is permitted but yields no additional credit. + - `tab_id: string` - `null` when the refused model isn't eligible for a fallback credit. + The `tab_id` of the opened tab, present in `tabs`. - - `fallback_has_prefill_claim: boolean or null` + - `type: "tab_opened"` - Whether the accompanying `fallback_credit_token` may be redeemed with the - appended-assistant retry form. Only set when `fallback_credit_token` is - present. + - `"tab_opened"` - `true`: retry by resending the same request body plus one appended - `assistant` message whose content is this response's `content` with any - trailing whitespace stripped from the final text block and unpaired - `tool_use` blocks omitted (the same appended-turn shape described on - `fallback_credit_token`), with the token attached. `false`: retry by - resending the original request body unchanged, with the token attached — - the appended-assistant form is not available for this refusal (no - continuable partial content, or the request uses `output_format` or a - `tool_choice` that forces tool use). One exception: when the request used - `output_format` or a forced `tool_choice` and the refusal arrived after - server tools (including MCP connector tools) had already executed, the - token may not be redeemable by either retry form; if the exact-body retry - is then rejected with a 400 saying the token must be redeemed by - continuing the partial response, discard the token and retry without it. + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` - Advisory: if an appended-assistant retry is rejected with a 400 despite - `true`, fall back to resending the original request body with the token. + A file download that started during this call. - - `recommended_model: string or null` + - `download_id: string` - 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. + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `type: "refusal"` + - `type: "download_started"` - - `"refusal"` + - `"download_started"` - - `stop_reason: BetaStopReason or null` + - `url: string` - - `"end_turn"` + The final post-redirect URL the download was served from. - - `"max_tokens"` + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `"stop_sequence"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - - `"tool_use"` + - `download_id: string` - - `"pause_turn"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `"compaction"` + - `type: "download_completed"` - - `"refusal"` + - `"download_completed"` - - `"model_context_window_exceeded"` + - `url: string` - - `stop_sequence: string or null` + The final post-redirect URL the download was served from. - - `type: "message_delta"` + - `path: optional string or null` - - `"message_delta"` + 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. - - `usage: BetaMessageDeltaUsage` + - `size_bytes: optional number or null` - Billing and rate-limit usage. + The completed download's size. - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - 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. + A file download that failed — or was cancelled — during this call. - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `download_id: string` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `cache_creation_input_tokens: number or null` + - `type: "download_failed"` - The cumulative number of input tokens used to create the cache entry. + - `"download_failed"` - - `cache_read_input_tokens: number or null` + - `url: string` - The cumulative number of input tokens read from the cache. + The final post-redirect URL the download was served from. - - `fallback_credit: BetaFallbackCreditUsage or null` + - `error: optional string or null` - Outcome of the `fallback_credit_token` presented on this request. + The failure or cancellation detail, when known. - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + - `is_error: optional boolean` - Whether the fallback-credit reprice was applied to this response's billing. + - `toolset_name: optional string or null` - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + For a toolset member tool_result, the toolset family of the paired tool_use. - - `BetaFallbackCreditRedeemed object { type }` + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + - `id: string` - - `type: "redeemed"` + - `input: map[unknown]` - - `"redeemed"` + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `"advisor"` - No reprice was applied; `reason` says why. + - `"web_search"` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `"web_fetch"` - Why the reprice was not applied. + - `"code_execution"` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `"bash_code_execution"` - - `"body_mismatch"` + - `"text_editor_code_execution"` - - `"continuation_excluded"` + - `"tool_search_tool_regex"` - - `"continuation_only"` + - `"tool_search_tool_bm25"` - - `"expired"` + - `type: "server_tool_use"` - - `"invalid_target_model"` + - `"server_tool_use"` - - `"not_enabled"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"reprice_unavailable"` + Create a cache control breakpoint at this content block. - - `"temporarily_unavailable"` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"variant_fields_present"` + Tool invocation directly from the model. - - `"wrong_organization"` + - `BetaDirectCaller object { type }` - - `"wrong_platform"` + Tool invocation directly from the model. - - `"wrong_workspace"` + - `BetaServerToolCaller object { tool_id, type }` - - `type: "not_applied"` + Tool invocation generated by a server-side tool. - - `"not_applied"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `remove_to_redeem: optional array of string or null` + - `BetaWebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - Request fields to remove before retrying, so the retry can redeem this - token. + - `content: BetaWebSearchToolResultBlockParamContent` - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `ResultBlock = array of BetaWebSearchResultBlockParam` - - `input_tokens: number or null` + - `encrypted_content: string` - The cumulative number of input tokens which were used. + - `title: string` - - `iterations: BetaIterationsUsage or null` + - `type: "web_search_result"` - Per-iteration token usage breakdown. + - `"web_search_result"` - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + - `url: string` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + - `page_age: optional string or null` - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `BetaWebSearchToolRequestError object { error_code, type }` - Token usage for a sampling iteration. + - `error_code: BetaWebSearchToolResultErrorCode` - - `cache_creation: BetaCacheCreation or null` + - `"invalid_tool_input"` - Breakdown of cached tokens by TTL + - `"unavailable"` - - `ephemeral_1h_input_tokens: number` + - `"max_uses_exceeded"` - The number of input tokens used to create the 1 hour cache entry. + - `"too_many_requests"` - - `ephemeral_5m_input_tokens: number` + - `"query_too_long"` - The number of input tokens used to create the 5 minute cache entry. + - `"request_too_large"` - - `cache_creation_input_tokens: number` + - `type: "web_search_tool_result_error"` - The number of input tokens used to create the cache entry. + - `"web_search_tool_result_error"` - - `cache_read_input_tokens: number` + - `tool_use_id: string` - The number of input tokens read from the cache. + - `type: "web_search_tool_result"` - - `input_tokens: number` + - `"web_search_tool_result"` - The number of input tokens which were used. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `model: Model` + Create a cache control breakpoint at this content block. - The model that will complete your prompt. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Tool invocation directly from the model. - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `BetaDirectCaller object { type }` - The model that will complete your prompt. + Tool invocation directly from the model. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `BetaServerToolCaller object { tool_id, type }` - - `"claude-sonnet-5"` + Tool invocation generated by a server-side tool. - High-performance model for coding and agents + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"claude-fable-5"` + - `BetaWebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - Next generation of intelligence for the hardest knowledge work and coding problems + - `content: BetaWebFetchToolResultErrorBlockParam or BetaWebFetchBlockParam` - - `"claude-mythos-5"` + - `BetaWebFetchToolResultErrorBlockParam object { error_code, type }` - Most capable model for cybersecurity and biology research + - `error_code: BetaWebFetchToolResultErrorCode` - - `"claude-opus-5"` + - `"invalid_tool_input"` - Powerful intelligence for long-running agents and coding + - `"url_too_long"` - - `"claude-opus-4-8"` + - `"url_not_allowed"` - Powerful intelligence for long-running agents and coding + - `"url_not_in_prior_context"` - - `"claude-opus-4-7"` + - `"url_not_accessible"` - Powerful intelligence for long-running agents and coding + - `"unsupported_content_type"` - - `"claude-mythos-preview"` + - `"too_many_requests"` - New class of intelligence, strongest in coding and cybersecurity + - `"max_uses_exceeded"` - - `"claude-opus-4-6"` + - `"unavailable"` - Powerful intelligence for long-running agents and coding + - `type: "web_fetch_tool_result_error"` - - `"claude-sonnet-4-6"` + - `"web_fetch_tool_result_error"` - Best combination of speed and intelligence + - `BetaWebFetchBlockParam object { content, type, url, retrieved_at }` - - `"claude-haiku-4-5"` + - `content: BetaRequestDocumentBlock` - Fastest model with near-frontier intelligence + - `type: "web_fetch_result"` - - `"claude-haiku-4-5-20251001"` + - `"web_fetch_result"` - Fastest model with near-frontier intelligence + - `url: string` - - `"claude-opus-4-5"` + Fetched content URL - Powerful intelligence for long-running agents and coding + - `retrieved_at: optional string or null` - - `"claude-opus-4-5-20251101"` + ISO 8601 timestamp when the content was retrieved - Powerful intelligence for long-running agents and coding + - `tool_use_id: string` - - `"claude-sonnet-4-5"` + - `type: "web_fetch_tool_result"` - High-performance model for agents and coding + - `"web_fetch_tool_result"` - - `"claude-sonnet-4-5-20250929"` + - `cache_control: optional BetaCacheControlEphemeral or null` - High-performance model for agents and coding + Create a cache control breakpoint at this content block. - - `string` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `output_tokens: number` + Tool invocation directly from the model. - The number of output tokens which were used. + - `BetaDirectCaller object { type }` - - `type: "message"` + Tool invocation directly from the model. - Usage for a sampling iteration + - `BetaServerToolCaller object { tool_id, type }` - - `"message"` + Tool invocation generated by a server-side tool. - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `BetaServerToolCaller20260120 object { tool_id, type }` - Token usage for a compaction iteration. + - `BetaAdvisorToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `cache_creation: BetaCacheCreation or null` + - `content: BetaAdvisorToolResultErrorParam or BetaAdvisorResultBlockParam or BetaAdvisorRedactedResultBlockParam` - Breakdown of cached tokens by TTL + - `BetaAdvisorToolResultErrorParam object { error_code, type }` - - `cache_creation_input_tokens: number` + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - The number of input tokens used to create the cache entry. + - `"max_uses_exceeded"` - - `cache_read_input_tokens: number` + - `"prompt_too_long"` - The number of input tokens read from the cache. + - `"too_many_requests"` - - `input_tokens: number` + - `"overloaded"` - The number of input tokens which were used. + - `"unavailable"` - - `output_tokens: number` + - `"execution_time_exceeded"` - The number of output tokens which were used. + - `"model_not_found"` - - `type: "compaction"` + - `type: "advisor_tool_result_error"` - Usage for a compaction iteration + - `"advisor_tool_result_error"` - - `"compaction"` + - `BetaAdvisorResultBlockParam object { text, type, stop_reason }` - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `text: string` - Token usage for an advisor sub-inference iteration. + - `type: "advisor_result"` - - `cache_creation: BetaCacheCreation or null` + - `"advisor_result"` - Breakdown of cached tokens by TTL + - `stop_reason: optional string or null` - - `cache_creation_input_tokens: number` + - `BetaAdvisorRedactedResultBlockParam object { encrypted_content, type, stop_reason }` - The number of input tokens used to create the cache entry. + - `encrypted_content: string` - - `cache_read_input_tokens: number` + Opaque blob produced by a prior response; must be round-tripped verbatim. - The number of input tokens read from the cache. + - `type: "advisor_redacted_result"` - - `input_tokens: number` + - `"advisor_redacted_result"` - The number of input tokens which were used. + - `stop_reason: optional string or null` - - `model: Model` + - `tool_use_id: string` - The model that will complete your prompt. + - `type: "advisor_tool_result"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"advisor_tool_result"` - - `output_tokens: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - The number of output tokens which were used. + Create a cache control breakpoint at this content block. - - `type: "advisor_message"` + - `BetaCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - Usage for an advisor sub-inference iteration + - `content: BetaCodeExecutionToolResultBlockParamContent` - - `"advisor_message"` + Code execution result with encrypted stdout for PFC + web_search results. - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `BetaCodeExecutionToolResultErrorParam object { error_code, type }` - Token usage for the fallback-model attempt of a server-side fallback request. + - `error_code: BetaCodeExecutionToolResultErrorCode` - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + - `"invalid_tool_input"` - - `cache_creation: BetaCacheCreation or null` + - `"unavailable"` - Breakdown of cached tokens by TTL + - `"too_many_requests"` - - `cache_creation_input_tokens: number` + - `"execution_time_exceeded"` - The number of input tokens used to create the cache entry. + - `type: "code_execution_tool_result_error"` - - `cache_read_input_tokens: number` + - `"code_execution_tool_result_error"` - The number of input tokens read from the cache. + - `BetaCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `input_tokens: number` + - `content: array of BetaCodeExecutionOutputBlockParam` - The number of input tokens which were used. + - `file_id: string` - - `model: Model` + - `type: "code_execution_output"` - The model that will complete your prompt. + - `"code_execution_output"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `return_code: number` - - `output_tokens: number` + - `stderr: string` - The number of output tokens which were used. + - `stdout: string` - - `type: "fallback_message"` + - `type: "code_execution_result"` - Usage for the fallback-model attempt that served the response + - `"code_execution_result"` - - `"fallback_message"` + - `BetaEncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `output_tokens: number` + Code execution result with encrypted stdout for PFC + web_search results. - The cumulative number of output tokens which were used. + - `content: array of BetaCodeExecutionOutputBlockParam` - - `output_tokens_details: BetaOutputTokensDetails or null` + - `file_id: string` - Breakdown of output tokens by category. + - `type: "code_execution_output"` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `encrypted_stdout: string` - - `thinking_tokens: number` + - `return_code: number` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `stderr: string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `type: "encrypted_code_execution_result"` - - `server_tool_use: BetaServerToolUsage or null` + - `"encrypted_code_execution_result"` - The number of server tool requests. + - `tool_use_id: string` - - `web_fetch_requests: number` + - `type: "code_execution_tool_result"` - The number of web fetch tool requests. + - `"code_execution_tool_result"` - - `web_search_requests: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - The number of web search tool requests. + Create a cache control breakpoint at this content block. -### Beta Raw Message Start Event + - `BetaBashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` -- `BetaRawMessageStartEvent object { message, type }` + - `content: BetaBashCodeExecutionToolResultErrorParam or BetaBashCodeExecutionResultBlockParam` - - `message: BetaMessage` + - `BetaBashCodeExecutionToolResultErrorParam object { error_code, type }` - - `id: string` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - Unique object identifier. + - `"invalid_tool_input"` - The format and length of IDs may change over time. + - `"unavailable"` - - `container: BetaContainer or null` + - `"too_many_requests"` - Information about the container used in the request (for the code execution tool) + - `"execution_time_exceeded"` - - `id: string` + - `"output_file_too_large"` - Identifier for the container used in this request + - `type: "bash_code_execution_tool_result_error"` - - `expires_at: string` + - `"bash_code_execution_tool_result_error"` - The time at which the container will expire. + - `BetaBashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `skills: array of BetaSkill or null` + - `content: array of BetaBashCodeExecutionOutputBlockParam` - Skills loaded in the container + - `file_id: string` - - `skill_id: string` + - `type: "bash_code_execution_output"` - Skill ID + - `"bash_code_execution_output"` - - `type: "anthropic" or "custom"` + - `return_code: number` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + - `stderr: string` - - `"anthropic"` + - `stdout: string` - - `"custom"` + - `type: "bash_code_execution_result"` - - `version: string` + - `"bash_code_execution_result"` - Skill version or 'latest' for most recent version + - `tool_use_id: string` - - `content: array of BetaContentBlock` + - `type: "bash_code_execution_tool_result"` - Content generated by the model. + - `"bash_code_execution_tool_result"` - This is an array of content blocks, each of which has a `type` that determines its shape. + - `cache_control: optional BetaCacheControlEphemeral or null` - Example: + Create a cache control breakpoint at this content block. - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - 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. + - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` - For example, if the input `messages` were: + - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - Then the response `content` might be: + - `"invalid_tool_input"` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `"unavailable"` - - `BetaTextBlock object { citations, text, type }` + - `"too_many_requests"` - - `citations: array of BetaTextCitation or null` + - `"execution_time_exceeded"` - Citations supporting the text block. + - `"file_not_found"` - 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`. + - `type: "text_editor_code_execution_tool_result_error"` - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"text_editor_code_execution_tool_result_error"` - - `cited_text: string` + - `error_message: optional string or null` - - `document_index: number` + - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `document_title: string or null` + - `content: string` - - `end_char_index: number` + - `file_type: "text" or "image" or "pdf"` - - `file_id: string or null` + - `"text"` - - `start_char_index: number` + - `"image"` - - `type: "char_location"` + - `"pdf"` - - `"char_location"` + - `type: "text_editor_code_execution_view_result"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"text_editor_code_execution_view_result"` - - `cited_text: string` + - `num_lines: optional number or null` - - `document_index: number` + - `start_line: optional number or null` - - `document_title: string or null` + - `total_lines: optional number or null` - - `end_page_number: number` + - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `file_id: string or null` + - `is_file_update: boolean` - - `start_page_number: number` + - `type: "text_editor_code_execution_create_result"` - - `type: "page_location"` + - `"text_editor_code_execution_create_result"` - - `"page_location"` + - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "text_editor_code_execution_str_replace_result"` - - `cited_text: string` + - `"text_editor_code_execution_str_replace_result"` - The full text of the cited block range, concatenated. + - `lines: optional array of string or null` - 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. + - `new_lines: optional number or null` - - `document_index: number` + - `new_start: optional number or null` - - `document_title: string or null` + - `old_lines: optional number or null` - - `end_block_index: number` + - `old_start: optional number or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `tool_use_id: string` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "text_editor_code_execution_tool_result"` - - `file_id: string or null` + - `"text_editor_code_execution_tool_result"` - - `start_block_index: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - 0-based index of the first cited block in the source's `content` array. + Create a cache control breakpoint at this content block. - - `type: "content_block_location"` + - `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `"content_block_location"` + - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` - - `cited_text: string` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `encrypted_index: string` + - `"invalid_tool_input"` - - `title: string or null` + - `"unavailable"` - - `type: "web_search_result_location"` + - `"too_many_requests"` - - `"web_search_result_location"` + - `"execution_time_exceeded"` - - `url: string` + - `type: "tool_search_tool_result_error"` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `"tool_search_tool_result_error"` - - `cited_text: string` + - `error_message: optional string or null` - The full text of the cited block range, concatenated. + - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` - 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. + - `tool_references: array of BetaToolReferenceBlockParam` - - `end_block_index: number` + - `tool_name: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "tool_reference"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `search_result_index: number` + Create a cache control breakpoint at this content block. - 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. + - `type: "tool_search_tool_search_result"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"tool_search_tool_search_result"` - - `source: string` + - `tool_use_id: string` - - `start_block_index: number` + - `type: "tool_search_tool_result"` - 0-based index of the first cited block in the source's `content` array. + - `"tool_search_tool_result"` - - `title: string or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "search_result_location"` + Create a cache control breakpoint at this content block. - - `"search_result_location"` + - `BetaMCPToolUseBlockParam object { id, input, name, 3 more }` - - `text: string` + - `id: string` - - `type: "text"` + - `input: map[unknown]` - - `"text"` + - `name: string` - - `BetaThinkingBlock object { signature, thinking, type }` + - `server_name: string` - - `signature: string` + The name of the MCP server - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `type: "mcp_tool_use"` - 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. + - `"mcp_tool_use"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `thinking: string` + Create a cache control breakpoint at this content block. - The text of Claude's thinking process for this block. + - `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` - - `type: "thinking"` + - `tool_use_id: string` - - `"thinking"` + - `type: "mcp_tool_result"` - - `BetaRedactedThinkingBlock object { data, type }` + - `"mcp_tool_result"` - - `data: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `content: optional string or array of BetaTextBlockParam` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `string` - - `type: "redacted_thinking"` + - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` - - `"redacted_thinking"` + - `text: string` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `type: "text"` - - `id: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `input: map[unknown]` + Create a cache control breakpoint at this content block. - - `name: string` + - `citations: optional array of BetaTextCitationParam or null` - - `type: "tool_use"` + - `is_error: optional boolean` - - `"tool_use"` + - `BetaContainerUploadBlockParam object { file_id, type, cache_control }` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - Tool invocation directly from the model. + - `file_id: string` - - `BetaDirectCaller object { type }` + - `type: "container_upload"` - Tool invocation directly from the model. + - `"container_upload"` - - `type: "direct"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"direct"` + Create a cache control breakpoint at this content block. - - `BetaServerToolCaller object { tool_id, type }` + - `BetaCompactionBlockParam object { type, cache_control, content, encrypted_content }` - Tool invocation generated by a server-side tool. + A compaction block containing summary of previous context. - - `tool_id: string` + Users should round-trip these blocks from responses to subsequent requests + to maintain context across compaction boundaries. - - `type: "code_execution_20250825"` + When content is None, the block represents a failed compaction. The server + treats these as no-ops. Empty string content is not allowed. - - `"code_execution_20250825"` + - `type: "compaction"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"compaction"` - - `tool_id: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "code_execution_20260120"` + Create a cache control breakpoint at this content block. - - `"code_execution_20260120"` + - `content: optional string or null` - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + Summary of previously compacted content, or null if compaction failed - - `id: string` + - `encrypted_content: optional string or null` - - `input: map[unknown]` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `"advisor"` + Mid-conversation directive to surface a declared tool. - - `"web_search"` + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `"web_fetch"` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `"code_execution"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"bash_code_execution"` + - `BetaToolChangeToolReference object { name, type }` - - `"text_editor_code_execution"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_search_tool_regex"` + - `name: string` - - `"tool_search_tool_bm25"` + - `type: "tool_reference"` - - `type: "server_tool_use"` + - `"tool_reference"` - - `"server_tool_use"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - Tool invocation directly from the model. + - `name: string` - - `BetaDirectCaller object { type }` + - `server_name: string` - Tool invocation directly from the model. + - `type: "mcp_tool_reference"` - - `BetaServerToolCaller object { tool_id, type }` + - `"mcp_tool_reference"` - Tool invocation generated by a server-side tool. + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `BetaServerToolCaller20260120 object { tool_id, type }` + Reference to every tool in the named MCP server's toolset. - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + - `server_name: string` - - `content: BetaWebSearchToolResultBlockContent` + - `type: "mcp_toolset_reference"` - - `BetaWebSearchToolResultError object { error_code, type }` + - `"mcp_toolset_reference"` - - `error_code: BetaWebSearchToolResultErrorCode` + - `type: "tool_addition"` - - `"invalid_tool_input"` + - `"tool_addition"` - - `"unavailable"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"max_uses_exceeded"` + Create a cache control breakpoint at this content block. - - `"too_many_requests"` + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `"query_too_long"` + Mid-conversation directive to withdraw a tool. - - `"request_too_large"` + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `type: "web_search_tool_result_error"` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `"web_search_tool_result_error"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `array of BetaWebSearchResultBlock` + - `BetaToolChangeToolReference object { name, type }` - - `encrypted_content: string` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `page_age: string or null` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `title: string` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `type: "web_search_result"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `"web_search_result"` + Reference to every tool in the named MCP server's toolset. - - `url: string` + - `type: "tool_removal"` - - `tool_use_id: string` + - `"tool_removal"` - - `type: "web_search_tool_result"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"web_search_tool_result"` + Create a cache control breakpoint at this content block. - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `BetaFallbackBlockParam object { from, to, type, trigger }` - Tool invocation directly from the model. + A `fallback` block echoed back from a prior response. - - `BetaDirectCaller object { type }` + Accepted in `messages[].content` and not rendered into the prompt; not + validated against the request's `fallbacks` chain or top-level `model`. - Tool invocation directly from the model. + Echo the assistant turn back verbatim, including this block in its + original position. The block marks the boundary between content produced + before and after a fallback hop, and the server relies on that boundary + to validate the turn: when thinking runs flank the boundary, omitting + the block merges them into one span the server cannot validate (the + request is rejected), and moving it into the middle of a single run is + likewise rejected; between non-thinking blocks the block's placement has + no validation effect. - - `BetaServerToolCaller object { tool_id, type }` + - `from: BetaFallbackInfoParam` - Tool invocation generated by a server-side tool. + Identifies one hop of a fallback transition. - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `model: Model` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + The model that will complete your prompt. - - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `error_code: BetaWebFetchToolResultErrorCode` + The model that will complete your prompt. - - `"invalid_tool_input"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"url_too_long"` + - `"claude-sonnet-5"` - - `"url_not_allowed"` + High-performance model for coding and agents - - `"url_not_in_prior_context"` + - `"claude-fable-5"` - - `"url_not_accessible"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `"unsupported_content_type"` + - `"claude-mythos-5"` - - `"too_many_requests"` + Most capable model for cybersecurity and biology research - - `"max_uses_exceeded"` + - `"claude-opus-5"` - - `"unavailable"` + Powerful intelligence for long-running agents and coding - - `type: "web_fetch_tool_result_error"` + - `"claude-opus-4-8"` - - `"web_fetch_tool_result_error"` + Powerful intelligence for long-running agents and coding - - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + - `"claude-opus-4-7"` - - `content: BetaDocumentBlock` + Powerful intelligence for long-running agents and coding - - `citations: BetaCitationConfig or null` + - `"claude-mythos-preview"` - Citation configuration for the document + New class of intelligence, strongest in coding and cybersecurity - - `enabled: boolean` + - `"claude-opus-4-6"` - - `source: BetaBase64PDFSource or BetaPlainTextSource` + Powerful intelligence for long-running agents and coding - - `BetaBase64PDFSource object { data, media_type, type }` + - `"claude-sonnet-4-6"` - - `data: string` + Best combination of speed and intelligence - - `media_type: "application/pdf"` + - `"claude-haiku-4-5"` - - `"application/pdf"` + Fastest model with near-frontier intelligence - - `type: "base64"` + - `"claude-haiku-4-5-20251001"` - - `"base64"` + Fastest model with near-frontier intelligence - - `BetaPlainTextSource object { data, media_type, type }` + - `"claude-opus-4-5"` - - `data: string` + Powerful intelligence for long-running agents and coding - - `media_type: "text/plain"` + - `"claude-opus-4-5-20251101"` - - `"text/plain"` + Powerful intelligence for long-running agents and coding - - `type: "text"` + - `"claude-sonnet-4-5"` - - `"text"` + High-performance model for agents and coding - - `title: string or null` + - `"claude-sonnet-4-5-20250929"` - The title of the document + High-performance model for agents and coding - - `type: "document"` + - `string` - - `"document"` + - `to: BetaFallbackInfoParam` - - `retrieved_at: string or null` + Identifies one hop of a fallback transition. - ISO 8601 timestamp when the content was retrieved + - `type: "fallback"` - - `type: "web_fetch_result"` + - `"fallback"` - - `"web_fetch_result"` + - `trigger: optional unknown` - - `url: string` + The response block's `trigger`, echoed verbatim. Accepted and ignored by the server; any object or `null` is allowed. - Fetched content URL + - `role: "user" or "assistant" or "system"` - - `tool_use_id: string` + - `"user"` - - `type: "web_fetch_tool_result"` + - `"assistant"` - - `"web_fetch_tool_result"` + - `"system"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` +### Beta Message Tokens Count - Tool invocation directly from the model. +- `BetaMessageTokensCount object { context_management, input_tokens }` - - `BetaDirectCaller object { type }` + - `context_management: BetaCountTokensContextManagementResponse or null` - Tool invocation directly from the model. + Information about context management applied to the message. - - `BetaServerToolCaller object { tool_id, type }` + - `original_input_tokens: number` - Tool invocation generated by a server-side tool. + The original token count before context management was applied - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `input_tokens: number` - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + The total number of tokens across the provided list of messages, system prompt, and tools. - - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` +### Beta Metadata - - `BetaAdvisorToolResultError object { error_code, type }` +- `BetaMetadata object { user_id }` - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + - `user_id: optional string or null` - - `"max_uses_exceeded"` + An external identifier for the user who is associated with the request. - - `"prompt_too_long"` + 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. - - `"too_many_requests"` +### Beta Output Config - - `"overloaded"` +- `BetaOutputConfig object { effort, format, task_budget }` - - `"unavailable"` + - `effort: optional "low" or "medium" or "high" or 2 more or null` - - `"execution_time_exceeded"` + All possible effort levels. - - `"model_not_found"` + - `"low"` - - `type: "advisor_tool_result_error"` + - `"medium"` - - `"advisor_tool_result_error"` + - `"high"` - - `BetaAdvisorResultBlock object { stop_reason, text, type }` + - `"xhigh"` - - `stop_reason: string or null` + - `"max"` - 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. + - `format: optional BetaJSONOutputFormat or null` - - `text: string` + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) - - `type: "advisor_result"` + - `schema: map[unknown]` - - `"advisor_result"` + The JSON schema of the format - - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + - `type: "json_schema"` - - `encrypted_content: string` + - `"json_schema"` - Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + - `task_budget: optional BetaTokenTaskBudget or null` - - `stop_reason: string or null` + User-configurable total token budget across contexts. - The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + - `total: number` - - `type: "advisor_redacted_result"` + Total token budget across all contexts in the session. - - `"advisor_redacted_result"` + - `type: "tokens"` - - `tool_use_id: string` + The budget type. Currently only 'tokens' is supported. - - `type: "advisor_tool_result"` + - `"tokens"` - - `"advisor_tool_result"` + - `remaining: optional number or null` - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. - - `content: BetaCodeExecutionToolResultBlockContent` +### Beta Output Tokens Details - Code execution result with encrypted stdout for PFC + web_search results. +- `BetaOutputTokensDetails object { thinking_tokens }` - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `thinking_tokens: number` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `"invalid_tool_input"` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `"unavailable"` +### Beta Plain Text Source - - `"too_many_requests"` +- `BetaPlainTextSource object { data, media_type, type }` - - `"execution_time_exceeded"` + - `data: string` - - `type: "code_execution_tool_result_error"` + - `media_type: "text/plain"` - - `"code_execution_tool_result_error"` + - `"text/plain"` - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `type: "text"` - - `content: array of BetaCodeExecutionOutputBlock` + - `"text"` - - `file_id: string` +### Beta Raw Content Block Delta - - `type: "code_execution_output"` +- `BetaRawContentBlockDelta = BetaTextDelta or BetaInputJSONDelta or BetaCitationsDelta or 3 more` - - `"code_execution_output"` + - `BetaTextDelta object { text, type }` - - `return_code: number` + - `text: string` - - `stderr: string` + - `type: "text_delta"` - - `stdout: string` + - `"text_delta"` - - `type: "code_execution_result"` + - `BetaInputJSONDelta object { partial_json, type }` - - `"code_execution_result"` + - `partial_json: string` - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `type: "input_json_delta"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"input_json_delta"` - - `content: array of BetaCodeExecutionOutputBlock` + - `BetaCitationsDelta object { citation, type }` - - `file_id: string` + - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` - - `type: "code_execution_output"` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `encrypted_stdout: string` + - `cited_text: string` - - `return_code: number` + - `document_index: number` - - `stderr: string` + - `document_title: string or null` - - `type: "encrypted_code_execution_result"` + - `end_char_index: number` - - `"encrypted_code_execution_result"` + - `file_id: string or null` - - `tool_use_id: string` + - `start_char_index: number` - - `type: "code_execution_tool_result"` + - `type: "char_location"` - - `"code_execution_tool_result"` + - `"char_location"` - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + - `cited_text: string` - - `BetaBashCodeExecutionToolResultError object { error_code, type }` + - `document_index: number` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `document_title: string or null` - - `"invalid_tool_input"` + - `end_page_number: number` - - `"unavailable"` + - `file_id: string or null` - - `"too_many_requests"` + - `start_page_number: number` - - `"execution_time_exceeded"` + - `type: "page_location"` - - `"output_file_too_large"` + - `"page_location"` - - `type: "bash_code_execution_tool_result_error"` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `"bash_code_execution_tool_result_error"` + - `cited_text: string` - - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + The full text of the cited block range, concatenated. - - `content: array of BetaBashCodeExecutionOutputBlock` + 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. - - `file_id: string` + - `document_index: number` - - `type: "bash_code_execution_output"` + - `document_title: string or null` - - `"bash_code_execution_output"` + - `end_block_index: number` - - `return_code: number` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `stderr: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `stdout: string` + - `file_id: string or null` - - `type: "bash_code_execution_result"` + - `start_block_index: number` - - `"bash_code_execution_result"` + 0-based index of the first cited block in the source's `content` array. - - `tool_use_id: string` + - `type: "content_block_location"` - - `type: "bash_code_execution_tool_result"` + - `"content_block_location"` - - `"bash_code_execution_tool_result"` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `cited_text: string` - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + - `encrypted_index: string` - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `title: string or null` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `type: "web_search_result_location"` - - `"invalid_tool_input"` + - `"web_search_result_location"` - - `"unavailable"` + - `url: string` - - `"too_many_requests"` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"execution_time_exceeded"` + - `cited_text: string` - - `"file_not_found"` + The full text of the cited block range, concatenated. - - `error_message: string or null` + 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. - - `type: "text_editor_code_execution_tool_result_error"` + - `end_block_index: number` - - `"text_editor_code_execution_tool_result_error"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `content: string` + - `search_result_index: number` - - `file_type: "text" or "image" or "pdf"` + 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. - - `"text"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"image"` + - `source: string` - - `"pdf"` + - `start_block_index: number` - - `num_lines: number or null` + 0-based index of the first cited block in the source's `content` array. - - `start_line: number or null` + - `title: string or null` - - `total_lines: number or null` + - `type: "search_result_location"` - - `type: "text_editor_code_execution_view_result"` + - `"search_result_location"` - - `"text_editor_code_execution_view_result"` + - `type: "citations_delta"` - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `"citations_delta"` - - `is_file_update: boolean` + - `BetaThinkingDelta object { estimated_tokens, thinking, type }` - - `type: "text_editor_code_execution_create_result"` + - `estimated_tokens: number or null` - - `"text_editor_code_execution_create_result"` + 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. - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `thinking: string` - - `lines: array of string or null` + 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. - - `new_lines: number or null` + - `type: "thinking_delta"` - - `new_start: number or null` + - `"thinking_delta"` - - `old_lines: number or null` + - `BetaSignatureDelta object { signature, type }` - - `old_start: number or null` + - `signature: string` - - `type: "text_editor_code_execution_str_replace_result"` + 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. - - `"text_editor_code_execution_str_replace_result"` + - `type: "signature_delta"` - - `tool_use_id: string` + - `"signature_delta"` - - `type: "text_editor_code_execution_tool_result"` + - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` - - `"text_editor_code_execution_tool_result"` + - `content: string or null` - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `encrypted_content: string or null` - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `type: "compaction_delta"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `"compaction_delta"` - - `"invalid_tool_input"` +### Beta Raw Content Block Delta Event - - `"unavailable"` +- `BetaRawContentBlockDeltaEvent object { delta, index, type }` - - `"too_many_requests"` + - `delta: BetaRawContentBlockDelta` - - `"execution_time_exceeded"` + - `BetaTextDelta object { text, type }` - - `error_message: string or null` + - `text: string` - - `type: "tool_search_tool_result_error"` + - `type: "text_delta"` - - `"tool_search_tool_result_error"` + - `"text_delta"` - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + - `BetaInputJSONDelta object { partial_json, type }` - - `tool_references: array of BetaToolReferenceBlock` + - `partial_json: string` - - `tool_name: string` + - `type: "input_json_delta"` - - `type: "tool_reference"` + - `"input_json_delta"` - - `"tool_reference"` + - `BetaCitationsDelta object { citation, type }` - - `type: "tool_search_tool_search_result"` + - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` - - `"tool_search_tool_search_result"` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `tool_use_id: string` + - `cited_text: string` - - `type: "tool_search_tool_result"` + - `document_index: number` - - `"tool_search_tool_result"` + - `document_title: string or null` - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + - `end_char_index: number` - - `id: string` + - `file_id: string or null` - - `input: map[unknown]` + - `start_char_index: number` - - `name: string` + - `type: "char_location"` - The name of the MCP tool + - `"char_location"` - - `server_name: string` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - The name of the MCP server + - `cited_text: string` - - `type: "mcp_tool_use"` + - `document_index: number` - - `"mcp_tool_use"` + - `document_title: string or null` - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `end_page_number: number` - - `content: string or array of BetaTextBlock` + - `file_id: string or null` - - `string` + - `start_page_number: number` - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + - `type: "page_location"` - - `citations: array of BetaTextCitation or null` + - `"page_location"` - Citations supporting the text block. + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - 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`. + - `cited_text: string` - - `text: string` + The full text of the cited block range, concatenated. - - `type: "text"` + 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. - - `is_error: boolean` + - `document_index: number` - - `tool_use_id: string` + - `document_title: string or null` - - `type: "mcp_tool_result"` + - `end_block_index: number` - - `"mcp_tool_result"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `BetaContainerUploadBlock object { file_id, type }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Response model for a file uploaded to the container. + - `file_id: string or null` - - `file_id: string` + - `start_block_index: number` - - `type: "container_upload"` + 0-based index of the first cited block in the source's `content` array. - - `"container_upload"` + - `type: "content_block_location"` - - `BetaCompactionBlock object { content, encrypted_content, type }` + - `"content_block_location"` - A compaction block returned when autocompact is triggered. + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + - `cited_text: string` - - `content: string or null` + - `encrypted_index: string` - Summary of compacted content, or null if compaction failed + - `title: string or null` - - `encrypted_content: string or null` + - `type: "web_search_result_location"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `"web_search_result_location"` - - `type: "compaction"` + - `url: string` - - `"compaction"` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `BetaFallbackBlock object { from, to, trigger, type }` + - `cited_text: string` - Marks the point in `content` where one model's output gives way to the next. + The full text of the cited block range, concatenated. - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + 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. - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `end_block_index: number` - - `from: BetaFallbackInfo` + Exclusive 0-based end index of the cited block range in the source's `content` array. - 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. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `model: Model` + - `search_result_index: number` - The model that will complete your prompt. + 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. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `source: string` - The model that will complete your prompt. + - `start_block_index: number` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + 0-based index of the first cited block in the source's `content` array. - - `"claude-sonnet-5"` + - `title: string or null` - High-performance model for coding and agents + - `type: "search_result_location"` - - `"claude-fable-5"` + - `"search_result_location"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `type: "citations_delta"` - - `"claude-mythos-5"` + - `"citations_delta"` - Most capable model for cybersecurity and biology research + - `BetaThinkingDelta object { estimated_tokens, thinking, type }` - - `"claude-opus-5"` + - `estimated_tokens: number or null` - Powerful intelligence for long-running agents and coding + 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. - - `"claude-opus-4-8"` + - `thinking: string` - Powerful intelligence for long-running agents and coding + 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. - - `"claude-opus-4-7"` + - `type: "thinking_delta"` - Powerful intelligence for long-running agents and coding + - `"thinking_delta"` - - `"claude-mythos-preview"` + - `BetaSignatureDelta object { signature, type }` - New class of intelligence, strongest in coding and cybersecurity + - `signature: string` - - `"claude-opus-4-6"` + 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. - Powerful intelligence for long-running agents and coding + - `type: "signature_delta"` - - `"claude-sonnet-4-6"` + - `"signature_delta"` - Best combination of speed and intelligence + - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` - - `"claude-haiku-4-5"` + - `content: string or null` - Fastest model with near-frontier intelligence + - `encrypted_content: string or null` - - `"claude-haiku-4-5-20251001"` + Opaque metadata from prior compaction, to be round-tripped verbatim - Fastest model with near-frontier intelligence + - `type: "compaction_delta"` - - `"claude-opus-4-5"` + - `"compaction_delta"` - Powerful intelligence for long-running agents and coding + - `index: number` - - `"claude-opus-4-5-20251101"` + - `type: "content_block_delta"` - Powerful intelligence for long-running agents and coding + - `"content_block_delta"` - - `"claude-sonnet-4-5"` +### Beta Raw Content Block Start Event - High-performance model for agents and coding +- `BetaRawContentBlockStartEvent object { content_block, index, type }` - - `"claude-sonnet-4-5-20250929"` + - `content_block: BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` - High-performance model for agents and coding + Response model for a file uploaded to the container. - - `string` + - `BetaTextBlock object { citations, text, type }` - - `to: BetaFallbackInfo` + - `citations: array of BetaTextCitation or null` - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + Citations supporting the text block. - - `trigger: BetaFallbackRefusalTrigger` + 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`. - What caused the `from` model to hand over at this hop. + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `cited_text: string` - The policy category that triggered a refusal. + - `document_index: number` - - `"cyber"` + - `document_title: string or null` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `end_char_index: number` - - `"bio"` + - `file_id: string or null` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `start_char_index: number` - - `"frontier_llm"` + - `type: "char_location"` - 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. + - `"char_location"` - - `"reasoning_extraction"` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - 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). + - `cited_text: string` - - `"general_harms"` + - `document_index: number` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `document_title: string or null` - - `type: "refusal"` + - `end_page_number: number` - - `"refusal"` + - `file_id: string or null` - - `type: "fallback"` + - `start_page_number: number` - - `"fallback"` + - `type: "page_location"` - - `context_management: BetaContextManagementResponse or null` + - `"page_location"` - Context management response. + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - Information about context management strategies applied during the request. + - `cited_text: string` - - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + The full text of the cited block range, concatenated. - List of context management edits that were applied. + 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. - - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + - `document_index: number` - - `cleared_input_tokens: number` + - `document_title: string or null` - Number of input tokens cleared by this edit. + - `end_block_index: number` - - `cleared_tool_uses: number` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Number of tool uses that were cleared. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "clear_tool_uses_20250919"` + - `file_id: string or null` - The type of context management edit applied. + - `start_block_index: number` - - `"clear_tool_uses_20250919"` + 0-based index of the first cited block in the source's `content` array. - - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `type: "content_block_location"` - - `cleared_input_tokens: number` + - `"content_block_location"` - Number of input tokens cleared by this edit. + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `cleared_thinking_turns: number` + - `cited_text: string` - Number of thinking turns that were cleared. + - `encrypted_index: string` - - `type: "clear_thinking_20251015"` + - `title: string or null` - The type of context management edit applied. + - `type: "web_search_result_location"` - - `"clear_thinking_20251015"` + - `"web_search_result_location"` - - `diagnostics: BetaDiagnostics or null` + - `url: string` - Response envelope for request-level diagnostics. Present (possibly - null) whenever the caller supplied `diagnostics` on the request. + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + - `cited_text: string` - 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. + The full text of the cited block range, concatenated. - - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + 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. - - `cache_missed_input_tokens: number` + - `end_block_index: number` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "model_changed"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"model_changed"` + - `search_result_index: number` - - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + 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. - - `cache_missed_input_tokens: number` + Counted separately from `document_index`; server-side web search results are not included in this count. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `source: string` - - `type: "system_changed"` + - `start_block_index: number` - - `"system_changed"` + 0-based index of the first cited block in the source's `content` array. - - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + - `title: string or null` - - `cache_missed_input_tokens: number` + - `type: "search_result_location"` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `"search_result_location"` - - `type: "tools_changed"` + - `text: string` - - `"tools_changed"` + - `type: "text"` - - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + - `"text"` - - `cache_missed_input_tokens: number` + - `BetaThinkingBlock object { signature, thinking, type }` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `signature: string` - - `type: "messages_changed"` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"messages_changed"` + 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. - - `BetaCacheMissPreviousMessageNotFound object { type }` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `type: "previous_message_not_found"` + - `thinking: string` - - `"previous_message_not_found"` + The text of Claude's thinking process for this block. - - `BetaCacheMissUnavailable object { type }` + - `type: "thinking"` - - `type: "unavailable"` + - `"thinking"` - - `"unavailable"` + - `BetaRedactedThinkingBlock object { data, type }` - - `model: Model` + - `data: string` - The model that will complete your prompt. + 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. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `role: "assistant"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - Conversational role of the generated message. + - `type: "redacted_thinking"` - This will always be `"assistant"`. + - `"redacted_thinking"` - - `"assistant"` + - `BetaToolUseBlock object { id, input, name, 3 more }` - - `stop_details: BetaRefusalStopDetails or null` + - `id: string` - Structured information about a refusal. + - `input: map[unknown]` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `name: string` - The policy category that triggered a refusal. + - `type: "tool_use"` - - `"cyber"` + - `"tool_use"` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"bio"` + Tool invocation directly from the model. - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `BetaDirectCaller object { type }` - - `"frontier_llm"` + Tool invocation directly from the model. - 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. + - `type: "direct"` - - `"reasoning_extraction"` + - `"direct"` - 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). + - `BetaServerToolCaller object { tool_id, type }` - - `"general_harms"` + Tool invocation generated by a server-side tool. - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `tool_id: string` - - `explanation: string or null` + - `type: "code_execution_20250825"` - Human-readable explanation of the refusal. + - `"code_execution_20250825"` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `fallback_credit_token: string or null` + - `tool_id: string` - Opaque code that refunds the cache-miss cost when retrying this refused - request on the fallback model. Pass it as `fallback_credit_token` on the - retry request. Expires 5 minutes after the refusal. + - `type: "code_execution_20260120"` - The retry is sent either with the same request body (`system`, `messages`, - `tools`, and other render-shaping fields), or with the same body plus one - appended `assistant` message whose content is the partial text (with any - trailing whitespace stripped from the final text block) and paired - server-tool blocks from this refusal — which also authorizes that - appended turn as an assistant-prefill continuation on models that otherwise - disallow prefill. A token minted mid-server-tool-loop whose partial content - was continuable may only be redeemed the second way — if a same-body retry - is rejected with a 400 saying the token must be redeemed by continuing the - partial response, retry the second way instead. Either way: same workspace, - same platform; a mismatch is a 400. Resending a token for an already-warm - prefix is permitted but yields no additional credit. + - `"code_execution_20260120"` - `null` when the refused model isn't eligible for a fallback credit. + - `toolset_name: optional string or null` - - `fallback_has_prefill_claim: boolean or null` + For a toolset member tool_use, the toolset family. - Whether the accompanying `fallback_credit_token` may be redeemed with the - appended-assistant retry form. Only set when `fallback_credit_token` is - present. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `true`: retry by resending the same request body plus one appended - `assistant` message whose content is this response's `content` with any - trailing whitespace stripped from the final text block and unpaired - `tool_use` blocks omitted (the same appended-turn shape described on - `fallback_credit_token`), with the token attached. `false`: retry by - resending the original request body unchanged, with the token attached — - the appended-assistant form is not available for this refusal (no - continuable partial content, or the request uses `output_format` or a - `tool_choice` that forces tool use). One exception: when the request used - `output_format` or a forced `tool_choice` and the refusal arrived after - server tools (including MCP connector tools) had already executed, the - token may not be redeemable by either retry form; if the exact-body retry - is then rejected with a 400 saying the token must be redeemed by - continuing the partial response, discard the token and retry without it. + - `id: string` - Advisory: if an appended-assistant retry is rejected with a 400 despite - `true`, fall back to resending the original request body with the token. + - `input: map[unknown]` - - `recommended_model: string or null` + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - 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. + - `"advisor"` - - `type: "refusal"` + - `"web_search"` - - `"refusal"` + - `"web_fetch"` - - `stop_reason: BetaStopReason or null` + - `"code_execution"` - The reason that we stopped. + - `"bash_code_execution"` - This may be one the following values: + - `"text_editor_code_execution"` - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `"tool_search_tool_regex"` - 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. + - `"tool_search_tool_bm25"` - - `"end_turn"` + - `type: "server_tool_use"` - - `"max_tokens"` + - `"server_tool_use"` - - `"stop_sequence"` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"tool_use"` + Tool invocation directly from the model. - - `"pause_turn"` + - `BetaDirectCaller object { type }` - - `"compaction"` + Tool invocation directly from the model. - - `"refusal"` + - `BetaServerToolCaller object { tool_id, type }` - - `"model_context_window_exceeded"` + Tool invocation generated by a server-side tool. - - `stop_sequence: string or null` + - `BetaServerToolCaller20260120 object { tool_id, type }` - Which custom stop sequence was generated, if any. + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` - This value will be a non-null string if one of your custom stop sequences was generated. + - `content: BetaWebSearchToolResultBlockContent` - - `type: "message"` + - `BetaWebSearchToolResultError object { error_code, type }` - Object type. + - `error_code: BetaWebSearchToolResultErrorCode` - For Messages, this is always `"message"`. + - `"invalid_tool_input"` - - `"message"` + - `"unavailable"` - - `usage: BetaUsage` + - `"max_uses_exceeded"` - Billing and rate-limit usage. + - `"too_many_requests"` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `"query_too_long"` - 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. + - `"request_too_large"` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `type: "web_search_tool_result_error"` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `"web_search_tool_result_error"` - - `cache_creation: BetaCacheCreation or null` + - `array of BetaWebSearchResultBlock` - Breakdown of cached tokens by TTL + - `encrypted_content: string` - - `ephemeral_1h_input_tokens: number` + - `page_age: string or null` - The number of input tokens used to create the 1 hour cache entry. + - `title: string` - - `ephemeral_5m_input_tokens: number` + - `type: "web_search_result"` - The number of input tokens used to create the 5 minute cache entry. + - `"web_search_result"` - - `cache_creation_input_tokens: number or null` + - `url: string` - The number of input tokens used to create the cache entry. + - `tool_use_id: string` - - `cache_read_input_tokens: number or null` + - `type: "web_search_tool_result"` - The number of input tokens read from the cache. + - `"web_search_tool_result"` - - `fallback_credit: BetaFallbackCreditUsage or null` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - Outcome of the `fallback_credit_token` presented on this request. + Tool invocation directly from the model. - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + - `BetaDirectCaller object { type }` - Whether the fallback-credit reprice was applied to this response's billing. + Tool invocation directly from the model. - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + - `BetaServerToolCaller object { tool_id, type }` - - `BetaFallbackCreditRedeemed object { type }` + Tool invocation generated by a server-side tool. - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `type: "redeemed"` + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` - - `"redeemed"` + - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `BetaWebFetchToolResultErrorBlock object { error_code, type }` - No reprice was applied; `reason` says why. + - `error_code: BetaWebFetchToolResultErrorCode` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `"invalid_tool_input"` - Why the reprice was not applied. + - `"url_too_long"` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `"url_not_allowed"` - - `"body_mismatch"` + - `"url_not_in_prior_context"` - - `"continuation_excluded"` + - `"url_not_accessible"` - - `"continuation_only"` + - `"unsupported_content_type"` - - `"expired"` + - `"too_many_requests"` - - `"invalid_target_model"` + - `"max_uses_exceeded"` - - `"not_enabled"` + - `"unavailable"` - - `"reprice_unavailable"` + - `type: "web_fetch_tool_result_error"` - - `"temporarily_unavailable"` + - `"web_fetch_tool_result_error"` - - `"variant_fields_present"` + - `BetaWebFetchBlock object { content, retrieved_at, type, url }` - - `"wrong_organization"` + - `content: BetaDocumentBlock` - - `"wrong_platform"` + - `citations: BetaCitationConfig or null` - - `"wrong_workspace"` + Citation configuration for the document - - `type: "not_applied"` + - `enabled: boolean` - - `"not_applied"` + - `source: BetaBase64PDFSource or BetaPlainTextSource` - - `remove_to_redeem: optional array of string or null` + - `BetaBase64PDFSource object { data, media_type, type }` - Request fields to remove before retrying, so the retry can redeem this - token. + - `data: string` - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `media_type: "application/pdf"` - - `inference_geo: string or null` + - `"application/pdf"` - The geographic region where inference was performed for this request. + - `type: "base64"` - - `input_tokens: number` + - `"base64"` - The number of input tokens which were used. + - `BetaPlainTextSource object { data, media_type, type }` - - `iterations: BetaIterationsUsage or null` + - `data: string` - Per-iteration token usage breakdown. + - `media_type: "text/plain"` - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + - `"text/plain"` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + - `type: "text"` - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `"text"` - Token usage for a sampling iteration. + - `title: string or null` - - `cache_creation: BetaCacheCreation or null` + The title of the document - Breakdown of cached tokens by TTL + - `type: "document"` - - `cache_creation_input_tokens: number` + - `"document"` - The number of input tokens used to create the cache entry. + - `retrieved_at: string or null` - - `cache_read_input_tokens: number` + ISO 8601 timestamp when the content was retrieved - The number of input tokens read from the cache. + - `type: "web_fetch_result"` - - `input_tokens: number` + - `"web_fetch_result"` - The number of input tokens which were used. + - `url: string` - - `model: Model` + Fetched content URL - The model that will complete your prompt. + - `tool_use_id: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "web_fetch_tool_result"` - - `output_tokens: number` + - `"web_fetch_tool_result"` - The number of output tokens which were used. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `type: "message"` + Tool invocation directly from the model. - Usage for a sampling iteration + - `BetaDirectCaller object { type }` - - `"message"` + Tool invocation directly from the model. - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `BetaServerToolCaller object { tool_id, type }` - Token usage for a compaction iteration. + Tool invocation generated by a server-side tool. - - `cache_creation: BetaCacheCreation or null` + - `BetaServerToolCaller20260120 object { tool_id, type }` - Breakdown of cached tokens by TTL + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` - - `cache_creation_input_tokens: number` + - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` - The number of input tokens used to create the cache entry. + - `BetaAdvisorToolResultError object { error_code, type }` - - `cache_read_input_tokens: number` + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - The number of input tokens read from the cache. + - `"max_uses_exceeded"` - - `input_tokens: number` + - `"prompt_too_long"` - The number of input tokens which were used. + - `"too_many_requests"` - - `output_tokens: number` + - `"overloaded"` - The number of output tokens which were used. + - `"unavailable"` - - `type: "compaction"` + - `"execution_time_exceeded"` - Usage for a compaction iteration + - `"model_not_found"` - - `"compaction"` + - `type: "advisor_tool_result_error"` - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `"advisor_tool_result_error"` - Token usage for an advisor sub-inference iteration. + - `BetaAdvisorResultBlock object { stop_reason, text, type }` - - `cache_creation: BetaCacheCreation or null` + - `stop_reason: string or null` - Breakdown of cached tokens by TTL + 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. - - `cache_creation_input_tokens: number` + - `text: string` - The number of input tokens used to create the cache entry. + - `type: "advisor_result"` - - `cache_read_input_tokens: number` + - `"advisor_result"` - The number of input tokens read from the cache. + - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` - - `input_tokens: number` + - `encrypted_content: string` - The number of input tokens which were used. + Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. - - `model: Model` + - `stop_reason: string or null` - The model that will complete your prompt. + The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "advisor_redacted_result"` - - `output_tokens: number` + - `"advisor_redacted_result"` - The number of output tokens which were used. + - `tool_use_id: string` - - `type: "advisor_message"` + - `type: "advisor_tool_result"` - Usage for an advisor sub-inference iteration + - `"advisor_tool_result"` - - `"advisor_message"` + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `content: BetaCodeExecutionToolResultBlockContent` - Token usage for the fallback-model attempt of a server-side fallback request. + Code execution result with encrypted stdout for PFC + web_search results. - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `cache_creation: BetaCacheCreation or null` + - `error_code: BetaCodeExecutionToolResultErrorCode` - Breakdown of cached tokens by TTL + - `"invalid_tool_input"` - - `cache_creation_input_tokens: number` + - `"unavailable"` - The number of input tokens used to create the cache entry. + - `"too_many_requests"` - - `cache_read_input_tokens: number` + - `"execution_time_exceeded"` - The number of input tokens read from the cache. + - `type: "code_execution_tool_result_error"` - - `input_tokens: number` + - `"code_execution_tool_result_error"` - The number of input tokens which were used. + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `model: Model` + - `content: array of BetaCodeExecutionOutputBlock` - The model that will complete your prompt. + - `file_id: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "code_execution_output"` - - `output_tokens: number` + - `"code_execution_output"` - The number of output tokens which were used. + - `return_code: number` - - `type: "fallback_message"` + - `stderr: string` - Usage for the fallback-model attempt that served the response + - `stdout: string` - - `"fallback_message"` + - `type: "code_execution_result"` - - `output_tokens: number` + - `"code_execution_result"` - The number of output tokens which were used. + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `output_tokens_details: BetaOutputTokensDetails or null` + Code execution result with encrypted stdout for PFC + web_search results. - Breakdown of output tokens by category. + - `content: array of BetaCodeExecutionOutputBlock` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `file_id: string` - - `thinking_tokens: number` + - `type: "code_execution_output"` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `encrypted_stdout: string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `return_code: number` - - `server_tool_use: BetaServerToolUsage or null` + - `stderr: string` - The number of server tool requests. + - `type: "encrypted_code_execution_result"` - - `web_fetch_requests: number` + - `"encrypted_code_execution_result"` - The number of web fetch tool requests. + - `tool_use_id: string` - - `web_search_requests: number` + - `type: "code_execution_tool_result"` - The number of web search tool requests. + - `"code_execution_tool_result"` - - `service_tier: "standard" or "priority" or "batch" or null` + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - If the request used the priority, standard, or batch tier. + - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` - - `"standard"` + - `BetaBashCodeExecutionToolResultError object { error_code, type }` - - `"priority"` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `"batch"` + - `"invalid_tool_input"` - - `speed: "standard" or "fast" or null` + - `"unavailable"` - 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. + - `"too_many_requests"` - - `"standard"` + - `"execution_time_exceeded"` - - `"fast"` + - `"output_file_too_large"` - - `type: "message_start"` + - `type: "bash_code_execution_tool_result_error"` - - `"message_start"` + - `"bash_code_execution_tool_result_error"` -### Beta Raw Message Stop Event + - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` -- `BetaRawMessageStopEvent object { type }` + - `content: array of BetaBashCodeExecutionOutputBlock` - - `type: "message_stop"` + - `file_id: string` - - `"message_stop"` + - `type: "bash_code_execution_output"` -### Beta Raw Message Stream Event + - `"bash_code_execution_output"` -- `BetaRawMessageStreamEvent = BetaRawMessageStartEvent or BetaRawMessageDeltaEvent or BetaRawMessageStopEvent or 3 more` + - `return_code: number` - - `BetaRawMessageStartEvent object { message, type }` + - `stderr: string` - - `message: BetaMessage` + - `stdout: string` - - `id: string` + - `type: "bash_code_execution_result"` - Unique object identifier. + - `"bash_code_execution_result"` - The format and length of IDs may change over time. + - `tool_use_id: string` - - `container: BetaContainer or null` + - `type: "bash_code_execution_tool_result"` - Information about the container used in the request (for the code execution tool) + - `"bash_code_execution_tool_result"` - - `id: string` + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - Identifier for the container used in this request + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` - - `expires_at: string` + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - The time at which the container will expire. + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `skills: array of BetaSkill or null` + - `"invalid_tool_input"` - Skills loaded in the container + - `"unavailable"` - - `skill_id: string` + - `"too_many_requests"` - Skill ID + - `"execution_time_exceeded"` - - `type: "anthropic" or "custom"` + - `"file_not_found"` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + - `error_message: string or null` - - `"anthropic"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"custom"` + - `"text_editor_code_execution_tool_result_error"` - - `version: string` + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - Skill version or 'latest' for most recent version + - `content: string` - - `content: array of BetaContentBlock` + - `file_type: "text" or "image" or "pdf"` - Content generated by the model. + - `"text"` - This is an array of content blocks, each of which has a `type` that determines its shape. + - `"image"` - Example: + - `"pdf"` - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `num_lines: number or null` - 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. + - `start_line: number or null` - For example, if the input `messages` were: + - `total_lines: number or null` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + - `type: "text_editor_code_execution_view_result"` - Then the response `content` might be: + - `"text_editor_code_execution_view_result"` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `BetaTextBlock object { citations, text, type }` + - `is_file_update: boolean` - - `citations: array of BetaTextCitation or null` + - `type: "text_editor_code_execution_create_result"` - Citations supporting the text block. + - `"text_editor_code_execution_create_result"` - 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`. + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `lines: array of string or null` - - `cited_text: string` + - `new_lines: number or null` - - `document_index: number` + - `new_start: number or null` - - `document_title: string or null` + - `old_lines: number or null` - - `end_char_index: number` + - `old_start: number or null` - - `file_id: string or null` + - `type: "text_editor_code_execution_str_replace_result"` - - `start_char_index: number` + - `"text_editor_code_execution_str_replace_result"` - - `type: "char_location"` + - `tool_use_id: string` - - `"char_location"` + - `type: "text_editor_code_execution_tool_result"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"text_editor_code_execution_tool_result"` - - `cited_text: string` + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` - - `document_index: number` + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` - - `document_title: string or null` + - `BetaToolSearchToolResultError object { error_code, error_message, type }` - - `end_page_number: number` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `file_id: string or null` + - `"invalid_tool_input"` - - `start_page_number: number` + - `"unavailable"` - - `type: "page_location"` + - `"too_many_requests"` - - `"page_location"` + - `"execution_time_exceeded"` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `error_message: string or null` - - `cited_text: string` + - `type: "tool_search_tool_result_error"` - The full text of the cited block range, concatenated. + - `"tool_search_tool_result_error"` - 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. + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` - - `document_index: number` + - `tool_references: array of BetaToolReferenceBlock` - - `document_title: string or null` + - `tool_name: string` - - `end_block_index: number` + - `type: "tool_reference"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"tool_reference"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "tool_search_tool_search_result"` - - `file_id: string or null` + - `"tool_search_tool_search_result"` - - `start_block_index: number` + - `tool_use_id: string` - 0-based index of the first cited block in the source's `content` array. + - `type: "tool_search_tool_result"` - - `type: "content_block_location"` + - `"tool_search_tool_result"` - - `"content_block_location"` + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `id: string` - - `cited_text: string` + - `input: map[unknown]` - - `encrypted_index: string` + - `name: string` - - `title: string or null` + The name of the MCP tool - - `type: "web_search_result_location"` + - `server_name: string` - - `"web_search_result_location"` + The name of the MCP server - - `url: string` + - `type: "mcp_tool_use"` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `"mcp_tool_use"` - - `cited_text: string` + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` - The full text of the cited block range, concatenated. + - `content: string or array of BetaTextBlock` - 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. + - `string` - - `end_block_index: number` + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `citations: array of BetaTextCitation or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Citations supporting the text block. - - `search_result_index: number` + 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`. - 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. + - `text: string` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `type: "text"` - - `source: string` + - `is_error: boolean` - - `start_block_index: number` + - `tool_use_id: string` - 0-based index of the first cited block in the source's `content` array. + - `type: "mcp_tool_result"` - - `title: string or null` + - `"mcp_tool_result"` - - `type: "search_result_location"` + - `BetaContainerUploadBlock object { file_id, type }` - - `"search_result_location"` + Response model for a file uploaded to the container. - - `text: string` + - `file_id: string` - - `type: "text"` + - `type: "container_upload"` - - `"text"` + - `"container_upload"` - - `BetaThinkingBlock object { signature, thinking, type }` + - `BetaCompactionBlock object { content, encrypted_content, type }` - - `signature: string` + A compaction block returned when autocompact is triggered. - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. - 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. + - `content: string or null` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + Summary of compacted content, or null if compaction failed - - `thinking: string` + - `encrypted_content: string or null` - The text of Claude's thinking process for this block. + Opaque metadata from prior compaction, to be round-tripped verbatim - - `type: "thinking"` + - `type: "compaction"` - - `"thinking"` + - `"compaction"` - - `BetaRedactedThinkingBlock object { data, type }` + - `BetaFallbackBlock object { from, to, trigger, type }` - - `data: string` + Marks the point in `content` where one model's output gives way to the next. - 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. + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `from: BetaFallbackInfo` - - `type: "redacted_thinking"` + 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. - - `"redacted_thinking"` + - `model: Model` - - `BetaToolUseBlock object { id, input, name, 2 more }` + The model that will complete your prompt. - - `id: string` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `input: map[unknown]` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `name: string` + The model that will complete your prompt. - - `type: "tool_use"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"tool_use"` + - `"claude-sonnet-5"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + High-performance model for coding and agents - Tool invocation directly from the model. + - `"claude-fable-5"` - - `BetaDirectCaller object { type }` + Next generation of intelligence for the hardest knowledge work and coding problems - Tool invocation directly from the model. + - `"claude-mythos-5"` - - `type: "direct"` + Most capable model for cybersecurity and biology research - - `"direct"` + - `"claude-opus-5"` - - `BetaServerToolCaller object { tool_id, type }` + Powerful intelligence for long-running agents and coding - Tool invocation generated by a server-side tool. + - `"claude-opus-4-8"` - - `tool_id: string` + Powerful intelligence for long-running agents and coding - - `type: "code_execution_20250825"` + - `"claude-opus-4-7"` - - `"code_execution_20250825"` + Powerful intelligence for long-running agents and coding - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"claude-mythos-preview"` - - `tool_id: string` + New class of intelligence, strongest in coding and cybersecurity - - `type: "code_execution_20260120"` + - `"claude-opus-4-6"` - - `"code_execution_20260120"` + Powerful intelligence for long-running agents and coding - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + - `"claude-sonnet-4-6"` - - `id: string` + Best combination of speed and intelligence - - `input: map[unknown]` + - `"claude-haiku-4-5"` - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + Fastest model with near-frontier intelligence - - `"advisor"` + - `"claude-haiku-4-5-20251001"` - - `"web_search"` + Fastest model with near-frontier intelligence - - `"web_fetch"` + - `"claude-opus-4-5"` - - `"code_execution"` + Powerful intelligence for long-running agents and coding - - `"bash_code_execution"` + - `"claude-opus-4-5-20251101"` - - `"text_editor_code_execution"` + Powerful intelligence for long-running agents and coding - - `"tool_search_tool_regex"` + - `"claude-sonnet-4-5"` - - `"tool_search_tool_bm25"` + High-performance model for agents and coding - - `type: "server_tool_use"` + - `"claude-sonnet-4-5-20250929"` - - `"server_tool_use"` + High-performance model for agents and coding - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `string` - Tool invocation directly from the model. + - `to: BetaFallbackInfo` - - `BetaDirectCaller object { type }` + The fallback model producing the content that follows this block. Its `model` is always the canonical id. - Tool invocation directly from the model. + - `trigger: BetaFallbackRefusalTrigger` - - `BetaServerToolCaller object { tool_id, type }` + What caused the `from` model to hand over at this hop. - Tool invocation generated by a server-side tool. + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `BetaServerToolCaller20260120 object { tool_id, type }` + The policy category that triggered a refusal. - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + - `"cyber"` - - `content: BetaWebSearchToolResultBlockContent` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `BetaWebSearchToolResultError object { error_code, type }` + - `"bio"` - - `error_code: BetaWebSearchToolResultErrorCode` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `"invalid_tool_input"` + - `"frontier_llm"` - - `"unavailable"` + 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. - - `"max_uses_exceeded"` + - `"reasoning_extraction"` - - `"too_many_requests"` + 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). - - `"query_too_long"` + - `"general_harms"` - - `"request_too_large"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `type: "web_search_tool_result_error"` + - `type: "refusal"` - - `"web_search_tool_result_error"` + - `"refusal"` - - `array of BetaWebSearchResultBlock` + - `type: "fallback"` - - `encrypted_content: string` + - `"fallback"` - - `page_age: string or null` + - `index: number` - - `title: string` + - `type: "content_block_start"` - - `type: "web_search_result"` + - `"content_block_start"` - - `"web_search_result"` +### Beta Raw Content Block Stop Event - - `url: string` +- `BetaRawContentBlockStopEvent object { index, type }` - - `tool_use_id: string` + - `index: number` - - `type: "web_search_tool_result"` + - `type: "content_block_stop"` - - `"web_search_tool_result"` + - `"content_block_stop"` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` +### Beta Raw Message Delta Event - Tool invocation directly from the model. +- `BetaRawMessageDeltaEvent object { context_management, delta, type, usage }` - - `BetaDirectCaller object { type }` + - `context_management: BetaContextManagementResponse or null` - Tool invocation directly from the model. + Information about context management strategies applied during the request - - `BetaServerToolCaller object { tool_id, type }` + - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` - Tool invocation generated by a server-side tool. + List of context management edits that were applied. - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + - `cleared_input_tokens: number` - - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + Number of input tokens cleared by this edit. - - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + - `cleared_tool_uses: number` - - `error_code: BetaWebFetchToolResultErrorCode` + Number of tool uses that were cleared. - - `"invalid_tool_input"` + - `type: "clear_tool_uses_20250919"` - - `"url_too_long"` + The type of context management edit applied. - - `"url_not_allowed"` + - `"clear_tool_uses_20250919"` - - `"url_not_in_prior_context"` + - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` - - `"url_not_accessible"` + - `cleared_input_tokens: number` - - `"unsupported_content_type"` + Number of input tokens cleared by this edit. - - `"too_many_requests"` + - `cleared_thinking_turns: number` - - `"max_uses_exceeded"` + Number of thinking turns that were cleared. - - `"unavailable"` + - `type: "clear_thinking_20251015"` - - `type: "web_fetch_tool_result_error"` + The type of context management edit applied. - - `"web_fetch_tool_result_error"` + - `"clear_thinking_20251015"` - - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + - `delta: object { container, stop_details, stop_reason, stop_sequence }` - - `content: BetaDocumentBlock` + - `container: BetaContainer or null` - - `citations: BetaCitationConfig or null` + Information about the container used in the request (for the code execution tool) - Citation configuration for the document + - `id: string` - - `enabled: boolean` + Identifier for the container used in this request - - `source: BetaBase64PDFSource or BetaPlainTextSource` + - `expires_at: string` - - `BetaBase64PDFSource object { data, media_type, type }` + The time at which the container will expire. - - `data: string` + - `skills: array of BetaSkill or null` - - `media_type: "application/pdf"` + Skills loaded in the container - - `"application/pdf"` + - `skill_id: string` - - `type: "base64"` + Skill ID - - `"base64"` + - `type: "anthropic" or "custom"` - - `BetaPlainTextSource object { data, media_type, type }` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `data: string` + - `"anthropic"` - - `media_type: "text/plain"` + - `"custom"` - - `"text/plain"` + - `version: string` - - `type: "text"` + Skill version or 'latest' for most recent version - - `"text"` + - `stop_details: BetaRefusalStopDetails or null` - - `title: string or null` + Structured information about a refusal. - The title of the document + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `type: "document"` + The policy category that triggered a refusal. - - `"document"` + - `"cyber"` - - `retrieved_at: string or null` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - ISO 8601 timestamp when the content was retrieved + - `"bio"` - - `type: "web_fetch_result"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `"web_fetch_result"` + - `"frontier_llm"` - - `url: string` + 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. - Fetched content URL + - `"reasoning_extraction"` - - `tool_use_id: string` + 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). - - `type: "web_fetch_tool_result"` + - `"general_harms"` - - `"web_fetch_tool_result"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `explanation: string or null` - Tool invocation directly from the model. + Human-readable explanation of the refusal. - - `BetaDirectCaller object { type }` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - Tool invocation directly from the model. + - `fallback_credit_token: string or null` - - `BetaServerToolCaller object { tool_id, type }` + Opaque code that refunds the cache-miss cost when retrying this refused + request on the fallback model. Pass it as `fallback_credit_token` on the + retry request. Expires 5 minutes after the refusal. - Tool invocation generated by a server-side tool. + The retry is sent either with the same request body (`system`, `messages`, + `tools`, and other render-shaping fields), or with the same body plus one + appended `assistant` message whose content is the partial text (with any + trailing whitespace stripped from the final text block) and paired + server-tool blocks from this refusal — which also authorizes that + appended turn as an assistant-prefill continuation on models that otherwise + disallow prefill. A token minted mid-server-tool-loop whose partial content + was continuable may only be redeemed the second way — if a same-body retry + is rejected with a 400 saying the token must be redeemed by continuing the + partial response, retry the second way instead. Either way: same workspace, + same platform; a mismatch is a 400. Resending a token for an already-warm + prefix is permitted but yields no additional credit. - - `BetaServerToolCaller20260120 object { tool_id, type }` + `null` when the refused model isn't eligible for a fallback credit. - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + - `fallback_has_prefill_claim: boolean or null` - - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` + Whether the accompanying `fallback_credit_token` may be redeemed with the + appended-assistant retry form. Only set when `fallback_credit_token` is + present. - - `BetaAdvisorToolResultError object { error_code, type }` + `true`: retry by resending the same request body plus one appended + `assistant` message whose content is this response's `content` with any + trailing whitespace stripped from the final text block and unpaired + `tool_use` blocks omitted (the same appended-turn shape described on + `fallback_credit_token`), with the token attached. `false`: retry by + resending the original request body unchanged, with the token attached — + the appended-assistant form is not available for this refusal (no + continuable partial content, or the request uses `output_format` or a + `tool_choice` that forces tool use). One exception: when the request used + `output_format` or a forced `tool_choice` and the refusal arrived after + server tools (including MCP connector tools) had already executed, the + token may not be redeemable by either retry form; if the exact-body retry + is then rejected with a 400 saying the token must be redeemed by + continuing the partial response, discard the token and retry without it. - - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + Advisory: if an appended-assistant retry is rejected with a 400 despite + `true`, fall back to resending the original request body with the token. - - `"max_uses_exceeded"` + - `recommended_model: string or null` - - `"prompt_too_long"` + 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. - - `"too_many_requests"` + - `type: "refusal"` - - `"overloaded"` + - `"refusal"` - - `"unavailable"` + - `stop_reason: BetaStopReason or null` - - `"execution_time_exceeded"` + - `"end_turn"` - - `"model_not_found"` + - `"max_tokens"` - - `type: "advisor_tool_result_error"` + - `"stop_sequence"` - - `"advisor_tool_result_error"` + - `"tool_use"` - - `BetaAdvisorResultBlock object { stop_reason, text, type }` + - `"pause_turn"` - - `stop_reason: string or null` + - `"compaction"` - 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. + - `"refusal"` - - `text: string` + - `"model_context_window_exceeded"` - - `type: "advisor_result"` + - `stop_sequence: string or null` - - `"advisor_result"` + - `type: "message_delta"` - - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + - `"message_delta"` - - `encrypted_content: string` + - `usage: BetaMessageDeltaUsage` - Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + Billing and rate-limit usage. - - `stop_reason: string or null` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + 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. - - `type: "advisor_redacted_result"` + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `"advisor_redacted_result"` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - - `tool_use_id: string` + - `cache_creation_input_tokens: number or null` - - `type: "advisor_tool_result"` + The cumulative number of input tokens used to create the cache entry. - - `"advisor_tool_result"` + - `cache_read_input_tokens: number or null` - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + The cumulative number of input tokens read from the cache. - - `content: BetaCodeExecutionToolResultBlockContent` + - `fallback_credit: BetaFallbackCreditUsage or null` - Code execution result with encrypted stdout for PFC + web_search results. + Outcome of the `fallback_credit_token` presented on this request. - - `BetaCodeExecutionToolResultError object { error_code, type }` + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` - - `error_code: BetaCodeExecutionToolResultErrorCode` + Whether the fallback-credit reprice was applied to this response's billing. - - `"invalid_tool_input"` + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. - - `"unavailable"` + - `BetaFallbackCreditRedeemed object { type }` - - `"too_many_requests"` + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. - - `"execution_time_exceeded"` + - `type: "redeemed"` - - `type: "code_execution_tool_result_error"` + - `"redeemed"` - - `"code_execution_tool_result_error"` + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` - - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + No reprice was applied; `reason` says why. - - `content: array of BetaCodeExecutionOutputBlock` + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` - - `file_id: string` + Why the reprice was not applied. - - `type: "code_execution_output"` + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. - - `"code_execution_output"` + - `"body_mismatch"` - - `return_code: number` + - `"continuation_excluded"` - - `stderr: string` + - `"continuation_only"` - - `stdout: string` + - `"expired"` - - `type: "code_execution_result"` + - `"invalid_target_model"` - - `"code_execution_result"` + - `"not_enabled"` - - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"reprice_unavailable"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"temporarily_unavailable"` - - `content: array of BetaCodeExecutionOutputBlock` + - `"variant_fields_present"` - - `file_id: string` + - `"wrong_organization"` - - `type: "code_execution_output"` + - `"wrong_platform"` - - `encrypted_stdout: string` + - `"wrong_workspace"` - - `return_code: number` + - `type: "not_applied"` - - `stderr: string` + - `"not_applied"` - - `type: "encrypted_code_execution_result"` + - `remove_to_redeem: optional array of string or null` - - `"encrypted_code_execution_result"` + Request fields to remove before retrying, so the retry can redeem this + token. - - `tool_use_id: string` + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. - - `type: "code_execution_tool_result"` + - `input_tokens: number or null` - - `"code_execution_tool_result"` + The cumulative number of input tokens which were used. - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `iterations: BetaIterationsUsage or null` - - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + Per-iteration token usage breakdown. - - `BetaBashCodeExecutionToolResultError object { error_code, type }` + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops - - `"invalid_tool_input"` + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `"unavailable"` + Token usage for a sampling iteration. - - `"too_many_requests"` + - `cache_creation: BetaCacheCreation or null` - - `"execution_time_exceeded"` + Breakdown of cached tokens by TTL - - `"output_file_too_large"` + - `ephemeral_1h_input_tokens: number` - - `type: "bash_code_execution_tool_result_error"` + The number of input tokens used to create the 1 hour cache entry. - - `"bash_code_execution_tool_result_error"` + - `ephemeral_5m_input_tokens: number` - - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + The number of input tokens used to create the 5 minute cache entry. - - `content: array of BetaBashCodeExecutionOutputBlock` + - `cache_creation_input_tokens: number` - - `file_id: string` + The number of input tokens used to create the cache entry. - - `type: "bash_code_execution_output"` + - `cache_read_input_tokens: number` - - `"bash_code_execution_output"` + The number of input tokens read from the cache. - - `return_code: number` + - `input_tokens: number` - - `stderr: string` + The number of input tokens which were used. - - `stdout: string` + - `model: Model` - - `type: "bash_code_execution_result"` + The model that will complete your prompt. - - `"bash_code_execution_result"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `tool_use_id: string` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `type: "bash_code_execution_tool_result"` + The model that will complete your prompt. - - `"bash_code_execution_tool_result"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"claude-sonnet-5"` - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + High-performance model for coding and agents - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"claude-fable-5"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + Next generation of intelligence for the hardest knowledge work and coding problems - - `"invalid_tool_input"` + - `"claude-mythos-5"` - - `"unavailable"` + Most capable model for cybersecurity and biology research - - `"too_many_requests"` + - `"claude-opus-5"` - - `"execution_time_exceeded"` + Powerful intelligence for long-running agents and coding - - `"file_not_found"` + - `"claude-opus-4-8"` - - `error_message: string or null` + Powerful intelligence for long-running agents and coding - - `type: "text_editor_code_execution_tool_result_error"` + - `"claude-opus-4-7"` - - `"text_editor_code_execution_tool_result_error"` + Powerful intelligence for long-running agents and coding - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `"claude-mythos-preview"` - - `content: string` + New class of intelligence, strongest in coding and cybersecurity - - `file_type: "text" or "image" or "pdf"` + - `"claude-opus-4-6"` - - `"text"` + Powerful intelligence for long-running agents and coding - - `"image"` + - `"claude-sonnet-4-6"` - - `"pdf"` + Best combination of speed and intelligence - - `num_lines: number or null` + - `"claude-haiku-4-5"` - - `start_line: number or null` + Fastest model with near-frontier intelligence - - `total_lines: number or null` + - `"claude-haiku-4-5-20251001"` - - `type: "text_editor_code_execution_view_result"` + Fastest model with near-frontier intelligence - - `"text_editor_code_execution_view_result"` + - `"claude-opus-4-5"` - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + Powerful intelligence for long-running agents and coding - - `is_file_update: boolean` + - `"claude-opus-4-5-20251101"` - - `type: "text_editor_code_execution_create_result"` + Powerful intelligence for long-running agents and coding - - `"text_editor_code_execution_create_result"` + - `"claude-sonnet-4-5"` - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + High-performance model for agents and coding - - `lines: array of string or null` + - `"claude-sonnet-4-5-20250929"` - - `new_lines: number or null` + High-performance model for agents and coding - - `new_start: number or null` + - `string` - - `old_lines: number or null` + - `output_tokens: number` - - `old_start: number or null` + The number of output tokens which were used. - - `type: "text_editor_code_execution_str_replace_result"` + - `type: "message"` - - `"text_editor_code_execution_str_replace_result"` + Usage for a sampling iteration - - `tool_use_id: string` + - `"message"` - - `type: "text_editor_code_execution_tool_result"` + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` - - `"text_editor_code_execution_tool_result"` + Token usage for a compaction iteration. - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `cache_creation: BetaCacheCreation or null` - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + Breakdown of cached tokens by TTL - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `cache_creation_input_tokens: number` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + The number of input tokens used to create the cache entry. - - `"invalid_tool_input"` + - `cache_read_input_tokens: number` - - `"unavailable"` + The number of input tokens read from the cache. - - `"too_many_requests"` + - `input_tokens: number` - - `"execution_time_exceeded"` + The number of input tokens which were used. - - `error_message: string or null` + - `output_tokens: number` - - `type: "tool_search_tool_result_error"` + The number of output tokens which were used. - - `"tool_search_tool_result_error"` + - `type: "compaction"` - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + Usage for a compaction iteration - - `tool_references: array of BetaToolReferenceBlock` + - `"compaction"` - - `tool_name: string` + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `type: "tool_reference"` + Token usage for an advisor sub-inference iteration. - - `"tool_reference"` + - `cache_creation: BetaCacheCreation or null` - - `type: "tool_search_tool_search_result"` + Breakdown of cached tokens by TTL - - `"tool_search_tool_search_result"` + - `cache_creation_input_tokens: number` - - `tool_use_id: string` + The number of input tokens used to create the cache entry. - - `type: "tool_search_tool_result"` + - `cache_read_input_tokens: number` - - `"tool_search_tool_result"` + The number of input tokens read from the cache. - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + - `input_tokens: number` - - `id: string` + The number of input tokens which were used. - - `input: map[unknown]` + - `model: Model` - - `name: string` + The model that will complete your prompt. - The name of the MCP tool + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `server_name: string` + - `output_tokens: number` - The name of the MCP server + The number of output tokens which were used. - - `type: "mcp_tool_use"` + - `type: "advisor_message"` - - `"mcp_tool_use"` + Usage for an advisor sub-inference iteration - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `"advisor_message"` - - `content: string or array of BetaTextBlock` + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` - - `string` + Token usage for the fallback-model attempt of a server-side fallback request. - - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. - - `citations: array of BetaTextCitation or null` + - `cache_creation: BetaCacheCreation or null` - Citations supporting the text block. + Breakdown of cached tokens by TTL - 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`. + - `cache_creation_input_tokens: number` - - `text: string` + The number of input tokens used to create the cache entry. - - `type: "text"` + - `cache_read_input_tokens: number` - - `is_error: boolean` + The number of input tokens read from the cache. - - `tool_use_id: string` + - `input_tokens: number` - - `type: "mcp_tool_result"` + The number of input tokens which were used. - - `"mcp_tool_result"` + - `model: Model` - - `BetaContainerUploadBlock object { file_id, type }` + The model that will complete your prompt. - Response model for a file uploaded to the container. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `file_id: string` + - `output_tokens: number` - - `type: "container_upload"` + The number of output tokens which were used. - - `"container_upload"` + - `type: "fallback_message"` - - `BetaCompactionBlock object { content, encrypted_content, type }` + Usage for the fallback-model attempt that served the response - A compaction block returned when autocompact is triggered. + - `"fallback_message"` - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + - `output_tokens: number` - - `content: string or null` + The cumulative number of output tokens which were used. - Summary of compacted content, or null if compaction failed + - `output_tokens_details: BetaOutputTokensDetails or null` - - `encrypted_content: string or null` + Breakdown of output tokens by category. - Opaque metadata from prior compaction, to be round-tripped verbatim + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `type: "compaction"` + - `thinking_tokens: number` - - `"compaction"` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `BetaFallbackBlock object { from, to, trigger, type }` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - Marks the point in `content` where one model's output gives way to the next. + - `server_tool_use: BetaServerToolUsage or null` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + The number of server tool requests. - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `web_fetch_requests: number` - - `from: BetaFallbackInfo` + The number of web fetch tool requests. - 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. + - `web_search_requests: number` - - `model: Model` + The number of web search tool requests. - The model that will complete your prompt. +### Beta Raw Message Start Event - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. +- `BetaRawMessageStartEvent object { message, type }` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `message: BetaMessage` - The model that will complete your prompt. + - `id: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Unique object identifier. - - `"claude-sonnet-5"` + The format and length of IDs may change over time. - High-performance model for coding and agents + - `container: BetaContainer or null` - - `"claude-fable-5"` + Information about the container used in the request (for the code execution tool) - Next generation of intelligence for the hardest knowledge work and coding problems + - `id: string` - - `"claude-mythos-5"` + Identifier for the container used in this request - Most capable model for cybersecurity and biology research + - `expires_at: string` - - `"claude-opus-5"` + The time at which the container will expire. - Powerful intelligence for long-running agents and coding + - `skills: array of BetaSkill or null` - - `"claude-opus-4-8"` + Skills loaded in the container - Powerful intelligence for long-running agents and coding + - `skill_id: string` - - `"claude-opus-4-7"` + Skill ID - Powerful intelligence for long-running agents and coding + - `type: "anthropic" or "custom"` - - `"claude-mythos-preview"` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - New class of intelligence, strongest in coding and cybersecurity + - `"anthropic"` - - `"claude-opus-4-6"` + - `"custom"` - Powerful intelligence for long-running agents and coding + - `version: string` - - `"claude-sonnet-4-6"` + Skill version or 'latest' for most recent version - Best combination of speed and intelligence + - `content: array of BetaContentBlock` - - `"claude-haiku-4-5"` + Content generated by the model. - Fastest model with near-frontier intelligence + This is an array of content blocks, each of which has a `type` that determines its shape. - - `"claude-haiku-4-5-20251001"` + Example: - Fastest model with near-frontier intelligence + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `"claude-opus-4-5"` + 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. - Powerful intelligence for long-running agents and coding + For example, if the input `messages` were: - - `"claude-opus-4-5-20251101"` + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - Powerful intelligence for long-running agents and coding + Then the response `content` might be: - - `"claude-sonnet-4-5"` + ```json + [{"type": "text", "text": "B)"}] + ``` - High-performance model for agents and coding + - `BetaTextBlock object { citations, text, type }` - - `"claude-sonnet-4-5-20250929"` + - `citations: array of BetaTextCitation or null` - High-performance model for agents and coding + Citations supporting the text block. - - `string` + 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`. - - `to: BetaFallbackInfo` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - The fallback model producing the content that follows this block. Its `model` is always the canonical id. + - `cited_text: string` - - `trigger: BetaFallbackRefusalTrigger` + - `document_index: number` - What caused the `from` model to hand over at this hop. + - `document_title: string or null` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `end_char_index: number` - The policy category that triggered a refusal. + - `file_id: string or null` - - `"cyber"` + - `start_char_index: number` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `type: "char_location"` - - `"bio"` + - `"char_location"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"frontier_llm"` + - `cited_text: string` - 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. + - `document_index: number` - - `"reasoning_extraction"` + - `document_title: string or null` - 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). + - `end_page_number: number` - - `"general_harms"` + - `file_id: string or null` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `start_page_number: number` - - `type: "refusal"` + - `type: "page_location"` - - `"refusal"` + - `"page_location"` - - `type: "fallback"` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `"fallback"` + - `cited_text: string` - - `context_management: BetaContextManagementResponse or null` + The full text of the cited block range, concatenated. - Context management response. + 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. - Information about context management strategies applied during the request. + - `document_index: number` - - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + - `document_title: string or null` - List of context management edits that were applied. + - `end_block_index: number` - - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `cleared_input_tokens: number` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Number of input tokens cleared by this edit. + - `file_id: string or null` - - `cleared_tool_uses: number` + - `start_block_index: number` - Number of tool uses that were cleared. + 0-based index of the first cited block in the source's `content` array. - - `type: "clear_tool_uses_20250919"` + - `type: "content_block_location"` - The type of context management edit applied. + - `"content_block_location"` - - `"clear_tool_uses_20250919"` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + - `cited_text: string` - - `cleared_input_tokens: number` + - `encrypted_index: string` - Number of input tokens cleared by this edit. + - `title: string or null` - - `cleared_thinking_turns: number` + - `type: "web_search_result_location"` - Number of thinking turns that were cleared. + - `"web_search_result_location"` - - `type: "clear_thinking_20251015"` + - `url: string` - The type of context management edit applied. + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"clear_thinking_20251015"` + - `cited_text: string` - - `diagnostics: BetaDiagnostics or null` + The full text of the cited block range, concatenated. - Response envelope for request-level diagnostics. Present (possibly - null) whenever the caller supplied `diagnostics` on the request. + 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. - - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + - `end_block_index: number` - 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. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `cache_missed_input_tokens: number` + - `search_result_index: number` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + 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. - - `type: "model_changed"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"model_changed"` + - `source: string` - - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + - `start_block_index: number` - - `cache_missed_input_tokens: number` + 0-based index of the first cited block in the source's `content` array. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `title: string or null` - - `type: "system_changed"` + - `type: "search_result_location"` - - `"system_changed"` + - `"search_result_location"` - - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + - `text: string` - - `cache_missed_input_tokens: number` + - `type: "text"` - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + - `"text"` - - `type: "tools_changed"` + - `BetaThinkingBlock object { signature, thinking, type }` - - `"tools_changed"` + - `signature: string` - - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `cache_missed_input_tokens: number` + 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. - Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `type: "messages_changed"` + - `thinking: string` - - `"messages_changed"` + The text of Claude's thinking process for this block. - - `BetaCacheMissPreviousMessageNotFound object { type }` + - `type: "thinking"` - - `type: "previous_message_not_found"` + - `"thinking"` - - `"previous_message_not_found"` + - `BetaRedactedThinkingBlock object { data, type }` - - `BetaCacheMissUnavailable object { type }` + - `data: string` - - `type: "unavailable"` + 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. - - `"unavailable"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `model: Model` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - The model that will complete your prompt. + - `type: "redacted_thinking"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"redacted_thinking"` - - `role: "assistant"` + - `BetaToolUseBlock object { id, input, name, 3 more }` - Conversational role of the generated message. + - `id: string` - This will always be `"assistant"`. + - `input: map[unknown]` - - `"assistant"` + - `name: string` - - `stop_details: BetaRefusalStopDetails or null` + - `type: "tool_use"` - Structured information about a refusal. + - `"tool_use"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - The policy category that triggered a refusal. + Tool invocation directly from the model. - - `"cyber"` + - `BetaDirectCaller object { type }` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + Tool invocation directly from the model. - - `"bio"` + - `type: "direct"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"direct"` - - `"frontier_llm"` + - `BetaServerToolCaller object { tool_id, type }` - 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. + Tool invocation generated by a server-side tool. - - `"reasoning_extraction"` + - `tool_id: string` - 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). + - `type: "code_execution_20250825"` - - `"general_harms"` + - `"code_execution_20250825"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `explanation: string or null` + - `tool_id: string` - Human-readable explanation of the refusal. + - `type: "code_execution_20260120"` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `"code_execution_20260120"` - - `fallback_credit_token: string or null` + - `toolset_name: optional string or null` - Opaque code that refunds the cache-miss cost when retrying this refused - request on the fallback model. Pass it as `fallback_credit_token` on the - retry request. Expires 5 minutes after the refusal. + For a toolset member tool_use, the toolset family. - The retry is sent either with the same request body (`system`, `messages`, - `tools`, and other render-shaping fields), or with the same body plus one - appended `assistant` message whose content is the partial text (with any - trailing whitespace stripped from the final text block) and paired - server-tool blocks from this refusal — which also authorizes that - appended turn as an assistant-prefill continuation on models that otherwise - disallow prefill. A token minted mid-server-tool-loop whose partial content - was continuable may only be redeemed the second way — if a same-body retry - is rejected with a 400 saying the token must be redeemed by continuing the - partial response, retry the second way instead. Either way: same workspace, - same platform; a mismatch is a 400. Resending a token for an already-warm - prefix is permitted but yields no additional credit. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `null` when the refused model isn't eligible for a fallback credit. + - `id: string` - - `fallback_has_prefill_claim: boolean or null` + - `input: map[unknown]` - Whether the accompanying `fallback_credit_token` may be redeemed with the - appended-assistant retry form. Only set when `fallback_credit_token` is - present. + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - `true`: retry by resending the same request body plus one appended - `assistant` message whose content is this response's `content` with any - trailing whitespace stripped from the final text block and unpaired - `tool_use` blocks omitted (the same appended-turn shape described on - `fallback_credit_token`), with the token attached. `false`: retry by - resending the original request body unchanged, with the token attached — - the appended-assistant form is not available for this refusal (no - continuable partial content, or the request uses `output_format` or a - `tool_choice` that forces tool use). One exception: when the request used - `output_format` or a forced `tool_choice` and the refusal arrived after - server tools (including MCP connector tools) had already executed, the - token may not be redeemable by either retry form; if the exact-body retry - is then rejected with a 400 saying the token must be redeemed by - continuing the partial response, discard the token and retry without it. + - `"advisor"` - Advisory: if an appended-assistant retry is rejected with a 400 despite - `true`, fall back to resending the original request body with the token. + - `"web_search"` - - `recommended_model: string or null` + - `"web_fetch"` - 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. + - `"code_execution"` - - `type: "refusal"` + - `"bash_code_execution"` - - `"refusal"` + - `"text_editor_code_execution"` - - `stop_reason: BetaStopReason or null` + - `"tool_search_tool_regex"` - The reason that we stopped. + - `"tool_search_tool_bm25"` - This may be one the following values: + - `type: "server_tool_use"` - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `"server_tool_use"` - 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. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `"end_turn"` + Tool invocation directly from the model. - - `"max_tokens"` + - `BetaDirectCaller object { type }` - - `"stop_sequence"` + Tool invocation directly from the model. - - `"tool_use"` + - `BetaServerToolCaller object { tool_id, type }` - - `"pause_turn"` + Tool invocation generated by a server-side tool. - - `"compaction"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `"refusal"` + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` - - `"model_context_window_exceeded"` + - `content: BetaWebSearchToolResultBlockContent` - - `stop_sequence: string or null` + - `BetaWebSearchToolResultError object { error_code, type }` - Which custom stop sequence was generated, if any. + - `error_code: BetaWebSearchToolResultErrorCode` - This value will be a non-null string if one of your custom stop sequences was generated. + - `"invalid_tool_input"` - - `type: "message"` + - `"unavailable"` - Object type. + - `"max_uses_exceeded"` - For Messages, this is always `"message"`. + - `"too_many_requests"` - - `"message"` + - `"query_too_long"` - - `usage: BetaUsage` + - `"request_too_large"` - Billing and rate-limit usage. + - `type: "web_search_tool_result_error"` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `"web_search_tool_result_error"` - 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. + - `array of BetaWebSearchResultBlock` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `encrypted_content: string` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `page_age: string or null` - - `cache_creation: BetaCacheCreation or null` + - `title: string` - Breakdown of cached tokens by TTL + - `type: "web_search_result"` - - `ephemeral_1h_input_tokens: number` + - `"web_search_result"` - The number of input tokens used to create the 1 hour cache entry. + - `url: string` - - `ephemeral_5m_input_tokens: number` + - `tool_use_id: string` - The number of input tokens used to create the 5 minute cache entry. + - `type: "web_search_tool_result"` - - `cache_creation_input_tokens: number or null` + - `"web_search_tool_result"` - The number of input tokens used to create the cache entry. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `cache_read_input_tokens: number or null` + Tool invocation directly from the model. - The number of input tokens read from the cache. + - `BetaDirectCaller object { type }` - - `fallback_credit: BetaFallbackCreditUsage or null` + Tool invocation directly from the model. - Outcome of the `fallback_credit_token` presented on this request. + - `BetaServerToolCaller object { tool_id, type }` - - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + Tool invocation generated by a server-side tool. - Whether the fallback-credit reprice was applied to this response's billing. + - `BetaServerToolCaller20260120 object { tool_id, type }` - A union discriminated on `type`. `redeemed`: the retry is billed as if - the conversation had been on the retry model all along — including when the - resulting shift is zero because there was nothing to move. `not_applied`: - no reprice was applied; the arm's `reason` says why. + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` - - `BetaFallbackCreditRedeemed object { type }` + - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` - The reprice was applied: the retry is billed as if the conversation - had been on the retry model all along. + - `BetaWebFetchToolResultErrorBlock object { error_code, type }` - - `type: "redeemed"` + - `error_code: BetaWebFetchToolResultErrorCode` - - `"redeemed"` + - `"invalid_tool_input"` - - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + - `"url_too_long"` - No reprice was applied; `reason` says why. + - `"url_not_allowed"` - - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + - `"url_not_in_prior_context"` - Why the reprice was not applied. + - `"url_not_accessible"` - A closed enum; additions to the redemption-check vocabulary arrive as - deliberate schema updates. + - `"unsupported_content_type"` - - `"body_mismatch"` + - `"too_many_requests"` - - `"continuation_excluded"` + - `"max_uses_exceeded"` - - `"continuation_only"` + - `"unavailable"` - - `"expired"` + - `type: "web_fetch_tool_result_error"` - - `"invalid_target_model"` + - `"web_fetch_tool_result_error"` - - `"not_enabled"` + - `BetaWebFetchBlock object { content, retrieved_at, type, url }` - - `"reprice_unavailable"` + - `content: BetaDocumentBlock` - - `"temporarily_unavailable"` + - `citations: BetaCitationConfig or null` - - `"variant_fields_present"` + Citation configuration for the document - - `"wrong_organization"` + - `enabled: boolean` - - `"wrong_platform"` + - `source: BetaBase64PDFSource or BetaPlainTextSource` - - `"wrong_workspace"` + - `BetaBase64PDFSource object { data, media_type, type }` - - `type: "not_applied"` + - `data: string` - - `"not_applied"` + - `media_type: "application/pdf"` - - `remove_to_redeem: optional array of string or null` + - `"application/pdf"` - Request fields to remove before retrying, so the retry can redeem this - token. + - `type: "base64"` - Present exactly when `reason` is `variant_fields_present` — never null, - never an empty array; absent otherwise. Fields are named only from your own request, and only after - the sealed variant hash matched. A served best-effort retry has already - been billed at normal price; nothing redeems retroactively, but a corrected - re-send inside the token's five-minute window can still redeem. + - `"base64"` - - `inference_geo: string or null` + - `BetaPlainTextSource object { data, media_type, type }` - The geographic region where inference was performed for this request. + - `data: string` - - `input_tokens: number` + - `media_type: "text/plain"` - The number of input tokens which were used. + - `"text/plain"` - - `iterations: BetaIterationsUsage or null` + - `type: "text"` - Per-iteration token usage breakdown. + - `"text"` - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + - `title: string or null` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + The title of the document - - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `type: "document"` - Token usage for a sampling iteration. + - `"document"` - - `cache_creation: BetaCacheCreation or null` + - `retrieved_at: string or null` - Breakdown of cached tokens by TTL + ISO 8601 timestamp when the content was retrieved - - `cache_creation_input_tokens: number` + - `type: "web_fetch_result"` - The number of input tokens used to create the cache entry. + - `"web_fetch_result"` - - `cache_read_input_tokens: number` + - `url: string` - The number of input tokens read from the cache. + Fetched content URL - - `input_tokens: number` + - `tool_use_id: string` - The number of input tokens which were used. + - `type: "web_fetch_tool_result"` - - `model: Model` + - `"web_fetch_tool_result"` - The model that will complete your prompt. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Tool invocation directly from the model. - - `output_tokens: number` + - `BetaDirectCaller object { type }` - The number of output tokens which were used. + Tool invocation directly from the model. - - `type: "message"` + - `BetaServerToolCaller object { tool_id, type }` - Usage for a sampling iteration + Tool invocation generated by a server-side tool. - - `"message"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` - Token usage for a compaction iteration. + - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` - - `cache_creation: BetaCacheCreation or null` + - `BetaAdvisorToolResultError object { error_code, type }` - Breakdown of cached tokens by TTL + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` - - `cache_creation_input_tokens: number` + - `"max_uses_exceeded"` - The number of input tokens used to create the cache entry. + - `"prompt_too_long"` - - `cache_read_input_tokens: number` + - `"too_many_requests"` - The number of input tokens read from the cache. + - `"overloaded"` - - `input_tokens: number` + - `"unavailable"` - The number of input tokens which were used. + - `"execution_time_exceeded"` - - `output_tokens: number` + - `"model_not_found"` - The number of output tokens which were used. + - `type: "advisor_tool_result_error"` - - `type: "compaction"` + - `"advisor_tool_result_error"` - Usage for a compaction iteration + - `BetaAdvisorResultBlock object { stop_reason, text, type }` - - `"compaction"` + - `stop_reason: string or null` - - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + 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. - Token usage for an advisor sub-inference iteration. + - `text: string` - - `cache_creation: BetaCacheCreation or null` + - `type: "advisor_result"` - Breakdown of cached tokens by TTL + - `"advisor_result"` - - `cache_creation_input_tokens: number` + - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` - The number of input tokens used to create the cache entry. + - `encrypted_content: string` - - `cache_read_input_tokens: number` + Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. - The number of input tokens read from the cache. + - `stop_reason: string or null` - - `input_tokens: number` + The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). - The number of input tokens which were used. + - `type: "advisor_redacted_result"` - - `model: Model` + - `"advisor_redacted_result"` - The model that will complete your prompt. + - `tool_use_id: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `type: "advisor_tool_result"` - - `output_tokens: number` + - `"advisor_tool_result"` - The number of output tokens which were used. + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `type: "advisor_message"` + - `content: BetaCodeExecutionToolResultBlockContent` - Usage for an advisor sub-inference iteration + Code execution result with encrypted stdout for PFC + web_search results. - - `"advisor_message"` + - `BetaCodeExecutionToolResultError object { error_code, type }` - - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + - `error_code: BetaCodeExecutionToolResultErrorCode` - Token usage for the fallback-model attempt of a server-side fallback request. + - `"invalid_tool_input"` - Produced in place of a `message` entry for whichever hop served the - response. A declined hop produces the existing `message` entry. Whether - a fallback model served the response is signalled by the presence of this - entry in `usage.iterations`. + - `"unavailable"` - - `cache_creation: BetaCacheCreation or null` + - `"too_many_requests"` - Breakdown of cached tokens by TTL + - `"execution_time_exceeded"` - - `cache_creation_input_tokens: number` + - `type: "code_execution_tool_result_error"` - The number of input tokens used to create the cache entry. + - `"code_execution_tool_result_error"` - - `cache_read_input_tokens: number` + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - The number of input tokens read from the cache. + - `content: array of BetaCodeExecutionOutputBlock` - - `input_tokens: number` + - `file_id: string` - The number of input tokens which were used. + - `type: "code_execution_output"` - - `model: Model` + - `"code_execution_output"` - The model that will complete your prompt. + - `return_code: number` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `stderr: string` - - `output_tokens: number` + - `stdout: string` - The number of output tokens which were used. + - `type: "code_execution_result"` - - `type: "fallback_message"` + - `"code_execution_result"` - Usage for the fallback-model attempt that served the response + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `"fallback_message"` + Code execution result with encrypted stdout for PFC + web_search results. - - `output_tokens: number` + - `content: array of BetaCodeExecutionOutputBlock` - The number of output tokens which were used. + - `file_id: string` - - `output_tokens_details: BetaOutputTokensDetails or null` + - `type: "code_execution_output"` - Breakdown of output tokens by category. + - `encrypted_stdout: string` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + + - `BetaBashCodeExecutionToolResultError object { error_code, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BetaBashCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"file_not_found"` + + - `error_message: string or null` + + - `type: "text_editor_code_execution_tool_result_error"` + + - `"text_editor_code_execution_tool_result_error"` + + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + + - `content: string` + + - `file_type: "text" or "image" or "pdf"` + + - `"text"` + + - `"image"` + + - `"pdf"` + + - `num_lines: number or null` + + - `start_line: number or null` + + - `total_lines: number or null` + + - `type: "text_editor_code_execution_view_result"` + + - `"text_editor_code_execution_view_result"` + + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + + - `is_file_update: boolean` + + - `type: "text_editor_code_execution_create_result"` + + - `"text_editor_code_execution_create_result"` + + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + + - `lines: array of string or null` + + - `new_lines: number or null` + + - `new_start: number or null` + + - `old_lines: number or null` + + - `old_start: number or null` + + - `type: "text_editor_code_execution_str_replace_result"` + + - `"text_editor_code_execution_str_replace_result"` + + - `tool_use_id: string` + + - `type: "text_editor_code_execution_tool_result"` + + - `"text_editor_code_execution_tool_result"` + + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + + - `BetaToolSearchToolResultError object { error_code, error_message, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `error_message: string or null` + + - `type: "tool_search_tool_result_error"` + + - `"tool_search_tool_result_error"` + + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + + - `tool_references: array of BetaToolReferenceBlock` + + - `tool_name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `type: "tool_search_tool_search_result"` + + - `"tool_search_tool_search_result"` + + - `tool_use_id: string` + + - `type: "tool_search_tool_result"` + + - `"tool_search_tool_result"` + + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: string` + + The name of the MCP tool + + - `server_name: string` + + The name of the MCP server + + - `type: "mcp_tool_use"` + + - `"mcp_tool_use"` + + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + + - `content: string or array of BetaTextBlock` + + - `string` + + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + + - `citations: array of BetaTextCitation or null` + + Citations supporting the text block. + + 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`. + + - `text: string` + + - `type: "text"` + + - `is_error: boolean` + + - `tool_use_id: string` + + - `type: "mcp_tool_result"` + + - `"mcp_tool_result"` + + - `BetaContainerUploadBlock object { file_id, type }` + + Response model for a file uploaded to the container. + + - `file_id: string` + + - `type: "container_upload"` + + - `"container_upload"` + + - `BetaCompactionBlock object { content, encrypted_content, type }` + + A compaction block returned when autocompact is triggered. + + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. + + - `content: string or null` + + Summary of compacted content, or null if compaction failed + + - `encrypted_content: string or null` + + Opaque metadata from prior compaction, to be round-tripped verbatim + + - `type: "compaction"` + + - `"compaction"` + + - `BetaFallbackBlock object { from, to, trigger, type }` + + Marks the point in `content` where one model's output gives way to the next. + + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. + + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. + + - `from: BetaFallbackInfo` + + 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. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5"` + + High-performance model for coding and agents + + - `"claude-fable-5"` + + Next generation of intelligence for the hardest knowledge work and coding problems + + - `"claude-mythos-5"` + + Most capable model for cybersecurity and biology research + + - `"claude-opus-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-8"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-7"` + + Powerful intelligence for long-running agents and coding + + - `"claude-mythos-preview"` + + New class of intelligence, strongest in coding and cybersecurity + + - `"claude-opus-4-6"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-6"` + + Best combination of speed and intelligence + + - `"claude-haiku-4-5"` + + Fastest model with near-frontier intelligence + + - `"claude-haiku-4-5-20251001"` + + Fastest model with near-frontier intelligence + + - `"claude-opus-4-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-5-20251101"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-5"` + + High-performance model for agents and coding + + - `"claude-sonnet-4-5-20250929"` + + High-performance model for agents and coding + + - `string` + + - `to: BetaFallbackInfo` + + The fallback model producing the content that follows this block. Its `model` is always the canonical id. + + - `trigger: BetaFallbackRefusalTrigger` + + What caused the `from` model to hand over at this hop. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `type: "refusal"` + + - `"refusal"` + + - `type: "fallback"` + + - `"fallback"` + + - `context_management: BetaContextManagementResponse or null` + + Context management response. + + Information about context management strategies applied during the request. + + - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + + List of context management edits that were applied. + + - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + + - `cleared_input_tokens: number` + + Number of input tokens cleared by this edit. + + - `cleared_tool_uses: number` + + Number of tool uses that were cleared. + + - `type: "clear_tool_uses_20250919"` + + The type of context management edit applied. + + - `"clear_tool_uses_20250919"` + + - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + + - `cleared_input_tokens: number` + + Number of input tokens cleared by this edit. + + - `cleared_thinking_turns: number` + + Number of thinking turns that were cleared. + + - `type: "clear_thinking_20251015"` + + The type of context management edit applied. + + - `"clear_thinking_20251015"` + + - `diagnostics: BetaDiagnostics or null` + + Response envelope for request-level diagnostics. Present (possibly + null) whenever the caller supplied `diagnostics` on the request. + + - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + + 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. + + - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "model_changed"` + + - `"model_changed"` + + - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "system_changed"` + + - `"system_changed"` + + - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "tools_changed"` + + - `"tools_changed"` + + - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "messages_changed"` + + - `"messages_changed"` + + - `BetaCacheMissPreviousMessageNotFound object { type }` + + - `type: "previous_message_not_found"` + + - `"previous_message_not_found"` + + - `BetaCacheMissUnavailable object { type }` + + - `type: "unavailable"` + + - `"unavailable"` + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `role: "assistant"` + + Conversational role of the generated message. + + This will always be `"assistant"`. + + - `"assistant"` + + - `stop_details: BetaRefusalStopDetails or null` + + Structured information about a refusal. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `explanation: string or null` + + Human-readable explanation of the refusal. + + This text is not guaranteed to be stable. `null` when no explanation is available for the category. + + - `fallback_credit_token: string or null` + + Opaque code that refunds the cache-miss cost when retrying this refused + request on the fallback model. Pass it as `fallback_credit_token` on the + retry request. Expires 5 minutes after the refusal. + + The retry is sent either with the same request body (`system`, `messages`, + `tools`, and other render-shaping fields), or with the same body plus one + appended `assistant` message whose content is the partial text (with any + trailing whitespace stripped from the final text block) and paired + server-tool blocks from this refusal — which also authorizes that + appended turn as an assistant-prefill continuation on models that otherwise + disallow prefill. A token minted mid-server-tool-loop whose partial content + was continuable may only be redeemed the second way — if a same-body retry + is rejected with a 400 saying the token must be redeemed by continuing the + partial response, retry the second way instead. Either way: same workspace, + same platform; a mismatch is a 400. Resending a token for an already-warm + prefix is permitted but yields no additional credit. + + `null` when the refused model isn't eligible for a fallback credit. + + - `fallback_has_prefill_claim: boolean or null` + + Whether the accompanying `fallback_credit_token` may be redeemed with the + appended-assistant retry form. Only set when `fallback_credit_token` is + present. + + `true`: retry by resending the same request body plus one appended + `assistant` message whose content is this response's `content` with any + trailing whitespace stripped from the final text block and unpaired + `tool_use` blocks omitted (the same appended-turn shape described on + `fallback_credit_token`), with the token attached. `false`: retry by + resending the original request body unchanged, with the token attached — + the appended-assistant form is not available for this refusal (no + continuable partial content, or the request uses `output_format` or a + `tool_choice` that forces tool use). One exception: when the request used + `output_format` or a forced `tool_choice` and the refusal arrived after + server tools (including MCP connector tools) had already executed, the + token may not be redeemable by either retry form; if the exact-body retry + is then rejected with a 400 saying the token must be redeemed by + continuing the partial response, discard the token and retry without it. + + Advisory: if an appended-assistant retry is rejected with a 400 despite + `true`, fall back to resending the original request body with the token. + + - `recommended_model: string or null` + + 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. + + - `type: "refusal"` + + - `"refusal"` + + - `stop_reason: BetaStopReason or null` + + The reason that we stopped. + + This may be one the following values: + + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window + + 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. + + - `"end_turn"` + + - `"max_tokens"` + + - `"stop_sequence"` + + - `"tool_use"` + + - `"pause_turn"` + + - `"compaction"` + + - `"refusal"` + + - `"model_context_window_exceeded"` + + - `stop_sequence: string or null` + + Which custom stop sequence was generated, if any. + + This value will be a non-null string if one of your custom stop sequences was generated. + + - `type: "message"` + + Object type. + + For Messages, this is always `"message"`. + + - `"message"` + + - `usage: BetaUsage` + + Billing and rate-limit usage. + + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + + 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. + + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `ephemeral_1h_input_tokens: number` + + The number of input tokens used to create the 1 hour cache entry. + + - `ephemeral_5m_input_tokens: number` + + The number of input tokens used to create the 5 minute cache entry. + + - `cache_creation_input_tokens: number or null` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number or null` + + The number of input tokens read from the cache. + + - `fallback_credit: BetaFallbackCreditUsage or null` + + Outcome of the `fallback_credit_token` presented on this request. + + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + + Whether the fallback-credit reprice was applied to this response's billing. + + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. + + - `BetaFallbackCreditRedeemed object { type }` + + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. + + - `type: "redeemed"` + + - `"redeemed"` + + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + + No reprice was applied; `reason` says why. + + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + + Why the reprice was not applied. + + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. + + - `"body_mismatch"` + + - `"continuation_excluded"` + + - `"continuation_only"` + + - `"expired"` + + - `"invalid_target_model"` + + - `"not_enabled"` + + - `"reprice_unavailable"` + + - `"temporarily_unavailable"` + + - `"variant_fields_present"` + + - `"wrong_organization"` + + - `"wrong_platform"` + + - `"wrong_workspace"` + + - `type: "not_applied"` + + - `"not_applied"` + + - `remove_to_redeem: optional array of string or null` + + Request fields to remove before retrying, so the retry can redeem this + token. + + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. + + - `inference_geo: string or null` + + The geographic region where inference was performed for this request. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `iterations: BetaIterationsUsage or null` + + Per-iteration token usage breakdown. + + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops + + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for a sampling iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "message"` + + Usage for a sampling iteration + + - `"message"` + + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + + Token usage for a compaction iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "compaction"` + + Usage for a compaction iteration + + - `"compaction"` + + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for an advisor sub-inference iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "advisor_message"` + + Usage for an advisor sub-inference iteration + + - `"advisor_message"` + + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for the fallback-model attempt of a server-side fallback request. + + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "fallback_message"` + + Usage for the fallback-model attempt that served the response + + - `"fallback_message"` + + - `output_tokens: number` + + The number of output tokens which were used. + + - `output_tokens_details: BetaOutputTokensDetails or null` + + Breakdown of output tokens by category. + + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. + + - `thinking_tokens: number` + + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. + + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. + + - `server_tool_use: BetaServerToolUsage or null` + + The number of server tool requests. + + - `web_fetch_requests: number` + + The number of web fetch tool requests. + + - `web_search_requests: number` + + The number of web search tool requests. + + - `service_tier: "standard" or "priority" or "batch" or null` + + If the request used the priority, standard, or batch tier. + + - `"standard"` + + - `"priority"` + + - `"batch"` + + - `speed: "standard" or "fast" or null` + + 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. + + - `"standard"` + + - `"fast"` + + - `type: "message_start"` + + - `"message_start"` + +### Beta Raw Message Stop Event + +- `BetaRawMessageStopEvent object { type }` + + - `type: "message_stop"` + + - `"message_stop"` + +### Beta Raw Message Stream Event + +- `BetaRawMessageStreamEvent = BetaRawMessageStartEvent or BetaRawMessageDeltaEvent or BetaRawMessageStopEvent or 3 more` + + - `BetaRawMessageStartEvent object { message, type }` + + - `message: BetaMessage` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `container: BetaContainer or null` + + Information about the container used in the request (for the code execution tool) + + - `id: string` + + Identifier for the container used in this request + + - `expires_at: string` + + The time at which the container will expire. + + - `skills: array of BetaSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + + - `content: array of BetaContentBlock` + + Content generated by the model. + + This is an array of content blocks, each of which has a `type` that determines its shape. + + Example: + + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` + + 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. + + For example, if the input `messages` were: + + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` + + Then the response `content` might be: + + ```json + [{"type": "text", "text": "B)"}] + ``` + + - `BetaTextBlock object { citations, text, type }` + + - `citations: array of BetaTextCitation or null` + + Citations supporting the text block. + + 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`. + + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `file_id: string or null` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `file_id: string or null` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `file_id: string or null` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `BetaThinkingBlock object { signature, thinking, type }` + + - `signature: string` + + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + + 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. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + + - `thinking: string` + + The text of Claude's thinking process for this block. + + - `type: "thinking"` + + - `"thinking"` + + - `BetaRedactedThinkingBlock object { data, type }` + + - `data: string` + + 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. + + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + + - `type: "redacted_thinking"` + + - `"redacted_thinking"` + + - `BetaToolUseBlock object { id, input, name, 3 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: string` + + - `type: "tool_use"` + + - `"tool_use"` + + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + + Tool invocation directly from the model. + + - `BetaDirectCaller object { type }` + + Tool invocation directly from the model. + + - `type: "direct"` + + - `"direct"` + + - `BetaServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `tool_id: string` + + - `type: "code_execution_20250825"` + + - `"code_execution_20250825"` + + - `BetaServerToolCaller20260120 object { tool_id, type }` + + - `tool_id: string` + + - `type: "code_execution_20260120"` + + - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + + - `BetaServerToolUseBlock object { id, input, name, 2 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` + + - `"advisor"` + + - `"web_search"` + + - `"web_fetch"` + + - `"code_execution"` + + - `"bash_code_execution"` + + - `"text_editor_code_execution"` + + - `"tool_search_tool_regex"` + + - `"tool_search_tool_bm25"` + + - `type: "server_tool_use"` + + - `"server_tool_use"` + + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + + Tool invocation directly from the model. + + - `BetaDirectCaller object { type }` + + Tool invocation directly from the model. + + - `BetaServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `BetaServerToolCaller20260120 object { tool_id, type }` + + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + + - `content: BetaWebSearchToolResultBlockContent` + + - `BetaWebSearchToolResultError object { error_code, type }` + + - `error_code: BetaWebSearchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"max_uses_exceeded"` + + - `"too_many_requests"` + + - `"query_too_long"` + + - `"request_too_large"` + + - `type: "web_search_tool_result_error"` + + - `"web_search_tool_result_error"` + + - `array of BetaWebSearchResultBlock` + + - `encrypted_content: string` + + - `page_age: string or null` + + - `title: string` + + - `type: "web_search_result"` + + - `"web_search_result"` + + - `url: string` + + - `tool_use_id: string` + + - `type: "web_search_tool_result"` + + - `"web_search_tool_result"` + + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + + Tool invocation directly from the model. + + - `BetaDirectCaller object { type }` + + Tool invocation directly from the model. + + - `BetaServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `BetaServerToolCaller20260120 object { tool_id, type }` + + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + + - `content: BetaWebFetchToolResultErrorBlock or BetaWebFetchBlock` + + - `BetaWebFetchToolResultErrorBlock object { error_code, type }` + + - `error_code: BetaWebFetchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"url_too_long"` + + - `"url_not_allowed"` + + - `"url_not_in_prior_context"` + + - `"url_not_accessible"` + + - `"unsupported_content_type"` + + - `"too_many_requests"` + + - `"max_uses_exceeded"` + + - `"unavailable"` + + - `type: "web_fetch_tool_result_error"` + + - `"web_fetch_tool_result_error"` + + - `BetaWebFetchBlock object { content, retrieved_at, type, url }` + + - `content: BetaDocumentBlock` + + - `citations: BetaCitationConfig or null` + + Citation configuration for the document + + - `enabled: boolean` + + - `source: BetaBase64PDFSource or BetaPlainTextSource` + + - `BetaBase64PDFSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "application/pdf"` + + - `"application/pdf"` + + - `type: "base64"` + + - `"base64"` + + - `BetaPlainTextSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "text/plain"` + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `title: string or null` + + The title of the document + + - `type: "document"` + + - `"document"` + + - `retrieved_at: string or null` + + ISO 8601 timestamp when the content was retrieved + + - `type: "web_fetch_result"` + + - `"web_fetch_result"` + + - `url: string` + + Fetched content URL + + - `tool_use_id: string` + + - `type: "web_fetch_tool_result"` + + - `"web_fetch_tool_result"` + + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + + Tool invocation directly from the model. + + - `BetaDirectCaller object { type }` + + Tool invocation directly from the model. + + - `BetaServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `BetaServerToolCaller20260120 object { tool_id, type }` + + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaAdvisorToolResultError or BetaAdvisorResultBlock or BetaAdvisorRedactedResultBlock` + + - `BetaAdvisorToolResultError object { error_code, type }` + + - `error_code: "max_uses_exceeded" or "prompt_too_long" or "too_many_requests" or 4 more` + + - `"max_uses_exceeded"` + + - `"prompt_too_long"` + + - `"too_many_requests"` + + - `"overloaded"` + + - `"unavailable"` + + - `"execution_time_exceeded"` + + - `"model_not_found"` + + - `type: "advisor_tool_result_error"` + + - `"advisor_tool_result_error"` + + - `BetaAdvisorResultBlock object { stop_reason, text, type }` + + - `stop_reason: string or null` + + 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. + + - `text: string` + + - `type: "advisor_result"` + + - `"advisor_result"` + + - `BetaAdvisorRedactedResultBlock object { encrypted_content, stop_reason, type }` + + - `encrypted_content: string` + + Opaque blob containing the advisor's output. Round-trip verbatim; do not inspect or modify. + + - `stop_reason: string or null` + + The advisor sub-inference's stop reason (same values as the top-level message `stop_reason`). + + - `type: "advisor_redacted_result"` + + - `"advisor_redacted_result"` + + - `tool_use_id: string` + + - `type: "advisor_tool_result"` + + - `"advisor_tool_result"` + + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaCodeExecutionToolResultBlockContent` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `BetaCodeExecutionToolResultError object { error_code, type }` + + - `error_code: BetaCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `BetaCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BetaCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `BetaEncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of BetaCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaBashCodeExecutionToolResultError or BetaBashCodeExecutionResultBlock` + + - `BetaBashCodeExecutionToolResultError object { error_code, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BetaBashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BetaBashCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"file_not_found"` + + - `error_message: string or null` + + - `type: "text_editor_code_execution_tool_result_error"` + + - `"text_editor_code_execution_tool_result_error"` + + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + + - `content: string` + + - `file_type: "text" or "image" or "pdf"` + + - `"text"` + + - `"image"` + + - `"pdf"` + + - `num_lines: number or null` + + - `start_line: number or null` + + - `total_lines: number or null` + + - `type: "text_editor_code_execution_view_result"` + + - `"text_editor_code_execution_view_result"` + + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + + - `is_file_update: boolean` + + - `type: "text_editor_code_execution_create_result"` + + - `"text_editor_code_execution_create_result"` + + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + + - `lines: array of string or null` + + - `new_lines: number or null` + + - `new_start: number or null` + + - `old_lines: number or null` + + - `old_start: number or null` + + - `type: "text_editor_code_execution_str_replace_result"` + + - `"text_editor_code_execution_str_replace_result"` + + - `tool_use_id: string` + + - `type: "text_editor_code_execution_tool_result"` + + - `"text_editor_code_execution_tool_result"` + + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + + - `BetaToolSearchToolResultError object { error_code, error_message, type }` + + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `error_message: string or null` + + - `type: "tool_search_tool_result_error"` + + - `"tool_search_tool_result_error"` + + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + + - `tool_references: array of BetaToolReferenceBlock` + + - `tool_name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `type: "tool_search_tool_search_result"` + + - `"tool_search_tool_search_result"` + + - `tool_use_id: string` + + - `type: "tool_search_tool_result"` + + - `"tool_search_tool_result"` + + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: string` + + The name of the MCP tool + + - `server_name: string` + + The name of the MCP server + + - `type: "mcp_tool_use"` + + - `"mcp_tool_use"` + + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + + - `content: string or array of BetaTextBlock` + + - `string` + + - `BetaMCPToolResultBlockContent = array of BetaTextBlock` + + - `citations: array of BetaTextCitation or null` + + Citations supporting the text block. + + 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`. + + - `text: string` + + - `type: "text"` + + - `is_error: boolean` + + - `tool_use_id: string` + + - `type: "mcp_tool_result"` + + - `"mcp_tool_result"` + + - `BetaContainerUploadBlock object { file_id, type }` + + Response model for a file uploaded to the container. + + - `file_id: string` + + - `type: "container_upload"` + + - `"container_upload"` + + - `BetaCompactionBlock object { content, encrypted_content, type }` + + A compaction block returned when autocompact is triggered. + + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. + + - `content: string or null` + + Summary of compacted content, or null if compaction failed + + - `encrypted_content: string or null` + + Opaque metadata from prior compaction, to be round-tripped verbatim + + - `type: "compaction"` + + - `"compaction"` + + - `BetaFallbackBlock object { from, to, trigger, type }` + + Marks the point in `content` where one model's output gives way to the next. + + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. + + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. + + - `from: BetaFallbackInfo` + + 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. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5"` + + High-performance model for coding and agents + + - `"claude-fable-5"` + + Next generation of intelligence for the hardest knowledge work and coding problems + + - `"claude-mythos-5"` + + Most capable model for cybersecurity and biology research + + - `"claude-opus-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-8"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-7"` + + Powerful intelligence for long-running agents and coding + + - `"claude-mythos-preview"` + + New class of intelligence, strongest in coding and cybersecurity + + - `"claude-opus-4-6"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-6"` + + Best combination of speed and intelligence + + - `"claude-haiku-4-5"` + + Fastest model with near-frontier intelligence + + - `"claude-haiku-4-5-20251001"` + + Fastest model with near-frontier intelligence + + - `"claude-opus-4-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-5-20251101"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-5"` + + High-performance model for agents and coding + + - `"claude-sonnet-4-5-20250929"` + + High-performance model for agents and coding + + - `string` + + - `to: BetaFallbackInfo` + + The fallback model producing the content that follows this block. Its `model` is always the canonical id. + + - `trigger: BetaFallbackRefusalTrigger` + + What caused the `from` model to hand over at this hop. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `type: "refusal"` + + - `"refusal"` + + - `type: "fallback"` + + - `"fallback"` + + - `context_management: BetaContextManagementResponse or null` + + Context management response. + + Information about context management strategies applied during the request. + + - `applied_edits: array of BetaClearToolUses20250919EditResponse or BetaClearThinking20251015EditResponse` + + List of context management edits that were applied. + + - `BetaClearToolUses20250919EditResponse object { cleared_input_tokens, cleared_tool_uses, type }` + + - `cleared_input_tokens: number` + + Number of input tokens cleared by this edit. + + - `cleared_tool_uses: number` + + Number of tool uses that were cleared. + + - `type: "clear_tool_uses_20250919"` + + The type of context management edit applied. + + - `"clear_tool_uses_20250919"` + + - `BetaClearThinking20251015EditResponse object { cleared_input_tokens, cleared_thinking_turns, type }` + + - `cleared_input_tokens: number` + + Number of input tokens cleared by this edit. + + - `cleared_thinking_turns: number` + + Number of thinking turns that were cleared. + + - `type: "clear_thinking_20251015"` + + The type of context management edit applied. + + - `"clear_thinking_20251015"` + + - `diagnostics: BetaDiagnostics or null` + + Response envelope for request-level diagnostics. Present (possibly + null) whenever the caller supplied `diagnostics` on the request. + + - `cache_miss_reason: BetaCacheMissModelChanged or BetaCacheMissSystemChanged or BetaCacheMissToolsChanged or 3 more or null` + + 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. + + - `BetaCacheMissModelChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "model_changed"` + + - `"model_changed"` + + - `BetaCacheMissSystemChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "system_changed"` + + - `"system_changed"` + + - `BetaCacheMissToolsChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "tools_changed"` + + - `"tools_changed"` + + - `BetaCacheMissMessagesChanged object { cache_missed_input_tokens, type }` + + - `cache_missed_input_tokens: number` + + Approximate number of input tokens that would have been read from cache had the prefix matched the previous request. + + - `type: "messages_changed"` + + - `"messages_changed"` + + - `BetaCacheMissPreviousMessageNotFound object { type }` + + - `type: "previous_message_not_found"` + + - `"previous_message_not_found"` + + - `BetaCacheMissUnavailable object { type }` + + - `type: "unavailable"` + + - `"unavailable"` + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `role: "assistant"` + + Conversational role of the generated message. + + This will always be `"assistant"`. + + - `"assistant"` + + - `stop_details: BetaRefusalStopDetails or null` + + Structured information about a refusal. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `explanation: string or null` + + Human-readable explanation of the refusal. + + This text is not guaranteed to be stable. `null` when no explanation is available for the category. + + - `fallback_credit_token: string or null` + + Opaque code that refunds the cache-miss cost when retrying this refused + request on the fallback model. Pass it as `fallback_credit_token` on the + retry request. Expires 5 minutes after the refusal. + + The retry is sent either with the same request body (`system`, `messages`, + `tools`, and other render-shaping fields), or with the same body plus one + appended `assistant` message whose content is the partial text (with any + trailing whitespace stripped from the final text block) and paired + server-tool blocks from this refusal — which also authorizes that + appended turn as an assistant-prefill continuation on models that otherwise + disallow prefill. A token minted mid-server-tool-loop whose partial content + was continuable may only be redeemed the second way — if a same-body retry + is rejected with a 400 saying the token must be redeemed by continuing the + partial response, retry the second way instead. Either way: same workspace, + same platform; a mismatch is a 400. Resending a token for an already-warm + prefix is permitted but yields no additional credit. + + `null` when the refused model isn't eligible for a fallback credit. + + - `fallback_has_prefill_claim: boolean or null` + + Whether the accompanying `fallback_credit_token` may be redeemed with the + appended-assistant retry form. Only set when `fallback_credit_token` is + present. + + `true`: retry by resending the same request body plus one appended + `assistant` message whose content is this response's `content` with any + trailing whitespace stripped from the final text block and unpaired + `tool_use` blocks omitted (the same appended-turn shape described on + `fallback_credit_token`), with the token attached. `false`: retry by + resending the original request body unchanged, with the token attached — + the appended-assistant form is not available for this refusal (no + continuable partial content, or the request uses `output_format` or a + `tool_choice` that forces tool use). One exception: when the request used + `output_format` or a forced `tool_choice` and the refusal arrived after + server tools (including MCP connector tools) had already executed, the + token may not be redeemable by either retry form; if the exact-body retry + is then rejected with a 400 saying the token must be redeemed by + continuing the partial response, discard the token and retry without it. + + Advisory: if an appended-assistant retry is rejected with a 400 despite + `true`, fall back to resending the original request body with the token. + + - `recommended_model: string or null` + + 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. + + - `type: "refusal"` + + - `"refusal"` + + - `stop_reason: BetaStopReason or null` + + The reason that we stopped. + + This may be one the following values: + + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window + + 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. + + - `"end_turn"` + + - `"max_tokens"` + + - `"stop_sequence"` + + - `"tool_use"` + + - `"pause_turn"` + + - `"compaction"` + + - `"refusal"` + + - `"model_context_window_exceeded"` + + - `stop_sequence: string or null` + + Which custom stop sequence was generated, if any. + + This value will be a non-null string if one of your custom stop sequences was generated. + + - `type: "message"` + + Object type. + + For Messages, this is always `"message"`. + + - `"message"` + + - `usage: BetaUsage` + + Billing and rate-limit usage. + + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + + 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. + + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `ephemeral_1h_input_tokens: number` + + The number of input tokens used to create the 1 hour cache entry. + + - `ephemeral_5m_input_tokens: number` + + The number of input tokens used to create the 5 minute cache entry. + + - `cache_creation_input_tokens: number or null` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number or null` + + The number of input tokens read from the cache. + + - `fallback_credit: BetaFallbackCreditUsage or null` + + Outcome of the `fallback_credit_token` presented on this request. + + - `status: BetaFallbackCreditRedeemed or BetaFallbackCreditNotApplied` + + Whether the fallback-credit reprice was applied to this response's billing. + + A union discriminated on `type`. `redeemed`: the retry is billed as if + the conversation had been on the retry model all along — including when the + resulting shift is zero because there was nothing to move. `not_applied`: + no reprice was applied; the arm's `reason` says why. + + - `BetaFallbackCreditRedeemed object { type }` + + The reprice was applied: the retry is billed as if the conversation + had been on the retry model all along. + + - `type: "redeemed"` + + - `"redeemed"` + + - `BetaFallbackCreditNotApplied object { reason, type, remove_to_redeem }` + + No reprice was applied; `reason` says why. + + - `reason: "body_mismatch" or "continuation_excluded" or "continuation_only" or 9 more` + + Why the reprice was not applied. + + A closed enum; additions to the redemption-check vocabulary arrive as + deliberate schema updates. + + - `"body_mismatch"` + + - `"continuation_excluded"` + + - `"continuation_only"` + + - `"expired"` + + - `"invalid_target_model"` + + - `"not_enabled"` + + - `"reprice_unavailable"` + + - `"temporarily_unavailable"` + + - `"variant_fields_present"` + + - `"wrong_organization"` + + - `"wrong_platform"` + + - `"wrong_workspace"` + + - `type: "not_applied"` + + - `"not_applied"` + + - `remove_to_redeem: optional array of string or null` + + Request fields to remove before retrying, so the retry can redeem this + token. + + Present exactly when `reason` is `variant_fields_present` — never null, + never an empty array; absent otherwise. Fields are named only from your own request, and only after + the sealed variant hash matched. A served best-effort retry has already + been billed at normal price; nothing redeems retroactively, but a corrected + re-send inside the token's five-minute window can still redeem. + + - `inference_geo: string or null` + + The geographic region where inference was performed for this request. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `iterations: BetaIterationsUsage or null` + + Per-iteration token usage breakdown. + + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops + + - `BetaMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for a sampling iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "message"` + + Usage for a sampling iteration + + - `"message"` + + - `BetaCompactionIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 3 more }` + + Token usage for a compaction iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "compaction"` + + Usage for a compaction iteration + + - `"compaction"` + + - `BetaAdvisorMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for an advisor sub-inference iteration. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "advisor_message"` + + Usage for an advisor sub-inference iteration + + - `"advisor_message"` + + - `BetaFallbackMessageIterationUsage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 4 more }` + + Token usage for the fallback-model attempt of a server-side fallback request. + + Produced in place of a `message` entry for whichever hop served the + response. A declined hop produces the existing `message` entry. Whether + a fallback model served the response is signalled by the presence of this + entry in `usage.iterations`. + + - `cache_creation: BetaCacheCreation or null` + + Breakdown of cached tokens by TTL + + - `cache_creation_input_tokens: number` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number` + + The number of input tokens read from the cache. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `type: "fallback_message"` + + Usage for the fallback-model attempt that served the response + + - `"fallback_message"` + + - `output_tokens: number` + + The number of output tokens which were used. + + - `output_tokens_details: BetaOutputTokensDetails or null` + + Breakdown of output tokens by category. + + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. + + - `thinking_tokens: number` + + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. + + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. + + - `server_tool_use: BetaServerToolUsage or null` + + The number of server tool requests. + + - `web_fetch_requests: number` + + The number of web fetch tool requests. + + - `web_search_requests: number` + + The number of web search tool requests. + + - `service_tier: "standard" or "priority" or "batch" or null` + + If the request used the priority, standard, or batch tier. + + - `"standard"` + + - `"priority"` + + - `"batch"` + + - `speed: "standard" or "fast" or null` + + 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. + + - `"standard"` + + - `"fast"` + + - `type: "message_start"` + + - `"message_start"` + + - `BetaRawMessageDeltaEvent object { context_management, delta, type, usage }` + + - `context_management: BetaContextManagementResponse or null` + + Information about context management strategies applied during the request + + - `delta: object { container, stop_details, stop_reason, stop_sequence }` + + - `container: BetaContainer or null` + + Information about the container used in the request (for the code execution tool) + + - `stop_details: BetaRefusalStopDetails or null` + + Structured information about a refusal. + + - `stop_reason: BetaStopReason or null` + + - `stop_sequence: string or null` + + - `type: "message_delta"` + + - `"message_delta"` + + - `usage: BetaMessageDeltaUsage` + + Billing and rate-limit usage. + + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + + 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. + + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + + - `cache_creation_input_tokens: number or null` + + The cumulative number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number or null` + + The cumulative number of input tokens read from the cache. + + - `fallback_credit: BetaFallbackCreditUsage or null` + + Outcome of the `fallback_credit_token` presented on this request. + + - `input_tokens: number or null` + + The cumulative number of input tokens which were used. + + - `iterations: BetaIterationsUsage or null` + + Per-iteration token usage breakdown. + + Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: + + - Determine which iterations exceeded long context thresholds (>=200k tokens) + - Calculate the true context window size from the last iteration + - Understand token accumulation across server-side tool use loops + + - `output_tokens: number` + + The cumulative number of output tokens which were used. + + - `output_tokens_details: BetaOutputTokensDetails or null` + + Breakdown of output tokens by category. + + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. + + - `server_tool_use: BetaServerToolUsage or null` + + The number of server tool requests. + + - `BetaRawMessageStopEvent object { type }` + + - `type: "message_stop"` + + - `"message_stop"` + + - `BetaRawContentBlockStartEvent object { content_block, index, type }` + + - `content_block: BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` + + Response model for a file uploaded to the container. + + - `BetaTextBlock object { citations, text, type }` + + - `BetaThinkingBlock object { signature, thinking, type }` + + - `BetaRedactedThinkingBlock object { data, type }` + + - `BetaToolUseBlock object { id, input, name, 3 more }` + + - `BetaServerToolUseBlock object { id, input, name, 2 more }` + + - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + + - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + + - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + + - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + + - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + + - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + + - `BetaContainerUploadBlock object { file_id, type }` + + Response model for a file uploaded to the container. + + - `BetaCompactionBlock object { content, encrypted_content, type }` + + A compaction block returned when autocompact is triggered. + + When content is None, it indicates the compaction failed to produce a valid + summary (e.g., malformed output from the model). Clients may round-trip + compaction blocks with null content; the server treats them as no-ops. + + - `BetaFallbackBlock object { from, to, trigger, type }` + + Marks the point in `content` where one model's output gives way to the next. + + One block appears per hop where a preceding model actually ran this turn and + declined. A turn where no preceding model ran and declined has no such + boundary and carries no block — the signal for whether a fallback model + served the response is the presence of a `fallback_message` entry in + `usage.iterations`, not this block. + + The block is treated like a server-tool content block for streaming: it + arrives via the standard `content_block_start` / `content_block_stop` + pair and carries no deltas. + + - `index: number` + + - `type: "content_block_start"` + + - `"content_block_start"` + + - `BetaRawContentBlockDeltaEvent object { delta, index, type }` + + - `delta: BetaRawContentBlockDelta` + + - `BetaTextDelta object { text, type }` + + - `text: string` + + - `type: "text_delta"` + + - `"text_delta"` + + - `BetaInputJSONDelta object { partial_json, type }` + + - `partial_json: string` + + - `type: "input_json_delta"` + + - `"input_json_delta"` + + - `BetaCitationsDelta object { citation, type }` + + - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` + + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + + - `type: "citations_delta"` + + - `"citations_delta"` + + - `BetaThinkingDelta object { estimated_tokens, thinking, type }` + + - `estimated_tokens: number or null` + + 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. + + - `thinking: string` + + 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. + + - `type: "thinking_delta"` + + - `"thinking_delta"` + + - `BetaSignatureDelta object { signature, type }` + + - `signature: string` + + 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. + + - `type: "signature_delta"` + + - `"signature_delta"` + + - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + + - `content: string or null` + + - `encrypted_content: string or null` + + Opaque metadata from prior compaction, to be round-tripped verbatim + + - `type: "compaction_delta"` + + - `"compaction_delta"` + + - `index: number` + + - `type: "content_block_delta"` + + - `"content_block_delta"` + + - `BetaRawContentBlockStopEvent object { index, type }` + + - `index: number` + + - `type: "content_block_stop"` + + - `"content_block_stop"` + +### Beta Redacted Thinking Block + +- `BetaRedactedThinkingBlock object { data, type }` + + - `data: string` + + 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. + + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + + - `type: "redacted_thinking"` + + - `"redacted_thinking"` + +### Beta Redacted Thinking Block Param + +- `BetaRedactedThinkingBlockParam object { data, type }` + + - `data: string` + + 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. + + - `type: "redacted_thinking"` + + - `"redacted_thinking"` + +### Beta Refusal Stop Details + +- `BetaRefusalStopDetails object { category, explanation, fallback_credit_token, 3 more }` + + Structured information about a refusal. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `explanation: string or null` + + Human-readable explanation of the refusal. + + This text is not guaranteed to be stable. `null` when no explanation is available for the category. + + - `fallback_credit_token: string or null` + + Opaque code that refunds the cache-miss cost when retrying this refused + request on the fallback model. Pass it as `fallback_credit_token` on the + retry request. Expires 5 minutes after the refusal. + + The retry is sent either with the same request body (`system`, `messages`, + `tools`, and other render-shaping fields), or with the same body plus one + appended `assistant` message whose content is the partial text (with any + trailing whitespace stripped from the final text block) and paired + server-tool blocks from this refusal — which also authorizes that + appended turn as an assistant-prefill continuation on models that otherwise + disallow prefill. A token minted mid-server-tool-loop whose partial content + was continuable may only be redeemed the second way — if a same-body retry + is rejected with a 400 saying the token must be redeemed by continuing the + partial response, retry the second way instead. Either way: same workspace, + same platform; a mismatch is a 400. Resending a token for an already-warm + prefix is permitted but yields no additional credit. + + `null` when the refused model isn't eligible for a fallback credit. + + - `fallback_has_prefill_claim: boolean or null` + + Whether the accompanying `fallback_credit_token` may be redeemed with the + appended-assistant retry form. Only set when `fallback_credit_token` is + present. + + `true`: retry by resending the same request body plus one appended + `assistant` message whose content is this response's `content` with any + trailing whitespace stripped from the final text block and unpaired + `tool_use` blocks omitted (the same appended-turn shape described on + `fallback_credit_token`), with the token attached. `false`: retry by + resending the original request body unchanged, with the token attached — + the appended-assistant form is not available for this refusal (no + continuable partial content, or the request uses `output_format` or a + `tool_choice` that forces tool use). One exception: when the request used + `output_format` or a forced `tool_choice` and the refusal arrived after + server tools (including MCP connector tools) had already executed, the + token may not be redeemable by either retry form; if the exact-body retry + is then rejected with a 400 saying the token must be redeemed by + continuing the partial response, discard the token and retry without it. + + Advisory: if an appended-assistant retry is rejected with a 400 despite + `true`, fall back to resending the original request body with the token. + + - `recommended_model: string or null` + + 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. + + - `type: "refusal"` + + - `"refusal"` + +### Beta Request Document Block + +- `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + + - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` + + - `BetaBase64PDFSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "application/pdf"` + + - `"application/pdf"` + + - `type: "base64"` + + - `"base64"` + + - `BetaPlainTextSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "text/plain"` + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `BetaContentBlockSource object { content, type }` + + - `content: string or array of BetaContentBlockSourceContent` + + - `string` + + - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + + - `BetaTextBlockParam object { text, type, cache_control, citations }` + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `citations: optional array of BetaTextCitationParam or null` + + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + + - `BetaImageBlockParam object { source, type, cache_control, transformations }` + + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + + - `BetaBase64ImageSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + + - `"image/jpeg"` + + - `"image/png"` + + - `"image/gif"` + + - `"image/webp"` + + - `type: "base64"` + + - `"base64"` + + - `BetaURLImageSource object { type, url }` + + - `type: "url"` + + - `"url"` + + - `url: string` + + - `BetaFileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + + - `type: "image"` + + - `"image"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + + - `type: "content"` + + - `"content"` + + - `BetaURLPDFSource object { type, url }` + + - `type: "url"` + + - `"url"` + + - `url: string` + + - `BetaFileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + + - `type: "document"` + + - `"document"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional BetaCitationsConfigParam or null` + + - `enabled: optional boolean` + + - `context: optional string or null` + + - `title: optional string or null` + +### Beta Request MCP Server Tool Configuration + +- `BetaRequestMCPServerToolConfiguration object { allowed_tools, enabled }` + + - `allowed_tools: optional array of string or null` + + - `enabled: optional boolean or null` + +### Beta Request MCP Server URL Definition + +- `BetaRequestMCPServerURLDefinition object { name, type, url, 2 more }` + + - `name: string` + + - `type: "url"` + + - `"url"` + + - `url: string` + + - `authorization_token: optional string or null` + + - `tool_configuration: optional BetaRequestMCPServerToolConfiguration or null` + + - `allowed_tools: optional array of string or null` + + - `enabled: optional boolean or null` + +### Beta Request MCP Tool Result Block Param + +- `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + + - `tool_use_id: string` + + - `type: "mcp_tool_result"` + + - `"mcp_tool_result"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `content: optional string or array of BetaTextBlockParam` + + - `string` + + - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional array of BetaTextCitationParam or null` + + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + + - `is_error: optional boolean` + +### Beta Request Tool Addition Block + +- `BetaRequestToolAdditionBlock object { tool, type, cache_control }` + + Mid-conversation directive to surface a declared tool. + + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_addition"` + + - `"tool_addition"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + +### Beta Request Tool Removal Block + +- `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + + Mid-conversation directive to withdraw a tool. + + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. + + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `BetaToolChangeToolReference object { name, type }` + + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. + + - `name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `BetaToolChangeMCPToolReference object { name, server_name, type }` + + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. + + - `name: string` + + - `server_name: string` + + - `type: "mcp_tool_reference"` + + - `"mcp_tool_reference"` + + - `BetaToolChangeMCPToolsetReference object { server_name, type }` + + Reference to every tool in the named MCP server's toolset. + + - `server_name: string` + + - `type: "mcp_toolset_reference"` + + - `"mcp_toolset_reference"` + + - `type: "tool_removal"` + + - `"tool_removal"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + +### Beta Search Result Block Param + +- `BetaSearchResultBlockParam object { content, source, title, 3 more }` + + - `content: array of BetaTextBlockParam` + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `citations: optional array of BetaTextCitationParam or null` + + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `thinking_tokens: number` + - `cited_text: string` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `encrypted_index: string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `title: string or null` - - `server_tool_use: BetaServerToolUsage or null` + - `type: "web_search_result_location"` - The number of server tool requests. + - `"web_search_result_location"` - - `web_fetch_requests: number` + - `url: string` - The number of web fetch tool requests. + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `web_search_requests: number` + - `cited_text: string` - The number of web search tool requests. + The full text of the cited block range, concatenated. - - `service_tier: "standard" or "priority" or "batch" or null` + 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. - If the request used the priority, standard, or batch tier. + - `end_block_index: number` - - `"standard"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"priority"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"batch"` + - `search_result_index: number` - - `speed: "standard" or "fast" or null` + 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. - 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. + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"standard"` + - `source: string` - - `"fast"` + - `start_block_index: number` - - `type: "message_start"` + 0-based index of the first cited block in the source's `content` array. - - `"message_start"` + - `title: string or null` - - `BetaRawMessageDeltaEvent object { context_management, delta, type, usage }` + - `type: "search_result_location"` - - `context_management: BetaContextManagementResponse or null` + - `"search_result_location"` - Information about context management strategies applied during the request + - `source: string` - - `delta: object { container, stop_details, stop_reason, stop_sequence }` + - `title: string` - - `container: BetaContainer or null` + - `type: "search_result"` - Information about the container used in the request (for the code execution tool) + - `"search_result"` - - `stop_details: BetaRefusalStopDetails or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - Structured information about a refusal. + Create a cache control breakpoint at this content block. - - `stop_reason: BetaStopReason or null` + - `citations: optional BetaCitationsConfigParam` - - `stop_sequence: string or null` + - `enabled: optional boolean` - - `type: "message_delta"` +### Beta Server Tool Caller - - `"message_delta"` +- `BetaServerToolCaller object { tool_id, type }` - - `usage: BetaMessageDeltaUsage` + Tool invocation generated by a server-side tool. - Billing and rate-limit usage. + - `tool_id: string` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `type: "code_execution_20250825"` - 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. + - `"code_execution_20250825"` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. +### Beta Server Tool Caller 20260120 - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. +- `BetaServerToolCaller20260120 object { tool_id, type }` - - `cache_creation_input_tokens: number or null` + - `tool_id: string` - The cumulative number of input tokens used to create the cache entry. + - `type: "code_execution_20260120"` - - `cache_read_input_tokens: number or null` + - `"code_execution_20260120"` - The cumulative number of input tokens read from the cache. +### Beta Server Tool Usage - - `fallback_credit: BetaFallbackCreditUsage or null` +- `BetaServerToolUsage object { web_fetch_requests, web_search_requests }` - Outcome of the `fallback_credit_token` presented on this request. + - `web_fetch_requests: number` - - `input_tokens: number or null` + The number of web fetch tool requests. - The cumulative number of input tokens which were used. + - `web_search_requests: number` - - `iterations: BetaIterationsUsage or null` + The number of web search tool requests. - Per-iteration token usage breakdown. +### Beta Server Tool Use Block - Each entry represents one sampling iteration, with its own input/output token counts and cache statistics. This allows you to: +- `BetaServerToolUseBlock object { id, input, name, 2 more }` - - Determine which iterations exceeded long context thresholds (>=200k tokens) - - Calculate the true context window size from the last iteration - - Understand token accumulation across server-side tool use loops + - `id: string` - - `output_tokens: number` + - `input: map[unknown]` - The cumulative number of output tokens which were used. + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `output_tokens_details: BetaOutputTokensDetails or null` + - `"advisor"` - Breakdown of output tokens by category. + - `"web_search"` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `"web_fetch"` - - `server_tool_use: BetaServerToolUsage or null` + - `"code_execution"` - The number of server tool requests. + - `"bash_code_execution"` - - `BetaRawMessageStopEvent object { type }` + - `"text_editor_code_execution"` - - `type: "message_stop"` + - `"tool_search_tool_regex"` - - `"message_stop"` + - `"tool_search_tool_bm25"` - - `BetaRawContentBlockStartEvent object { content_block, index, type }` + - `type: "server_tool_use"` - - `content_block: BetaTextBlock or BetaThinkingBlock or BetaRedactedThinkingBlock or 14 more` + - `"server_tool_use"` - Response model for a file uploaded to the container. + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `BetaTextBlock object { citations, text, type }` + Tool invocation directly from the model. - - `BetaThinkingBlock object { signature, thinking, type }` + - `BetaDirectCaller object { type }` - - `BetaRedactedThinkingBlock object { data, type }` + Tool invocation directly from the model. - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `type: "direct"` - - `BetaServerToolUseBlock object { id, input, name, 2 more }` + - `"direct"` - - `BetaWebSearchToolResultBlock object { content, tool_use_id, type, caller }` + - `BetaServerToolCaller object { tool_id, type }` - - `BetaWebFetchToolResultBlock object { content, tool_use_id, type, caller }` + Tool invocation generated by a server-side tool. - - `BetaAdvisorToolResultBlock object { content, tool_use_id, type }` + - `tool_id: string` - - `BetaCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `type: "code_execution_20250825"` - - `BetaBashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"code_execution_20250825"` - - `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `tool_id: string` - - `BetaMCPToolUseBlock object { id, input, name, 2 more }` + - `type: "code_execution_20260120"` - - `BetaMCPToolResultBlock object { content, is_error, tool_use_id, type }` + - `"code_execution_20260120"` - - `BetaContainerUploadBlock object { file_id, type }` +### Beta Server Tool Use Block Param - Response model for a file uploaded to the container. +- `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - - `BetaCompactionBlock object { content, encrypted_content, type }` + - `id: string` - A compaction block returned when autocompact is triggered. + - `input: map[unknown]` - When content is None, it indicates the compaction failed to produce a valid - summary (e.g., malformed output from the model). Clients may round-trip - compaction blocks with null content; the server treats them as no-ops. + - `name: "advisor" or "web_search" or "web_fetch" or 5 more` - - `BetaFallbackBlock object { from, to, trigger, type }` + - `"advisor"` - Marks the point in `content` where one model's output gives way to the next. + - `"web_search"` - One block appears per hop where a preceding model actually ran this turn and - declined. A turn where no preceding model ran and declined has no such - boundary and carries no block — the signal for whether a fallback model - served the response is the presence of a `fallback_message` entry in - `usage.iterations`, not this block. + - `"web_fetch"` - The block is treated like a server-tool content block for streaming: it - arrives via the standard `content_block_start` / `content_block_stop` - pair and carries no deltas. + - `"code_execution"` - - `index: number` + - `"bash_code_execution"` - - `type: "content_block_start"` + - `"text_editor_code_execution"` - - `"content_block_start"` + - `"tool_search_tool_regex"` - - `BetaRawContentBlockDeltaEvent object { delta, index, type }` + - `"tool_search_tool_bm25"` - - `delta: BetaRawContentBlockDelta` + - `type: "server_tool_use"` - - `BetaTextDelta object { text, type }` + - `"server_tool_use"` - - `text: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "text_delta"` + Create a cache control breakpoint at this content block. - - `"text_delta"` + - `type: "ephemeral"` - - `BetaInputJSONDelta object { partial_json, type }` + - `"ephemeral"` - - `partial_json: string` + - `ttl: optional "5m" or "1h"` - - `type: "input_json_delta"` + The time-to-live for the cache control breakpoint. - - `"input_json_delta"` + This may be one the following values: - - `BetaCitationsDelta object { citation, type }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `citation: BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"5m"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"1h"` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + Tool invocation directly from the model. - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `BetaDirectCaller object { type }` - - `type: "citations_delta"` + Tool invocation directly from the model. - - `"citations_delta"` + - `type: "direct"` - - `BetaThinkingDelta object { estimated_tokens, thinking, type }` + - `"direct"` - - `estimated_tokens: number or null` + - `BetaServerToolCaller object { tool_id, type }` - 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. + Tool invocation generated by a server-side tool. - - `thinking: string` + - `tool_id: string` - 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. + - `type: "code_execution_20250825"` - - `type: "thinking_delta"` + - `"code_execution_20250825"` - - `"thinking_delta"` + - `BetaServerToolCaller20260120 object { tool_id, type }` - - `BetaSignatureDelta object { signature, type }` + - `tool_id: string` - - `signature: string` + - `type: "code_execution_20260120"` - 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. + - `"code_execution_20260120"` - - `type: "signature_delta"` +### Beta Signature Delta - - `"signature_delta"` +- `BetaSignatureDelta object { signature, type }` - - `BetaCompactionContentBlockDelta object { content, encrypted_content, type }` + - `signature: string` - - `content: string or null` + 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. - - `encrypted_content: string or null` + - `type: "signature_delta"` - Opaque metadata from prior compaction, to be round-tripped verbatim + - `"signature_delta"` - - `type: "compaction_delta"` +### Beta Skill - - `"compaction_delta"` +- `BetaSkill object { skill_id, type, version }` - - `index: number` + A skill that was loaded in a container (response model). - - `type: "content_block_delta"` + - `skill_id: string` - - `"content_block_delta"` + Skill ID - - `BetaRawContentBlockStopEvent object { index, type }` + - `type: "anthropic" or "custom"` - - `index: number` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `type: "content_block_stop"` + - `"anthropic"` - - `"content_block_stop"` + - `"custom"` -### Beta Redacted Thinking Block + - `version: string` -- `BetaRedactedThinkingBlock object { data, type }` + Skill version or 'latest' for most recent version - - `data: string` +### Beta Skill Params - 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. +- `BetaSkillParams object { skill_id, type, version }` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + Specification for a skill to be loaded in a container (request model). - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `skill_id: string` - - `type: "redacted_thinking"` + Skill ID - - `"redacted_thinking"` + - `type: "anthropic" or "custom"` -### Beta Redacted Thinking Block Param + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) -- `BetaRedactedThinkingBlockParam object { data, type }` + - `"anthropic"` - - `data: string` + - `"custom"` - 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. + - `version: optional string` - - `type: "redacted_thinking"` + Skill version or 'latest' for most recent version - - `"redacted_thinking"` +### Beta Stop Reason -### Beta Refusal Stop Details +- `BetaStopReason = "end_turn" or "max_tokens" or "stop_sequence" or 5 more` -- `BetaRefusalStopDetails object { category, explanation, fallback_credit_token, 3 more }` + - `"end_turn"` - Structured information about a refusal. + - `"max_tokens"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `"stop_sequence"` - The policy category that triggered a refusal. + - `"tool_use"` - - `"cyber"` + - `"pause_turn"` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `"compaction"` - - `"bio"` + - `"refusal"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"model_context_window_exceeded"` - - `"frontier_llm"` +### Beta Text Block - 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. +- `BetaTextBlock object { citations, text, type }` - - `"reasoning_extraction"` + - `citations: array of BetaTextCitation or null` - 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). + Citations supporting the text block. - - `"general_harms"` + 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`. - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `explanation: string or null` + - `cited_text: string` - Human-readable explanation of the refusal. + - `document_index: number` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `document_title: string or null` - - `fallback_credit_token: string or null` + - `end_char_index: number` - Opaque code that refunds the cache-miss cost when retrying this refused - request on the fallback model. Pass it as `fallback_credit_token` on the - retry request. Expires 5 minutes after the refusal. + - `file_id: string or null` - The retry is sent either with the same request body (`system`, `messages`, - `tools`, and other render-shaping fields), or with the same body plus one - appended `assistant` message whose content is the partial text (with any - trailing whitespace stripped from the final text block) and paired - server-tool blocks from this refusal — which also authorizes that - appended turn as an assistant-prefill continuation on models that otherwise - disallow prefill. A token minted mid-server-tool-loop whose partial content - was continuable may only be redeemed the second way — if a same-body retry - is rejected with a 400 saying the token must be redeemed by continuing the - partial response, retry the second way instead. Either way: same workspace, - same platform; a mismatch is a 400. Resending a token for an already-warm - prefix is permitted but yields no additional credit. + - `start_char_index: number` - `null` when the refused model isn't eligible for a fallback credit. + - `type: "char_location"` - - `fallback_has_prefill_claim: boolean or null` + - `"char_location"` - Whether the accompanying `fallback_credit_token` may be redeemed with the - appended-assistant retry form. Only set when `fallback_credit_token` is - present. + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - `true`: retry by resending the same request body plus one appended - `assistant` message whose content is this response's `content` with any - trailing whitespace stripped from the final text block and unpaired - `tool_use` blocks omitted (the same appended-turn shape described on - `fallback_credit_token`), with the token attached. `false`: retry by - resending the original request body unchanged, with the token attached — - the appended-assistant form is not available for this refusal (no - continuable partial content, or the request uses `output_format` or a - `tool_choice` that forces tool use). One exception: when the request used - `output_format` or a forced `tool_choice` and the refusal arrived after - server tools (including MCP connector tools) had already executed, the - token may not be redeemable by either retry form; if the exact-body retry - is then rejected with a 400 saying the token must be redeemed by - continuing the partial response, discard the token and retry without it. + - `cited_text: string` - Advisory: if an appended-assistant retry is rejected with a 400 despite - `true`, fall back to resending the original request body with the token. + - `document_index: number` - - `recommended_model: string or null` + - `document_title: string or null` - 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. + - `end_page_number: number` - - `type: "refusal"` + - `file_id: string or null` - - `"refusal"` + - `start_page_number: number` -### Beta Request Document Block + - `type: "page_location"` -- `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + - `"page_location"` - - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `BetaBase64PDFSource object { data, media_type, type }` + - `cited_text: string` - - `data: string` + The full text of the cited block range, concatenated. - - `media_type: "application/pdf"` + 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. - - `"application/pdf"` + - `document_index: number` - - `type: "base64"` + - `document_title: string or null` - - `"base64"` + - `end_block_index: number` - - `BetaPlainTextSource object { data, media_type, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `data: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `media_type: "text/plain"` + - `file_id: string or null` - - `"text/plain"` + - `start_block_index: number` - - `type: "text"` + 0-based index of the first cited block in the source's `content` array. - - `"text"` + - `type: "content_block_location"` - - `BetaContentBlockSource object { content, type }` + - `"content_block_location"` - - `content: string or array of BetaContentBlockSourceContent` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `string` + - `cited_text: string` - - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + - `encrypted_index: string` - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `title: string or null` - - `text: string` + - `type: "web_search_result_location"` - - `type: "text"` + - `"web_search_result_location"` - - `"text"` + - `url: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - Create a cache control breakpoint at this content block. + - `cited_text: string` - - `type: "ephemeral"` + The full text of the cited block range, concatenated. - - `"ephemeral"` + 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. - - `ttl: optional "5m" or "1h"` + - `end_block_index: number` - The time-to-live for the cache control breakpoint. + Exclusive 0-based end index of the cited block range in the source's `content` array. - This may be one the following values: + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `5m`: 5 minutes - - `1h`: 1 hour + - `search_result_index: number` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"1h"` + - `source: string` - - `citations: optional array of BetaTextCitationParam or null` + - `start_block_index: number` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + 0-based index of the first cited block in the source's `content` array. - - `cited_text: string` + - `title: string or null` - - `document_index: number` + - `type: "search_result_location"` - - `document_title: string or null` + - `"search_result_location"` - - `end_char_index: number` + - `text: string` - - `start_char_index: number` + - `type: "text"` - - `type: "char_location"` + - `"text"` - - `"char_location"` +### Beta Text Block Param - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` +- `BetaTextBlockParam object { text, type, cache_control, citations }` - - `cited_text: string` + - `text: string` - - `document_index: number` + - `type: "text"` - - `document_title: string or null` + - `"text"` - - `end_page_number: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `start_page_number: number` + Create a cache control breakpoint at this content block. - - `type: "page_location"` + - `type: "ephemeral"` - - `"page_location"` + - `"ephemeral"` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `ttl: optional "5m" or "1h"` - - `cited_text: string` + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour - The full text of the cited block range, concatenated. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - 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. + - `"5m"` - - `document_index: number` + - `"1h"` - - `document_title: string or null` + - `citations: optional array of BetaTextCitationParam or null` - - `end_block_index: number` + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `cited_text: string` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `document_index: number` - - `start_block_index: number` + - `document_title: string or null` - 0-based index of the first cited block in the source's `content` array. + - `end_char_index: number` - - `type: "content_block_location"` + - `start_char_index: number` - - `"content_block_location"` + - `type: "char_location"` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"char_location"` - - `cited_text: string` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `encrypted_index: string` + - `cited_text: string` - - `title: string or null` + - `document_index: number` - - `type: "web_search_result_location"` + - `document_title: string or null` - - `"web_search_result_location"` + - `end_page_number: number` - - `url: string` + - `start_page_number: number` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "page_location"` - - `cited_text: string` + - `"page_location"` - The full text of the cited block range, concatenated. + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - 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. + - `cited_text: string` - - `end_block_index: number` + The full text of the cited block range, concatenated. - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `document_index: number` - - `search_result_index: number` + - `document_title: string or null` - 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. + - `end_block_index: number` - Counted separately from `document_index`; server-side web search results are not included in this count. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `source: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `start_block_index: number` + - `start_block_index: number` - 0-based index of the first cited block in the source's `content` array. + 0-based index of the first cited block in the source's `content` array. - - `title: string or null` + - `type: "content_block_location"` - - `type: "search_result_location"` + - `"content_block_location"` - - `"search_result_location"` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `cited_text: string` - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` + - `encrypted_index: string` - - `BetaBase64ImageSource object { data, media_type, type }` + - `title: string or null` - - `data: string` + - `type: "web_search_result_location"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `"web_search_result_location"` - - `"image/jpeg"` + - `url: string` - - `"image/png"` + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"image/gif"` + - `cited_text: string` - - `"image/webp"` + The full text of the cited block range, concatenated. - - `type: "base64"` + 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. - - `"base64"` + - `end_block_index: number` - - `BetaURLImageSource object { type, url }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "url"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"url"` + - `search_result_index: number` - - `url: string` + 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. - - `BetaFileImageSource object { file_id, type }` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `file_id: string` + - `source: string` - - `type: "file"` + - `start_block_index: number` - - `"file"` + 0-based index of the first cited block in the source's `content` array. - - `type: "image"` + - `title: string or null` - - `"image"` + - `type: "search_result_location"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"search_result_location"` - Create a cache control breakpoint at this content block. +### Beta Text Citation - - `type: "content"` +- `BetaTextCitation = BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` - - `"content"` + - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `BetaURLPDFSource object { type, url }` + - `cited_text: string` - - `type: "url"` + - `document_index: number` - - `"url"` + - `document_title: string or null` - - `url: string` + - `end_char_index: number` - - `BetaFileDocumentSource object { file_id, type }` + - `file_id: string or null` - - `file_id: string` + - `start_char_index: number` - - `type: "file"` + - `type: "char_location"` - - `"file"` + - `"char_location"` - - `type: "document"` + - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"document"` + - `cited_text: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `document_index: number` - Create a cache control breakpoint at this content block. + - `document_title: string or null` - - `citations: optional BetaCitationsConfigParam or null` + - `end_page_number: number` - - `enabled: optional boolean` + - `file_id: string or null` - - `context: optional string or null` + - `start_page_number: number` - - `title: optional string or null` + - `type: "page_location"` -### Beta Request MCP Server Tool Configuration + - `"page_location"` -- `BetaRequestMCPServerToolConfiguration object { allowed_tools, enabled }` + - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `allowed_tools: optional array of string or null` + - `cited_text: string` - - `enabled: optional boolean or null` + The full text of the cited block range, concatenated. -### Beta Request MCP Server URL Definition + 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. -- `BetaRequestMCPServerURLDefinition object { name, type, url, 2 more }` + - `document_index: number` - - `name: string` + - `document_title: string or null` - - `type: "url"` + - `end_block_index: number` - - `"url"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `url: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `authorization_token: optional string or null` + - `file_id: string or null` - - `tool_configuration: optional BetaRequestMCPServerToolConfiguration or null` + - `start_block_index: number` - - `allowed_tools: optional array of string or null` + 0-based index of the first cited block in the source's `content` array. - - `enabled: optional boolean or null` + - `type: "content_block_location"` -### Beta Request MCP Tool Result Block Param + - `"content_block_location"` -- `BetaRequestMCPToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `tool_use_id: string` + - `cited_text: string` - - `type: "mcp_tool_result"` + - `encrypted_index: string` - - `"mcp_tool_result"` + - `title: string or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "web_search_result_location"` - Create a cache control breakpoint at this content block. + - `"web_search_result_location"` - - `type: "ephemeral"` + - `url: string` - - `"ephemeral"` + - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `ttl: optional "5m" or "1h"` + - `cited_text: string` - The time-to-live for the cache control breakpoint. + The full text of the cited block range, concatenated. - This may be one the following values: + 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. - - `5m`: 5 minutes - - `1h`: 1 hour + - `end_block_index: number` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"5m"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"1h"` + - `search_result_index: number` - - `content: optional string or array of BetaTextBlockParam` + 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. - - `string` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `BetaMCPToolResultBlockParamContent = array of BetaTextBlockParam` + - `source: string` - - `text: string` + - `start_block_index: number` - - `type: "text"` + 0-based index of the first cited block in the source's `content` array. - - `"text"` + - `title: string or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "search_result_location"` - Create a cache control breakpoint at this content block. + - `"search_result_location"` - - `citations: optional array of BetaTextCitationParam or null` +### Beta Text Citation Param - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` +- `BetaTextCitationParam = BetaCitationCharLocationParam or BetaCitationPageLocationParam or BetaCitationContentBlockLocationParam or 2 more` - - `cited_text: string` + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `document_index: number` + - `cited_text: string` - - `document_title: string or null` + - `document_index: number` - - `end_char_index: number` + - `document_title: string or null` - - `start_char_index: number` + - `end_char_index: number` - - `type: "char_location"` + - `start_char_index: number` - - `"char_location"` + - `type: "char_location"` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"char_location"` - - `cited_text: string` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `document_index: number` + - `cited_text: string` - - `document_title: string or null` + - `document_index: number` - - `end_page_number: number` + - `document_title: string or null` - - `start_page_number: number` + - `end_page_number: number` - - `type: "page_location"` + - `start_page_number: number` - - `"page_location"` + - `type: "page_location"` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"page_location"` - - `cited_text: string` + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - The full text of the cited block range, concatenated. + - `cited_text: string` - 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. + The full text of the cited block range, concatenated. - - `document_index: number` + 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. - - `document_title: string or null` + - `document_index: number` - - `end_block_index: number` + - `document_title: string or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `end_block_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `start_block_index: number` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - 0-based index of the first cited block in the source's `content` array. + - `start_block_index: number` - - `type: "content_block_location"` + 0-based index of the first cited block in the source's `content` array. - - `"content_block_location"` + - `type: "content_block_location"` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"content_block_location"` - - `cited_text: string` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `encrypted_index: string` + - `cited_text: string` - - `title: string or null` + - `encrypted_index: string` - - `type: "web_search_result_location"` + - `title: string or null` - - `"web_search_result_location"` + - `type: "web_search_result_location"` - - `url: string` + - `"web_search_result_location"` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `url: string` - - `cited_text: string` + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - The full text of the cited block range, concatenated. + - `cited_text: string` - 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. + The full text of the cited block range, concatenated. - - `end_block_index: number` + 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. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `end_block_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `search_result_index: number` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - 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. + - `search_result_index: number` - Counted separately from `document_index`; server-side web search results are not included in this count. + 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. - - `source: string` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `start_block_index: number` + - `source: string` - 0-based index of the first cited block in the source's `content` array. + - `start_block_index: number` - - `title: string or null` + 0-based index of the first cited block in the source's `content` array. - - `type: "search_result_location"` + - `title: string or null` - - `"search_result_location"` + - `type: "search_result_location"` - - `is_error: optional boolean` + - `"search_result_location"` -### Beta Request Tool Addition Block +### Beta Text Delta -- `BetaRequestToolAdditionBlock object { tool, type, cache_control }` +- `BetaTextDelta object { text, type }` - Mid-conversation directive to surface a declared tool. + - `text: string` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + - `type: "text_delta"` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + - `"text_delta"` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. +### Beta Text Editor Code Execution Create Result Block - - `BetaToolChangeToolReference object { name, type }` +- `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `is_file_update: boolean` - - `name: string` + - `type: "text_editor_code_execution_create_result"` - - `type: "tool_reference"` + - `"text_editor_code_execution_create_result"` - - `"tool_reference"` +### Beta Text Editor Code Execution Create Result Block Param - - `BetaToolChangeMCPToolReference object { name, server_name, type }` +- `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `is_file_update: boolean` - - `name: string` + - `type: "text_editor_code_execution_create_result"` - - `server_name: string` + - `"text_editor_code_execution_create_result"` - - `type: "mcp_tool_reference"` +### Beta Text Editor Code Execution Str Replace Result Block - - `"mcp_tool_reference"` +- `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `lines: array of string or null` - Reference to every tool in the named MCP server's toolset. + - `new_lines: number or null` - - `server_name: string` + - `new_start: number or null` - - `type: "mcp_toolset_reference"` + - `old_lines: number or null` - - `"mcp_toolset_reference"` + - `old_start: number or null` - - `type: "tool_addition"` + - `type: "text_editor_code_execution_str_replace_result"` - - `"tool_addition"` + - `"text_editor_code_execution_str_replace_result"` - - `cache_control: optional BetaCacheControlEphemeral or null` +### Beta Text Editor Code Execution Str Replace Result Block Param - Create a cache control breakpoint at this content block. +- `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `type: "ephemeral"` + - `type: "text_editor_code_execution_str_replace_result"` - - `"ephemeral"` + - `"text_editor_code_execution_str_replace_result"` - - `ttl: optional "5m" or "1h"` + - `lines: optional array of string or null` - The time-to-live for the cache control breakpoint. + - `new_lines: optional number or null` - This may be one the following values: + - `new_start: optional number or null` - - `5m`: 5 minutes - - `1h`: 1 hour + - `old_lines: optional number or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `old_start: optional number or null` - - `"5m"` +### Beta Text Editor Code Execution Tool Result Block - - `"1h"` +- `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` -### Beta Request Tool Removal Block + - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` -- `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - Mid-conversation directive to withdraw a tool. + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `"invalid_tool_input"` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + - `"unavailable"` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `"too_many_requests"` - - `BetaToolChangeToolReference object { name, type }` + - `"execution_time_exceeded"` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `"file_not_found"` - - `name: string` + - `error_message: string or null` - - `type: "tool_reference"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"tool_reference"` + - `"text_editor_code_execution_tool_result_error"` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `content: string` - - `name: string` + - `file_type: "text" or "image" or "pdf"` - - `server_name: string` + - `"text"` - - `type: "mcp_tool_reference"` + - `"image"` - - `"mcp_tool_reference"` + - `"pdf"` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `num_lines: number or null` - Reference to every tool in the named MCP server's toolset. + - `start_line: number or null` - - `server_name: string` + - `total_lines: number or null` - - `type: "mcp_toolset_reference"` + - `type: "text_editor_code_execution_view_result"` - - `"mcp_toolset_reference"` + - `"text_editor_code_execution_view_result"` - - `type: "tool_removal"` + - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `"tool_removal"` + - `is_file_update: boolean` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "text_editor_code_execution_create_result"` - Create a cache control breakpoint at this content block. + - `"text_editor_code_execution_create_result"` - - `type: "ephemeral"` + - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `"ephemeral"` + - `lines: array of string or null` - - `ttl: optional "5m" or "1h"` + - `new_lines: number or null` - The time-to-live for the cache control breakpoint. + - `new_start: number or null` - This may be one the following values: + - `old_lines: number or null` - - `5m`: 5 minutes - - `1h`: 1 hour + - `old_start: number or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `type: "text_editor_code_execution_str_replace_result"` - - `"5m"` + - `"text_editor_code_execution_str_replace_result"` - - `"1h"` + - `tool_use_id: string` -### Beta Search Result Block Param + - `type: "text_editor_code_execution_tool_result"` -- `BetaSearchResultBlockParam object { content, source, title, 3 more }` + - `"text_editor_code_execution_tool_result"` - - `content: array of BetaTextBlockParam` +### Beta Text Editor Code Execution Tool Result Block Param - - `text: string` +- `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `type: "text"` + - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` - - `"text"` + - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - Create a cache control breakpoint at this content block. + - `"invalid_tool_input"` - - `type: "ephemeral"` + - `"unavailable"` - - `"ephemeral"` + - `"too_many_requests"` - - `ttl: optional "5m" or "1h"` + - `"execution_time_exceeded"` - The time-to-live for the cache control breakpoint. + - `"file_not_found"` - This may be one the following values: + - `type: "text_editor_code_execution_tool_result_error"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"text_editor_code_execution_tool_result_error"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `error_message: optional string or null` - - `"5m"` + - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `"1h"` + - `content: string` - - `citations: optional array of BetaTextCitationParam or null` + - `file_type: "text" or "image" or "pdf"` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"text"` - - `cited_text: string` + - `"image"` - - `document_index: number` + - `"pdf"` - - `document_title: string or null` + - `type: "text_editor_code_execution_view_result"` - - `end_char_index: number` + - `"text_editor_code_execution_view_result"` - - `start_char_index: number` + - `num_lines: optional number or null` - - `type: "char_location"` + - `start_line: optional number or null` - - `"char_location"` + - `total_lines: optional number or null` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `cited_text: string` + - `is_file_update: boolean` - - `document_index: number` + - `type: "text_editor_code_execution_create_result"` - - `document_title: string or null` + - `"text_editor_code_execution_create_result"` - - `end_page_number: number` + - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `start_page_number: number` + - `type: "text_editor_code_execution_str_replace_result"` - - `type: "page_location"` + - `"text_editor_code_execution_str_replace_result"` - - `"page_location"` + - `lines: optional array of string or null` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `new_lines: optional number or null` - - `cited_text: string` + - `new_start: optional number or null` - The full text of the cited block range, concatenated. + - `old_lines: optional number or null` - 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. + - `old_start: optional number or null` - - `document_index: number` + - `tool_use_id: string` - - `document_title: string or null` + - `type: "text_editor_code_execution_tool_result"` - - `end_block_index: number` + - `"text_editor_code_execution_tool_result"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `cache_control: optional BetaCacheControlEphemeral or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Create a cache control breakpoint at this content block. - - `start_block_index: number` + - `type: "ephemeral"` - 0-based index of the first cited block in the source's `content` array. + - `"ephemeral"` - - `type: "content_block_location"` + - `ttl: optional "5m" or "1h"` - - `"content_block_location"` + The time-to-live for the cache control breakpoint. - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + This may be one the following values: - - `cited_text: string` + - `5m`: 5 minutes + - `1h`: 1 hour - - `encrypted_index: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `title: string or null` + - `"5m"` - - `type: "web_search_result_location"` + - `"1h"` - - `"web_search_result_location"` +### Beta Text Editor Code Execution Tool Result Error - - `url: string` +- `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `cited_text: string` + - `"invalid_tool_input"` - The full text of the cited block range, concatenated. + - `"unavailable"` - 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. + - `"too_many_requests"` - - `end_block_index: number` + - `"execution_time_exceeded"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"file_not_found"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `error_message: string or null` - - `search_result_index: number` + - `type: "text_editor_code_execution_tool_result_error"` - 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. + - `"text_editor_code_execution_tool_result_error"` - Counted separately from `document_index`; server-side web search results are not included in this count. +### Beta Text Editor Code Execution Tool Result Error Param - - `source: string` +- `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `start_block_index: number` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - 0-based index of the first cited block in the source's `content` array. + - `"invalid_tool_input"` - - `title: string or null` + - `"unavailable"` - - `type: "search_result_location"` + - `"too_many_requests"` - - `"search_result_location"` + - `"execution_time_exceeded"` - - `source: string` + - `"file_not_found"` - - `title: string` + - `type: "text_editor_code_execution_tool_result_error"` - - `type: "search_result"` + - `"text_editor_code_execution_tool_result_error"` - - `"search_result"` + - `error_message: optional string or null` - - `cache_control: optional BetaCacheControlEphemeral or null` +### Beta Text Editor Code Execution View Result Block - Create a cache control breakpoint at this content block. +- `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `citations: optional BetaCitationsConfigParam` + - `content: string` - - `enabled: optional boolean` + - `file_type: "text" or "image" or "pdf"` -### Beta Server Tool Caller + - `"text"` -- `BetaServerToolCaller object { tool_id, type }` + - `"image"` - Tool invocation generated by a server-side tool. + - `"pdf"` - - `tool_id: string` + - `num_lines: number or null` - - `type: "code_execution_20250825"` + - `start_line: number or null` - - `"code_execution_20250825"` + - `total_lines: number or null` -### Beta Server Tool Caller 20260120 + - `type: "text_editor_code_execution_view_result"` -- `BetaServerToolCaller20260120 object { tool_id, type }` + - `"text_editor_code_execution_view_result"` - - `tool_id: string` +### Beta Text Editor Code Execution View Result Block Param - - `type: "code_execution_20260120"` +- `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `"code_execution_20260120"` + - `content: string` -### Beta Server Tool Usage + - `file_type: "text" or "image" or "pdf"` -- `BetaServerToolUsage object { web_fetch_requests, web_search_requests }` + - `"text"` - - `web_fetch_requests: number` + - `"image"` - The number of web fetch tool requests. + - `"pdf"` - - `web_search_requests: number` + - `type: "text_editor_code_execution_view_result"` - The number of web search tool requests. + - `"text_editor_code_execution_view_result"` -### Beta Server Tool Use Block + - `num_lines: optional number or null` -- `BetaServerToolUseBlock object { id, input, name, 2 more }` + - `start_line: optional number or null` - - `id: string` + - `total_lines: optional number or null` - - `input: map[unknown]` +### Beta Thinking Block - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` +- `BetaThinkingBlock object { signature, thinking, type }` - - `"advisor"` + - `signature: string` - - `"web_search"` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"web_fetch"` + 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. - - `"code_execution"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"bash_code_execution"` + - `thinking: string` - - `"text_editor_code_execution"` + The text of Claude's thinking process for this block. - - `"tool_search_tool_regex"` + - `type: "thinking"` - - `"tool_search_tool_bm25"` + - `"thinking"` - - `type: "server_tool_use"` +### Beta Thinking Block Param - - `"server_tool_use"` +- `BetaThinkingBlockParam object { signature, thinking, type }` - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `signature: string` - Tool invocation directly from the model. + 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. - - `BetaDirectCaller object { type }` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - Tool invocation directly from the model. + - `thinking: string` - - `type: "direct"` + The `thinking` text of this block as returned by the API. - - `"direct"` + - `type: "thinking"` - - `BetaServerToolCaller object { tool_id, type }` + - `"thinking"` - Tool invocation generated by a server-side tool. +### Beta Thinking Config Adaptive - - `tool_id: string` +- `BetaThinkingConfigAdaptive object { type, display }` - - `type: "code_execution_20250825"` + - `type: "adaptive"` - - `"code_execution_20250825"` + - `"adaptive"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `display: optional "summarized" or "omitted" or null` - - `tool_id: string` + 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`. - - `type: "code_execution_20260120"` + - `"summarized"` - - `"code_execution_20260120"` + - `"omitted"` -### Beta Server Tool Use Block Param +### Beta Thinking Config Disabled -- `BetaServerToolUseBlockParam object { id, input, name, 3 more }` +- `BetaThinkingConfigDisabled object { type }` - - `id: string` + - `type: "disabled"` - - `input: map[unknown]` + - `"disabled"` - - `name: "advisor" or "web_search" or "web_fetch" or 5 more` +### Beta Thinking Config Enabled - - `"advisor"` +- `BetaThinkingConfigEnabled object { budget_tokens, type, display }` - - `"web_search"` + - `budget_tokens: number` - - `"web_fetch"` + 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. - - `"code_execution"` + Must be ≥1024 and less than `max_tokens`. - - `"bash_code_execution"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"text_editor_code_execution"` + - `type: "enabled"` - - `"tool_search_tool_regex"` + - `"enabled"` - - `"tool_search_tool_bm25"` + - `display: optional "summarized" or "omitted" or null` - - `type: "server_tool_use"` + 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`. - - `"server_tool_use"` + - `"summarized"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"omitted"` - Create a cache control breakpoint at this content block. +### Beta Thinking Config Param - - `type: "ephemeral"` +- `BetaThinkingConfigParam = BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive` - - `"ephemeral"` + Configuration for enabling Claude's extended thinking. - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - This may be one the following values: + - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` - - `5m`: 5 minutes - - `1h`: 1 hour + - `budget_tokens: number` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + Must be ≥1024 and less than `max_tokens`. - - `"1h"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `caller: optional BetaDirectCaller or BetaServerToolCaller or BetaServerToolCaller20260120` + - `type: "enabled"` - Tool invocation directly from the model. + - `"enabled"` - - `BetaDirectCaller object { type }` + - `display: optional "summarized" or "omitted" or null` - Tool invocation directly from the model. + 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`. - - `type: "direct"` + - `"summarized"` - - `"direct"` + - `"omitted"` - - `BetaServerToolCaller object { tool_id, type }` + - `BetaThinkingConfigDisabled object { type }` - Tool invocation generated by a server-side tool. + - `type: "disabled"` - - `tool_id: string` + - `"disabled"` - - `type: "code_execution_20250825"` + - `BetaThinkingConfigAdaptive object { type, display }` - - `"code_execution_20250825"` + - `type: "adaptive"` - - `BetaServerToolCaller20260120 object { tool_id, type }` + - `"adaptive"` - - `tool_id: string` + - `display: optional "summarized" or "omitted" or null` - - `type: "code_execution_20260120"` + 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`. - - `"code_execution_20260120"` + - `"summarized"` -### Beta Signature Delta + - `"omitted"` -- `BetaSignatureDelta object { signature, type }` +### Beta Thinking Delta - - `signature: string` +- `BetaThinkingDelta object { estimated_tokens, thinking, type }` - 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. + - `estimated_tokens: number or null` - - `type: "signature_delta"` + 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. - - `"signature_delta"` + - `thinking: string` -### Beta Skill + 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. -- `BetaSkill object { skill_id, type, version }` + - `type: "thinking_delta"` - A skill that was loaded in a container (response model). + - `"thinking_delta"` - - `skill_id: string` +### Beta Thinking Turns - Skill ID +- `BetaThinkingTurns object { type, value }` - - `type: "anthropic" or "custom"` + - `type: "thinking_turns"` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + - `"thinking_turns"` - - `"anthropic"` + - `value: number` - - `"custom"` +### Beta Token Task Budget - - `version: string` +- `BetaTokenTaskBudget object { total, type, remaining }` - Skill version or 'latest' for most recent version + User-configurable total token budget across contexts. -### Beta Skill Params + - `total: number` -- `BetaSkillParams object { skill_id, type, version }` + Total token budget across all contexts in the session. - Specification for a skill to be loaded in a container (request model). + - `type: "tokens"` - - `skill_id: string` + The budget type. Currently only 'tokens' is supported. - Skill ID + - `"tokens"` - - `type: "anthropic" or "custom"` + - `remaining: optional number or null` - Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. - - `"anthropic"` +### Beta Tool - - `"custom"` +- `BetaTool object { input_schema, name, allowed_callers, 7 more }` - - `version: optional string` + - `input_schema: object { type, properties, required }` - Skill version or 'latest' for most recent version + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. -### Beta Stop Reason + This defines the shape of the `input` that your tool accepts and that the model will produce. -- `BetaStopReason = "end_turn" or "max_tokens" or "stop_sequence" or 5 more` + - `type: "object"` - - `"end_turn"` + - `"object"` - - `"max_tokens"` + - `properties: optional map[unknown] or null` - - `"stop_sequence"` + - `required: optional array of string or null` - - `"tool_use"` + - `name: string` - - `"pause_turn"` + Name of the tool. - - `"compaction"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"refusal"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"model_context_window_exceeded"` + - `"direct"` -### Beta Text Block + - `"code_execution_20250825"` -- `BetaTextBlock object { citations, text, type }` + - `"code_execution_20260120"` - - `citations: array of BetaTextCitation or null` + - `"code_execution_20260521"` - Citations supporting the text block. + - `cache_control: optional BetaCacheControlEphemeral or null` - 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`. + Create a cache control breakpoint at this content block. - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "ephemeral"` - - `cited_text: string` + - `"ephemeral"` - - `document_index: number` + - `ttl: optional "5m" or "1h"` - - `document_title: string or null` + The time-to-live for the cache control breakpoint. - - `end_char_index: number` + This may be one the following values: - - `file_id: string or null` + - `5m`: 5 minutes + - `1h`: 1 hour - - `start_char_index: number` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `type: "char_location"` + - `"5m"` - - `"char_location"` + - `"1h"` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `defer_loading: optional boolean` - - `cited_text: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `document_index: number` + - `description: optional string` - - `document_title: string or null` + Description of what this tool does. - - `end_page_number: number` + 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. - - `file_id: string or null` + - `eager_input_streaming: optional boolean or null` - - `start_page_number: number` + 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. - - `type: "page_location"` + - `input_examples: optional array of map[unknown]` - - `"page_location"` + - `strict: optional boolean` - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + When true, guarantees schema validation on tool names and inputs - - `cited_text: string` + - `type: optional "custom" or null` - The full text of the cited block range, concatenated. + - `"custom"` - 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. +### Beta Tool Bash 20241022 - - `document_index: number` +- `BetaToolBash20241022 object { name, type, allowed_callers, 4 more }` - - `document_title: string or null` + - `name: "bash"` - - `end_block_index: number` + Name of the tool. - Exclusive 0-based end index of the cited block range in the source's `content` array. + This is how the tool will be called by the model and in `tool_use` blocks. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"bash"` - - `file_id: string or null` + - `type: "bash_20241022"` - - `start_block_index: number` + - `"bash_20241022"` - 0-based index of the first cited block in the source's `content` array. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "content_block_location"` + - `"direct"` - - `"content_block_location"` + - `"code_execution_20250825"` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"code_execution_20260120"` - - `cited_text: string` + - `"code_execution_20260521"` - - `encrypted_index: string` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `title: string or null` + Create a cache control breakpoint at this content block. - - `type: "web_search_result_location"` + - `type: "ephemeral"` - - `"web_search_result_location"` + - `"ephemeral"` - - `url: string` + - `ttl: optional "5m" or "1h"` - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + The time-to-live for the cache control breakpoint. - - `cited_text: string` + This may be one the following values: - The full text of the cited block range, concatenated. + - `5m`: 5 minutes + - `1h`: 1 hour - 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. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `end_block_index: number` + - `"5m"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"1h"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `defer_loading: optional boolean` - - `search_result_index: number` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - 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. + - `input_examples: optional array of map[unknown]` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `strict: optional boolean` - - `source: string` + When true, guarantees schema validation on tool names and inputs - - `start_block_index: number` +### Beta Tool Bash 20250124 - 0-based index of the first cited block in the source's `content` array. +- `BetaToolBash20250124 object { name, type, allowed_callers, 4 more }` - - `title: string or null` + - `name: "bash"` - - `type: "search_result_location"` + Name of the tool. - - `"search_result_location"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `text: string` + - `"bash"` - - `type: "text"` + - `type: "bash_20250124"` - - `"text"` + - `"bash_20250124"` -### Beta Text Block Param + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -- `BetaTextBlockParam object { text, type, cache_control, citations }` + - `"direct"` - - `text: string` + - `"code_execution_20250825"` - - `type: "text"` + - `"code_execution_20260120"` - - `"text"` + - `"code_execution_20260521"` - `cache_control: optional BetaCacheControlEphemeral or null` @@ -25151,879 +30058,922 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `citations: optional array of BetaTextCitationParam or null` + - `defer_loading: optional boolean` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `cited_text: string` + - `input_examples: optional array of map[unknown]` - - `document_index: number` + - `strict: optional boolean` - - `document_title: string or null` + When true, guarantees schema validation on tool names and inputs - - `end_char_index: number` +### Beta Tool Change MCP Tool Reference - - `start_char_index: number` +- `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `type: "char_location"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `"char_location"` + - `name: string` - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `server_name: string` - - `cited_text: string` + - `type: "mcp_tool_reference"` - - `document_index: number` + - `"mcp_tool_reference"` - - `document_title: string or null` +### Beta Tool Change MCP Toolset Reference - - `end_page_number: number` +- `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `start_page_number: number` + Reference to every tool in the named MCP server's toolset. - - `type: "page_location"` + - `server_name: string` - - `"page_location"` + - `type: "mcp_toolset_reference"` - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"mcp_toolset_reference"` - - `cited_text: string` +### Beta Tool Change Tool Reference - The full text of the cited block range, concatenated. +- `BetaToolChangeToolReference object { name, type }` - 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. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `document_index: number` + - `name: string` - - `document_title: string or null` + - `type: "tool_reference"` - - `end_block_index: number` + - `"tool_reference"` - Exclusive 0-based end index of the cited block range in the source's `content` array. +### Beta Tool Choice - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. +- `BetaToolChoice = BetaToolChoiceAuto or BetaToolChoiceAny or BetaToolChoiceTool or BetaToolChoiceNone` - - `start_block_index: number` + 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. - 0-based index of the first cited block in the source's `content` array. + - `BetaToolChoiceAuto object { type, disable_parallel_tool_use }` - - `type: "content_block_location"` + The model will automatically decide whether to use tools. - - `"content_block_location"` + - `type: "auto"` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"auto"` - - `cited_text: string` + - `disable_parallel_tool_use: optional boolean` - - `encrypted_index: string` + Whether to disable parallel tool use. - - `title: string or null` + Defaults to `false`. If set to `true`, the model will output at most one tool use. - - `type: "web_search_result_location"` + - `BetaToolChoiceAny object { type, disable_parallel_tool_use }` - - `"web_search_result_location"` + The model will use any available tools. - - `url: string` + - `type: "any"` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `"any"` - - `cited_text: string` + - `disable_parallel_tool_use: optional boolean` - The full text of the cited block range, concatenated. + Whether to disable parallel tool use. - 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. + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `end_block_index: number` + - `BetaToolChoiceTool object { name, type, disable_parallel_tool_use }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + The model will use the specified tool with `tool_choice.name`. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `name: string` - - `search_result_index: number` + The name of the tool to use. - 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. + - `type: "tool"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"tool"` - - `source: string` + - `disable_parallel_tool_use: optional boolean` - - `start_block_index: number` + Whether to disable parallel tool use. - 0-based index of the first cited block in the source's `content` array. + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `title: string or null` + - `BetaToolChoiceNone object { type }` - - `type: "search_result_location"` + The model will not be allowed to use tools. - - `"search_result_location"` + - `type: "none"` -### Beta Text Citation + - `"none"` -- `BetaTextCitation = BetaCitationCharLocation or BetaCitationPageLocation or BetaCitationContentBlockLocation or 2 more` +### Beta Tool Choice Any - - `BetaCitationCharLocation object { cited_text, document_index, document_title, 4 more }` +- `BetaToolChoiceAny object { type, disable_parallel_tool_use }` - - `cited_text: string` + The model will use any available tools. - - `document_index: number` + - `type: "any"` - - `document_title: string or null` + - `"any"` - - `end_char_index: number` + - `disable_parallel_tool_use: optional boolean` - - `file_id: string or null` + Whether to disable parallel tool use. - - `start_char_index: number` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `type: "char_location"` +### Beta Tool Choice Auto - - `"char_location"` +- `BetaToolChoiceAuto object { type, disable_parallel_tool_use }` - - `BetaCitationPageLocation object { cited_text, document_index, document_title, 4 more }` + The model will automatically decide whether to use tools. - - `cited_text: string` + - `type: "auto"` - - `document_index: number` + - `"auto"` - - `document_title: string or null` + - `disable_parallel_tool_use: optional boolean` - - `end_page_number: number` + Whether to disable parallel tool use. - - `file_id: string or null` + Defaults to `false`. If set to `true`, the model will output at most one tool use. - - `start_page_number: number` +### Beta Tool Choice None - - `type: "page_location"` +- `BetaToolChoiceNone object { type }` - - `"page_location"` + The model will not be allowed to use tools. - - `BetaCitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "none"` - - `cited_text: string` + - `"none"` - The full text of the cited block range, concatenated. +### Beta Tool Choice Tool - 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. +- `BetaToolChoiceTool object { name, type, disable_parallel_tool_use }` - - `document_index: number` + The model will use the specified tool with `tool_choice.name`. - - `document_title: string or null` + - `name: string` - - `end_block_index: number` + The name of the tool to use. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "tool"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"tool"` - - `file_id: string or null` + - `disable_parallel_tool_use: optional boolean` - - `start_block_index: number` + Whether to disable parallel tool use. - 0-based index of the first cited block in the source's `content` array. + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `type: "content_block_location"` +### Beta Tool Computer Use 20241022 - - `"content_block_location"` +- `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - - `BetaCitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `display_height_px: number` - - `cited_text: string` + The height of the display in pixels. - - `encrypted_index: string` + - `display_width_px: number` - - `title: string or null` + The width of the display in pixels. - - `type: "web_search_result_location"` + - `name: "computer"` - - `"web_search_result_location"` + Name of the tool. - - `url: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `BetaCitationSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `"computer"` - - `cited_text: string` + - `type: "computer_20241022"` - The full text of the cited block range, concatenated. + - `"computer_20241022"` - 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. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `end_block_index: number` + - `"direct"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"code_execution_20250825"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"code_execution_20260120"` - - `search_result_index: number` + - `"code_execution_20260521"` - 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. + - `cache_control: optional BetaCacheControlEphemeral or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + Create a cache control breakpoint at this content block. - - `source: string` + - `type: "ephemeral"` - - `start_block_index: number` + - `"ephemeral"` - 0-based index of the first cited block in the source's `content` array. + - `ttl: optional "5m" or "1h"` - - `title: string or null` + The time-to-live for the cache control breakpoint. - - `type: "search_result_location"` + This may be one the following values: - - `"search_result_location"` + - `5m`: 5 minutes + - `1h`: 1 hour -### Beta Text Citation Param + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. -- `BetaTextCitationParam = BetaCitationCharLocationParam or BetaCitationPageLocationParam or BetaCitationContentBlockLocationParam or 2 more` + - `"5m"` - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"1h"` - - `cited_text: string` + - `defer_loading: optional boolean` - - `document_index: number` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `document_title: string or null` + - `display_number: optional number or null` - - `end_char_index: number` + The X11 display number (e.g. 0, 1) for the display. - - `start_char_index: number` + - `input_examples: optional array of map[unknown]` - - `type: "char_location"` + - `strict: optional boolean` - - `"char_location"` + When true, guarantees schema validation on tool names and inputs - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` +### Beta Tool Computer Use 20250124 - - `cited_text: string` +- `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` - - `document_index: number` + - `display_height_px: number` - - `document_title: string or null` + The height of the display in pixels. - - `end_page_number: number` + - `display_width_px: number` - - `start_page_number: number` + The width of the display in pixels. - - `type: "page_location"` + - `name: "computer"` - - `"page_location"` + Name of the tool. - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `cited_text: string` + - `"computer"` - The full text of the cited block range, concatenated. + - `type: "computer_20250124"` - 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. + - `"computer_20250124"` - - `document_index: number` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `document_title: string or null` + - `"direct"` - - `end_block_index: number` + - `"code_execution_20250825"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"code_execution_20260120"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"code_execution_20260521"` - - `start_block_index: number` + - `cache_control: optional BetaCacheControlEphemeral or null` - 0-based index of the first cited block in the source's `content` array. + Create a cache control breakpoint at this content block. - - `type: "content_block_location"` + - `type: "ephemeral"` - - `"content_block_location"` + - `"ephemeral"` - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `ttl: optional "5m" or "1h"` - - `cited_text: string` + The time-to-live for the cache control breakpoint. - - `encrypted_index: string` + This may be one the following values: - - `title: string or null` + - `5m`: 5 minutes + - `1h`: 1 hour - - `type: "web_search_result_location"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"web_search_result_location"` + - `"5m"` - - `url: string` + - `"1h"` - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `defer_loading: optional boolean` - - `cited_text: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - The full text of the cited block range, concatenated. + - `display_number: optional number or null` - 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. + The X11 display number (e.g. 0, 1) for the display. - - `end_block_index: number` + - `input_examples: optional array of map[unknown]` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `strict: optional boolean` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + When true, guarantees schema validation on tool names and inputs - - `search_result_index: number` +### Beta Tool Computer Use 20251124 - 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. +- `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `display_height_px: number` - - `source: string` + The height of the display in pixels. - - `start_block_index: number` + - `display_width_px: number` - 0-based index of the first cited block in the source's `content` array. + The width of the display in pixels. - - `title: string or null` + - `name: "computer"` - - `type: "search_result_location"` + Name of the tool. - - `"search_result_location"` + This is how the tool will be called by the model and in `tool_use` blocks. -### Beta Text Delta + - `"computer"` -- `BetaTextDelta object { text, type }` + - `type: "computer_20251124"` - - `text: string` + - `"computer_20251124"` - - `type: "text_delta"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"text_delta"` + - `"direct"` -### Beta Text Editor Code Execution Create Result Block + - `"code_execution_20250825"` -- `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `"code_execution_20260120"` - - `is_file_update: boolean` + - `"code_execution_20260521"` - - `type: "text_editor_code_execution_create_result"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"text_editor_code_execution_create_result"` + Create a cache control breakpoint at this content block. -### Beta Text Editor Code Execution Create Result Block Param + - `type: "ephemeral"` -- `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `"ephemeral"` - - `is_file_update: boolean` + - `ttl: optional "5m" or "1h"` - - `type: "text_editor_code_execution_create_result"` + The time-to-live for the cache control breakpoint. - - `"text_editor_code_execution_create_result"` + This may be one the following values: -### Beta Text Editor Code Execution Str Replace Result Block + - `5m`: 5 minutes + - `1h`: 1 hour -- `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `lines: array of string or null` + - `"5m"` - - `new_lines: number or null` + - `"1h"` - - `new_start: number or null` + - `defer_loading: optional boolean` - - `old_lines: number or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `old_start: number or null` + - `display_number: optional number or null` - - `type: "text_editor_code_execution_str_replace_result"` + The X11 display number (e.g. 0, 1) for the display. - - `"text_editor_code_execution_str_replace_result"` + - `enable_zoom: optional boolean` -### Beta Text Editor Code Execution Str Replace Result Block Param + Whether to enable an action to take a zoomed-in screenshot of the screen. -- `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `input_examples: optional array of map[unknown]` - - `type: "text_editor_code_execution_str_replace_result"` + - `strict: optional boolean` - - `"text_editor_code_execution_str_replace_result"` + When true, guarantees schema validation on tool names and inputs - - `lines: optional array of string or null` +### Beta Tool Reference Block - - `new_lines: optional number or null` +- `BetaToolReferenceBlock object { tool_name, type }` - - `new_start: optional number or null` + - `tool_name: string` - - `old_lines: optional number or null` + - `type: "tool_reference"` - - `old_start: optional number or null` + - `"tool_reference"` -### Beta Text Editor Code Execution Tool Result Block +### Beta Tool Reference Block Param -- `BetaTextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` +- `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` - - `content: BetaTextEditorCodeExecutionToolResultError or BetaTextEditorCodeExecutionViewResultBlock or BetaTextEditorCodeExecutionCreateResultBlock or BetaTextEditorCodeExecutionStrReplaceResultBlock` + Tool reference block that can be included in tool_result content. - - `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `tool_name: string` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `type: "tool_reference"` - - `"invalid_tool_input"` + - `"tool_reference"` - - `"unavailable"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"too_many_requests"` + Create a cache control breakpoint at this content block. - - `"execution_time_exceeded"` + - `type: "ephemeral"` - - `"file_not_found"` + - `"ephemeral"` - - `error_message: string or null` + - `ttl: optional "5m" or "1h"` - - `type: "text_editor_code_execution_tool_result_error"` + The time-to-live for the cache control breakpoint. - - `"text_editor_code_execution_tool_result_error"` + This may be one the following values: - - `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `content: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `file_type: "text" or "image" or "pdf"` + - `"5m"` - - `"text"` + - `"1h"` - - `"image"` +### Beta Tool Result Block Param - - `"pdf"` +- `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `num_lines: number or null` + - `tool_use_id: string` - - `start_line: number or null` + - `type: "tool_result"` - - `total_lines: number or null` + - `"tool_result"` - - `type: "text_editor_code_execution_view_result"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"text_editor_code_execution_view_result"` + Create a cache control breakpoint at this content block. - - `BetaTextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `type: "ephemeral"` - - `is_file_update: boolean` + - `"ephemeral"` - - `type: "text_editor_code_execution_create_result"` + - `ttl: optional "5m" or "1h"` - - `"text_editor_code_execution_create_result"` + The time-to-live for the cache control breakpoint. - - `BetaTextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + This may be one the following values: - - `lines: array of string or null` + - `5m`: 5 minutes + - `1h`: 1 hour - - `new_lines: number or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `new_start: number or null` + - `"5m"` - - `old_lines: number or null` + - `"1h"` - - `old_start: number or null` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - - `type: "text_editor_code_execution_str_replace_result"` + - `string` - - `"text_editor_code_execution_str_replace_result"` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - - `tool_use_id: string` + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `type: "text_editor_code_execution_tool_result"` + - `text: string` + + - `type: "text"` + + - `"text"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional array of BetaTextCitationParam or null` + + - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` - - `"text_editor_code_execution_tool_result"` + - `document_title: string or null` -### Beta Text Editor Code Execution Tool Result Block Param + - `end_char_index: number` -- `BetaTextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `start_char_index: number` - - `content: BetaTextEditorCodeExecutionToolResultErrorParam or BetaTextEditorCodeExecutionViewResultBlockParam or BetaTextEditorCodeExecutionCreateResultBlockParam or BetaTextEditorCodeExecutionStrReplaceResultBlockParam` + - `type: "char_location"` - - `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `"char_location"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"invalid_tool_input"` + - `cited_text: string` - - `"unavailable"` + - `document_index: number` - - `"too_many_requests"` + - `document_title: string or null` - - `"execution_time_exceeded"` + - `end_page_number: number` - - `"file_not_found"` + - `start_page_number: number` - - `type: "text_editor_code_execution_tool_result_error"` + - `type: "page_location"` - - `"text_editor_code_execution_tool_result_error"` + - `"page_location"` - - `error_message: optional string or null` + - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `cited_text: string` - - `content: string` + The full text of the cited block range, concatenated. - - `file_type: "text" or "image" or "pdf"` + 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. - - `"text"` + - `document_index: number` - - `"image"` + - `document_title: string or null` - - `"pdf"` + - `end_block_index: number` - - `type: "text_editor_code_execution_view_result"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"text_editor_code_execution_view_result"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `num_lines: optional number or null` + - `start_block_index: number` - - `start_line: optional number or null` + 0-based index of the first cited block in the source's `content` array. - - `total_lines: optional number or null` + - `type: "content_block_location"` - - `BetaTextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `"content_block_location"` - - `is_file_update: boolean` + - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `type: "text_editor_code_execution_create_result"` + - `cited_text: string` - - `"text_editor_code_execution_create_result"` + - `encrypted_index: string` - - `BetaTextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `title: string or null` - - `type: "text_editor_code_execution_str_replace_result"` + - `type: "web_search_result_location"` - - `"text_editor_code_execution_str_replace_result"` + - `"web_search_result_location"` - - `lines: optional array of string or null` + - `url: string` - - `new_lines: optional number or null` + - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `new_start: optional number or null` + - `cited_text: string` - - `old_lines: optional number or null` + The full text of the cited block range, concatenated. - - `old_start: optional number or null` + 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. - - `tool_use_id: string` + - `end_block_index: number` - - `type: "text_editor_code_execution_tool_result"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"text_editor_code_execution_tool_result"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `search_result_index: number` - Create a cache control breakpoint at this content block. + 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. - - `type: "ephemeral"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"ephemeral"` + - `source: string` - - `ttl: optional "5m" or "1h"` + - `start_block_index: number` - The time-to-live for the cache control breakpoint. + 0-based index of the first cited block in the source's `content` array. - This may be one the following values: + - `title: string or null` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "search_result_location"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"search_result_location"` - - `"5m"` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - - `"1h"` + - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` -### Beta Text Editor Code Execution Tool Result Error + - `BetaBase64ImageSource object { data, media_type, type }` -- `BetaTextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `data: string` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"invalid_tool_input"` + - `"image/jpeg"` - - `"unavailable"` + - `"image/png"` - - `"too_many_requests"` + - `"image/gif"` - - `"execution_time_exceeded"` + - `"image/webp"` - - `"file_not_found"` + - `type: "base64"` - - `error_message: string or null` + - `"base64"` - - `type: "text_editor_code_execution_tool_result_error"` + - `BetaURLImageSource object { type, url }` - - `"text_editor_code_execution_tool_result_error"` + - `type: "url"` -### Beta Text Editor Code Execution Tool Result Error Param + - `"url"` -- `BetaTextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `url: string` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `BetaFileImageSource object { file_id, type }` - - `"invalid_tool_input"` + - `file_id: string` - - `"unavailable"` + - `type: "file"` - - `"too_many_requests"` + - `"file"` - - `"execution_time_exceeded"` + - `type: "image"` - - `"file_not_found"` + - `"image"` - - `type: "text_editor_code_execution_tool_result_error"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"text_editor_code_execution_tool_result_error"` + Create a cache control breakpoint at this content block. - - `error_message: optional string or null` + - `transformations: optional BetaImageTransformationsParam or null` -### Beta Text Editor Code Execution View Result Block + 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. -- `BetaTextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `oversized_image: optional "downsize" or "error"` - - `content: string` + 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. - - `file_type: "text" or "image" or "pdf"` + - `"downsize"` - - `"text"` + - `"error"` - - `"image"` + - `BetaSearchResultBlockParam object { content, source, title, 3 more }` - - `"pdf"` + - `content: array of BetaTextBlockParam` - - `num_lines: number or null` + - `text: string` - - `start_line: number or null` + - `type: "text"` - - `total_lines: number or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "text_editor_code_execution_view_result"` + Create a cache control breakpoint at this content block. - - `"text_editor_code_execution_view_result"` + - `citations: optional array of BetaTextCitationParam or null` -### Beta Text Editor Code Execution View Result Block Param + - `source: string` -- `BetaTextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `title: string` - - `content: string` + - `type: "search_result"` - - `file_type: "text" or "image" or "pdf"` + - `"search_result"` - - `"text"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"image"` + Create a cache control breakpoint at this content block. - - `"pdf"` + - `citations: optional BetaCitationsConfigParam` - - `type: "text_editor_code_execution_view_result"` + - `enabled: optional boolean` - - `"text_editor_code_execution_view_result"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - - `num_lines: optional number or null` + - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` - - `start_line: optional number or null` + - `BetaBase64PDFSource object { data, media_type, type }` - - `total_lines: optional number or null` + - `data: string` -### Beta Thinking Block + - `media_type: "application/pdf"` -- `BetaThinkingBlock object { signature, thinking, type }` + - `"application/pdf"` - - `signature: string` + - `type: "base64"` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `"base64"` - 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. + - `BetaPlainTextSource object { data, media_type, type }` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `data: string` - - `thinking: string` + - `media_type: "text/plain"` - The text of Claude's thinking process for this block. + - `"text/plain"` - - `type: "thinking"` + - `type: "text"` - - `"thinking"` + - `"text"` -### Beta Thinking Block Param + - `BetaContentBlockSource object { content, type }` -- `BetaThinkingBlockParam object { signature, thinking, type }` + - `content: string or array of BetaContentBlockSourceContent` - - `signature: string` + - `string` - 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. + - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `thinking: string` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - The `thinking` text of this block as returned by the API. + - `type: "content"` - - `type: "thinking"` + - `"content"` - - `"thinking"` + - `BetaURLPDFSource object { type, url }` -### Beta Thinking Config Adaptive + - `type: "url"` -- `BetaThinkingConfigAdaptive object { type, display }` + - `"url"` - - `type: "adaptive"` + - `url: string` - - `"adaptive"` + - `BetaFileDocumentSource object { file_id, type }` - - `display: optional "summarized" or "omitted" or null` + - `file_id: string` - 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`. + - `type: "file"` - - `"summarized"` + - `"file"` - - `"omitted"` + - `type: "document"` -### Beta Thinking Config Disabled + - `"document"` -- `BetaThinkingConfigDisabled object { type }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `type: "disabled"` + Create a cache control breakpoint at this content block. - - `"disabled"` + - `citations: optional BetaCitationsConfigParam or null` -### Beta Thinking Config Enabled + - `context: optional string or null` -- `BetaThinkingConfigEnabled object { budget_tokens, type, display }` + - `title: optional string or null` - - `budget_tokens: number` + - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` - 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. + Tool reference block that can be included in tool_result content. - Must be ≥1024 and less than `max_tokens`. + - `tool_name: string` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `type: "tool_reference"` - - `type: "enabled"` + - `"tool_reference"` - - `"enabled"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `display: optional "summarized" or "omitted" or null` + Create a cache control breakpoint at this content block. - 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`. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `"summarized"` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - - `"omitted"` + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. -### Beta Thinking Config Param + - `tabs: array of BetaBrowserStateTabEntry` -- `BetaThinkingConfigParam = BetaThinkingConfigEnabled or BetaThinkingConfigDisabled or BetaThinkingConfigAdaptive` + 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`. - Configuration for enabling Claude's extended thinking. + - `tab_id: string` - 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. + The caller-assigned identifier for this tab, unique within the inventory. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `title: string` - - `BetaThinkingConfigEnabled object { budget_tokens, type, display }` + The title of the page the tab is showing. May be empty. - - `budget_tokens: number` + - `url: string` - 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. + The URL of the page the tab is showing. May be empty. - Must be ≥1024 and less than `max_tokens`. + - `active: optional boolean` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `type: "enabled"` + - `type: "browser_state"` - - `"enabled"` + - `"browser_state"` - - `display: optional "summarized" or "omitted" or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - 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`. + Create a cache control breakpoint at this content block. - - `"summarized"` + - `state_changes: optional array of BetaBrowserStateChange or null` - - `"omitted"` + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `BetaThinkingConfigDisabled object { type }` + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` - - `type: "disabled"` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `"disabled"` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `BetaThinkingConfigAdaptive object { type, display }` + - `tab_id: string` - - `type: "adaptive"` + The `tab_id` of the opened tab, present in `tabs`. - - `"adaptive"` + - `type: "tab_opened"` - - `display: optional "summarized" or "omitted" or null` + - `"tab_opened"` - 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`. + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` - - `"summarized"` + A file download that started during this call. - - `"omitted"` + - `download_id: string` -### Beta Thinking Delta + The caller-assigned identifier for this download, stable across the state changes reporting it. -- `BetaThinkingDelta object { estimated_tokens, thinking, type }` + - `type: "download_started"` - - `estimated_tokens: number or null` + - `"download_started"` - 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. + - `url: string` - - `thinking: string` + The final post-redirect URL the download was served from. - 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. + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `type: "thinking_delta"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - - `"thinking_delta"` + - `download_id: string` -### Beta Thinking Turns + The caller-assigned identifier for this download, stable across the state changes reporting it. -- `BetaThinkingTurns object { type, value }` + - `type: "download_completed"` - - `type: "thinking_turns"` + - `"download_completed"` - - `"thinking_turns"` + - `url: string` - - `value: number` + The final post-redirect URL the download was served from. -### Beta Token Task Budget + - `path: optional string or null` -- `BetaTokenTaskBudget object { total, type, remaining }` + 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. - User-configurable total token budget across contexts. + - `size_bytes: optional number or null` - - `total: number` + The completed download's size. - Total token budget across all contexts in the session. + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `type: "tokens"` + A file download that failed — or was cancelled — during this call. - The budget type. Currently only 'tokens' is supported. + - `download_id: string` - - `"tokens"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `remaining: optional number or null` + - `type: "download_failed"` - Remaining tokens in the budget. Use this to track usage across contexts when implementing compaction client-side. Defaults to total if not provided. + - `"download_failed"` -### Beta Tool + - `url: string` -- `BetaTool object { input_schema, name, allowed_callers, 7 more }` + The final post-redirect URL the download was served from. - - `input_schema: object { type, properties, required }` + - `error: optional string or null` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + The failure or cancellation detail, when known. - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `is_error: optional boolean` - - `type: "object"` + - `toolset_name: optional string or null` - - `"object"` + For a toolset member tool_result, the toolset family of the paired tool_use. - - `properties: optional map[unknown] or null` +### Beta Tool Search Tool Bm25 20251119 - - `required: optional array of string or null` +- `BetaToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` - - `name: string` + - `name: "tool_search_tool_bm25"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. + - `"tool_search_tool_bm25"` + + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + + - `"tool_search_tool_bm25_20251119"` + + - `"tool_search_tool_bm25"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - `"direct"` @@ -26061,41 +31011,27 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `description: optional string` - - Description of what this tool does. - - 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. - - - `eager_input_streaming: optional boolean or null` - - 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. - - - `input_examples: optional array of map[unknown]` - - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs - - `type: optional "custom" or null` - - - `"custom"` - -### Beta Tool Bash 20241022 +### Beta Tool Search Tool Regex 20251119 -- `BetaToolBash20241022 object { name, type, allowed_callers, 4 more }` +- `BetaToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` - - `name: "bash"` + - `name: "tool_search_tool_regex"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"bash"` + - `"tool_search_tool_regex"` - - `type: "bash_20241022"` + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` - - `"bash_20241022"` + - `"tool_search_tool_regex_20251119"` + + - `"tool_search_tool_regex"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -26134,258 +31070,235 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `input_examples: optional array of map[unknown]` - - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs -### Beta Tool Bash 20250124 - -- `BetaToolBash20250124 object { name, type, allowed_callers, 4 more }` - - - `name: "bash"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. - - - `"bash"` - - - `type: "bash_20250124"` - - - `"bash_20250124"` - - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - - `"direct"` +### Beta Tool Search Tool Result Block - - `"code_execution_20250825"` +- `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` - - `"code_execution_20260120"` + - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` - - `"code_execution_20260521"` + - `BetaToolSearchToolResultError object { error_code, error_message, type }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - Create a cache control breakpoint at this content block. + - `"invalid_tool_input"` - - `type: "ephemeral"` + - `"unavailable"` - - `"ephemeral"` + - `"too_many_requests"` - - `ttl: optional "5m" or "1h"` + - `"execution_time_exceeded"` - The time-to-live for the cache control breakpoint. + - `error_message: string or null` - This may be one the following values: + - `type: "tool_search_tool_result_error"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"tool_search_tool_result_error"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` - - `"5m"` + - `tool_references: array of BetaToolReferenceBlock` - - `"1h"` + - `tool_name: string` - - `defer_loading: optional boolean` + - `type: "tool_reference"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"tool_reference"` - - `input_examples: optional array of map[unknown]` + - `type: "tool_search_tool_search_result"` - - `strict: optional boolean` + - `"tool_search_tool_search_result"` - When true, guarantees schema validation on tool names and inputs + - `tool_use_id: string` -### Beta Tool Change MCP Tool Reference + - `type: "tool_search_tool_result"` -- `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `"tool_search_tool_result"` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. +### Beta Tool Search Tool Result Block Param - - `name: string` +- `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `server_name: string` + - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` - - `type: "mcp_tool_reference"` + - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` - - `"mcp_tool_reference"` + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` -### Beta Tool Change MCP Toolset Reference + - `"invalid_tool_input"` -- `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `"unavailable"` - Reference to every tool in the named MCP server's toolset. + - `"too_many_requests"` - - `server_name: string` + - `"execution_time_exceeded"` - - `type: "mcp_toolset_reference"` + - `type: "tool_search_tool_result_error"` - - `"mcp_toolset_reference"` + - `"tool_search_tool_result_error"` -### Beta Tool Change Tool Reference + - `error_message: optional string or null` -- `BetaToolChangeToolReference object { name, type }` + - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `tool_references: array of BetaToolReferenceBlockParam` - - `name: string` + - `tool_name: string` - - `type: "tool_reference"` + - `type: "tool_reference"` - - `"tool_reference"` + - `"tool_reference"` -### Beta Tool Choice + - `cache_control: optional BetaCacheControlEphemeral or null` -- `BetaToolChoice = BetaToolChoiceAuto or BetaToolChoiceAny or BetaToolChoiceTool or BetaToolChoiceNone` + Create a cache control breakpoint at this content block. - 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. + - `type: "ephemeral"` - - `BetaToolChoiceAuto object { type, disable_parallel_tool_use }` + - `"ephemeral"` - The model will automatically decide whether to use tools. + - `ttl: optional "5m" or "1h"` - - `type: "auto"` + The time-to-live for the cache control breakpoint. - - `"auto"` + This may be one the following values: - - `disable_parallel_tool_use: optional boolean` + - `5m`: 5 minutes + - `1h`: 1 hour - Whether to disable parallel tool use. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `"5m"` - - `BetaToolChoiceAny object { type, disable_parallel_tool_use }` + - `"1h"` - The model will use any available tools. + - `type: "tool_search_tool_search_result"` - - `type: "any"` + - `"tool_search_tool_search_result"` - - `"any"` + - `tool_use_id: string` - - `disable_parallel_tool_use: optional boolean` + - `type: "tool_search_tool_result"` - Whether to disable parallel tool use. + - `"tool_search_tool_result"` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `BetaToolChoiceTool object { name, type, disable_parallel_tool_use }` + Create a cache control breakpoint at this content block. - The model will use the specified tool with `tool_choice.name`. +### Beta Tool Search Tool Result Error - - `name: string` +- `BetaToolSearchToolResultError object { error_code, error_message, type }` - The name of the tool to use. + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `type: "tool"` + - `"invalid_tool_input"` - - `"tool"` + - `"unavailable"` - - `disable_parallel_tool_use: optional boolean` + - `"too_many_requests"` - Whether to disable parallel tool use. + - `"execution_time_exceeded"` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `error_message: string or null` - - `BetaToolChoiceNone object { type }` + - `type: "tool_search_tool_result_error"` - The model will not be allowed to use tools. + - `"tool_search_tool_result_error"` - - `type: "none"` +### Beta Tool Search Tool Result Error Param - - `"none"` +- `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` -### Beta Tool Choice Any + - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` -- `BetaToolChoiceAny object { type, disable_parallel_tool_use }` + - `"invalid_tool_input"` - The model will use any available tools. + - `"unavailable"` - - `type: "any"` + - `"too_many_requests"` - - `"any"` + - `"execution_time_exceeded"` - - `disable_parallel_tool_use: optional boolean` + - `type: "tool_search_tool_result_error"` - Whether to disable parallel tool use. + - `"tool_search_tool_result_error"` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `error_message: optional string or null` -### Beta Tool Choice Auto +### Beta Tool Search Tool Search Result Block -- `BetaToolChoiceAuto object { type, disable_parallel_tool_use }` +- `BetaToolSearchToolSearchResultBlock object { tool_references, type }` - The model will automatically decide whether to use tools. + - `tool_references: array of BetaToolReferenceBlock` - - `type: "auto"` + - `tool_name: string` - - `"auto"` + - `type: "tool_reference"` - - `disable_parallel_tool_use: optional boolean` + - `"tool_reference"` - Whether to disable parallel tool use. + - `type: "tool_search_tool_search_result"` - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `"tool_search_tool_search_result"` -### Beta Tool Choice None +### Beta Tool Search Tool Search Result Block Param -- `BetaToolChoiceNone object { type }` +- `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` - The model will not be allowed to use tools. + - `tool_references: array of BetaToolReferenceBlockParam` - - `type: "none"` + - `tool_name: string` - - `"none"` + - `type: "tool_reference"` -### Beta Tool Choice Tool + - `"tool_reference"` -- `BetaToolChoiceTool object { name, type, disable_parallel_tool_use }` + - `cache_control: optional BetaCacheControlEphemeral or null` - The model will use the specified tool with `tool_choice.name`. + Create a cache control breakpoint at this content block. - - `name: string` + - `type: "ephemeral"` - The name of the tool to use. + - `"ephemeral"` - - `type: "tool"` + - `ttl: optional "5m" or "1h"` - - `"tool"` + The time-to-live for the cache control breakpoint. - - `disable_parallel_tool_use: optional boolean` + This may be one the following values: - Whether to disable parallel tool use. + - `5m`: 5 minutes + - `1h`: 1 hour - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. -### Beta Tool Computer Use 20241022 + - `"5m"` -- `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` + - `"1h"` - - `display_height_px: number` + - `type: "tool_search_tool_search_result"` - The height of the display in pixels. + - `"tool_search_tool_search_result"` - - `display_width_px: number` +### Beta Tool Text Editor 20241022 - The width of the display in pixels. +- `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` - - `name: "computer"` + - `name: "str_replace_editor"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"computer"` + - `"str_replace_editor"` - - `type: "computer_20241022"` + - `type: "text_editor_20241022"` - - `"computer_20241022"` + - `"text_editor_20241022"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -26424,39 +31337,27 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `display_number: optional number or null` - - The X11 display number (e.g. 0, 1) for the display. - - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs -### Beta Tool Computer Use 20250124 - -- `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` - - - `display_height_px: number` - - The height of the display in pixels. - - - `display_width_px: number` +### Beta Tool Text Editor 20250124 - The width of the display in pixels. +- `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - - `name: "computer"` + - `name: "str_replace_editor"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"computer"` + - `"str_replace_editor"` - - `type: "computer_20250124"` + - `type: "text_editor_20250124"` - - `"computer_20250124"` + - `"text_editor_20250124"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -26495,39 +31396,27 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `display_number: optional number or null` - - The X11 display number (e.g. 0, 1) for the display. - - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs -### Beta Tool Computer Use 20251124 - -- `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` - - - `display_height_px: number` - - The height of the display in pixels. - - - `display_width_px: number` +### Beta Tool Text Editor 20250429 - The width of the display in pixels. +- `BetaToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` - - `name: "computer"` + - `name: "str_replace_based_edit_tool"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"computer"` + - `"str_replace_based_edit_tool"` - - `type: "computer_20251124"` + - `type: "text_editor_20250429"` - - `"computer_20251124"` + - `"text_editor_20250429"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -26566,74 +31455,37 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `display_number: optional number or null` - - The X11 display number (e.g. 0, 1) for the display. - - - `enable_zoom: optional boolean` - - Whether to enable an action to take a zoomed-in screenshot of the screen. - - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs -### Beta Tool Reference Block - -- `BetaToolReferenceBlock object { tool_name, type }` - - - `tool_name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - -### Beta Tool Reference Block Param - -- `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` - - Tool reference block that can be included in tool_result content. - - - `tool_name: string` - - - `type: "tool_reference"` - - - `"tool_reference"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "ephemeral"` - - - `"ephemeral"` +### Beta Tool Text Editor 20250728 - - `ttl: optional "5m" or "1h"` +- `BetaToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` - The time-to-live for the cache control breakpoint. + - `name: "str_replace_based_edit_tool"` - This may be one the following values: + Name of the tool. - - `5m`: 5 minutes - - `1h`: 1 hour + This is how the tool will be called by the model and in `tool_use` blocks. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"str_replace_based_edit_tool"` - - `"5m"` + - `type: "text_editor_20250728"` - - `"1h"` + - `"text_editor_20250728"` -### Beta Tool Result Block Param + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -- `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `"direct"` - - `tool_use_id: string` + - `"code_execution_20250825"` - - `type: "tool_result"` + - `"code_execution_20260120"` - - `"tool_result"` + - `"code_execution_20260521"` - `cache_control: optional BetaCacheControlEphemeral or null` @@ -26658,892 +31510,757 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` - - - `string` - - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `text: string` - - - `type: "text"` - - - `"text"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of BetaTextCitationParam or null` - - - `BetaCitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - - `document_index: number` - - - `document_title: string or null` - - - `end_char_index: number` - - - `start_char_index: number` - - - `type: "char_location"` - - - `"char_location"` - - - `BetaCitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - - `document_index: number` - - - `document_title: string or null` - - - `end_page_number: number` - - - `start_page_number: number` - - - `type: "page_location"` - - - `"page_location"` - - - `BetaCitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - - `cited_text: string` - - The full text of the cited block range, concatenated. - - 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. - - - `document_index: number` - - - `document_title: string or null` - - - `end_block_index: number` - - Exclusive 0-based end index of the cited block range in the source's `content` array. - - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - - `start_block_index: number` - - 0-based index of the first cited block in the source's `content` array. - - - `type: "content_block_location"` - - - `"content_block_location"` - - - `BetaCitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - - `cited_text: string` - - - `encrypted_index: string` - - - `title: string or null` - - - `type: "web_search_result_location"` - - - `"web_search_result_location"` - - - `url: string` - - - `BetaCitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - - `cited_text: string` - - The full text of the cited block range, concatenated. - - 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. - - - `end_block_index: number` - - Exclusive 0-based end index of the cited block range in the source's `content` array. - - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - - `search_result_index: number` - - 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. - - Counted separately from `document_index`; server-side web search results are not included in this count. - - - `source: string` - - - `start_block_index: number` - - 0-based index of the first cited block in the source's `content` array. - - - `title: string or null` - - - `type: "search_result_location"` - - - `"search_result_location"` - - - `BetaImageBlockParam object { source, type, cache_control }` - - - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` - - - `BetaBase64ImageSource object { data, media_type, type }` - - - `data: string` - - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - - `"image/jpeg"` - - - `"image/png"` - - - `"image/gif"` - - - `"image/webp"` - - - `type: "base64"` + - `defer_loading: optional boolean` - - `"base64"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `BetaURLImageSource object { type, url }` + - `input_examples: optional array of map[unknown]` - - `type: "url"` + - `max_characters: optional number or null` - - `"url"` + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. - - `url: string` + - `strict: optional boolean` - - `BetaFileImageSource object { file_id, type }` + When true, guarantees schema validation on tool names and inputs - - `file_id: string` +### Beta Tool Union - - `type: "file"` +- `BetaToolUnion = BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` - - `"file"` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - `type: "image"` + - `BetaTool object { input_schema, name, allowed_callers, 7 more }` - - `"image"` + - `input_schema: object { type, properties, required }` - - `cache_control: optional BetaCacheControlEphemeral or null` + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. - Create a cache control breakpoint at this content block. + This defines the shape of the `input` that your tool accepts and that the model will produce. - - `BetaSearchResultBlockParam object { content, source, title, 3 more }` + - `type: "object"` - - `content: array of BetaTextBlockParam` + - `"object"` - - `text: string` + - `properties: optional map[unknown] or null` - - `type: "text"` + - `required: optional array of string or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `name: string` - Create a cache control breakpoint at this content block. + Name of the tool. - - `citations: optional array of BetaTextCitationParam or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `source: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `title: string` + - `"direct"` - - `type: "search_result"` + - `"code_execution_20250825"` - - `"search_result"` + - `"code_execution_20260120"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `"code_execution_20260521"` - Create a cache control breakpoint at this content block. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `citations: optional BetaCitationsConfigParam` + Create a cache control breakpoint at this content block. - - `enabled: optional boolean` + - `type: "ephemeral"` - - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` + - `"ephemeral"` - - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` + - `ttl: optional "5m" or "1h"` - - `BetaBase64PDFSource object { data, media_type, type }` + The time-to-live for the cache control breakpoint. - - `data: string` + This may be one the following values: - - `media_type: "application/pdf"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"application/pdf"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `type: "base64"` + - `"5m"` - - `"base64"` + - `"1h"` - - `BetaPlainTextSource object { data, media_type, type }` + - `defer_loading: optional boolean` - - `data: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `media_type: "text/plain"` + - `description: optional string` - - `"text/plain"` + Description of what this tool does. - - `type: "text"` + 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. - - `"text"` + - `eager_input_streaming: optional boolean or null` - - `BetaContentBlockSource object { content, type }` + 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. - - `content: string or array of BetaContentBlockSourceContent` + - `input_examples: optional array of map[unknown]` - - `string` + - `strict: optional boolean` - - `BetaContentBlockSourceContent = array of BetaContentBlockSourceContent` + When true, guarantees schema validation on tool names and inputs - - `BetaTextBlockParam object { text, type, cache_control, citations }` + - `type: optional "custom" or null` - - `BetaImageBlockParam object { source, type, cache_control }` + - `"custom"` - - `type: "content"` + - `BetaToolBash20241022 object { name, type, allowed_callers, 4 more }` - - `"content"` + - `name: "bash"` - - `BetaURLPDFSource object { type, url }` + Name of the tool. - - `type: "url"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"url"` + - `"bash"` - - `url: string` + - `type: "bash_20241022"` - - `BetaFileDocumentSource object { file_id, type }` + - `"bash_20241022"` - - `file_id: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "file"` + - `"direct"` - - `"file"` + - `"code_execution_20250825"` - - `type: "document"` + - `"code_execution_20260120"` - - `"document"` + - `"code_execution_20260521"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - Create a cache control breakpoint at this content block. + Create a cache control breakpoint at this content block. - - `citations: optional BetaCitationsConfigParam or null` + - `defer_loading: optional boolean` - - `context: optional string or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `title: optional string or null` + - `input_examples: optional array of map[unknown]` - - `BetaToolReferenceBlockParam object { tool_name, type, cache_control }` + - `strict: optional boolean` - Tool reference block that can be included in tool_result content. + When true, guarantees schema validation on tool names and inputs - - `tool_name: string` + - `BetaToolBash20250124 object { name, type, allowed_callers, 4 more }` - - `type: "tool_reference"` + - `name: "bash"` - - `"tool_reference"` + Name of the tool. - - `cache_control: optional BetaCacheControlEphemeral or null` + This is how the tool will be called by the model and in `tool_use` blocks. - Create a cache control breakpoint at this content block. + - `"bash"` - - `is_error: optional boolean` + - `type: "bash_20250124"` -### Beta Tool Search Tool Bm25 20251119 + - `"bash_20250124"` -- `BetaToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `name: "tool_search_tool_bm25"` + - `"direct"` - Name of the tool. + - `"code_execution_20250825"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"code_execution_20260120"` - - `"tool_search_tool_bm25"` + - `"code_execution_20260521"` - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"tool_search_tool_bm25_20251119"` + Create a cache control breakpoint at this content block. - - `"tool_search_tool_bm25"` + - `defer_loading: optional boolean` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"direct"` + - `input_examples: optional array of map[unknown]` - - `"code_execution_20250825"` + - `strict: optional boolean` - - `"code_execution_20260120"` + When true, guarantees schema validation on tool names and inputs - - `"code_execution_20260521"` + - `BetaCodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `name: "code_execution"` - Create a cache control breakpoint at this content block. + Name of the tool. - - `type: "ephemeral"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"ephemeral"` + - `"code_execution"` - - `ttl: optional "5m" or "1h"` + - `type: "code_execution_20250522"` - The time-to-live for the cache control breakpoint. + - `"code_execution_20250522"` - This may be one the following values: + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"direct"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"code_execution_20250825"` - - `"5m"` + - `"code_execution_20260120"` - - `"1h"` + - `"code_execution_20260521"` - - `defer_loading: optional boolean` + - `cache_control: optional BetaCacheControlEphemeral or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Create a cache control breakpoint at this content block. - - `strict: optional boolean` + - `defer_loading: optional boolean` - When true, guarantees schema validation on tool names and inputs + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. -### Beta Tool Search Tool Regex 20251119 + - `strict: optional boolean` -- `BetaToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + When true, guarantees schema validation on tool names and inputs - - `name: "tool_search_tool_regex"` + - `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - Name of the tool. + - `name: "code_execution"` - This is how the tool will be called by the model and in `tool_use` blocks. + Name of the tool. - - `"tool_search_tool_regex"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + - `"code_execution"` - - `"tool_search_tool_regex_20251119"` + - `type: "code_execution_20250825"` - - `"tool_search_tool_regex"` + - `"code_execution_20250825"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"direct"` + - `"direct"` - - `"code_execution_20250825"` + - `"code_execution_20250825"` - - `"code_execution_20260120"` + - `"code_execution_20260120"` - - `"code_execution_20260521"` + - `"code_execution_20260521"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `cache_control: optional BetaCacheControlEphemeral or null` - Create a cache control breakpoint at this content block. + Create a cache control breakpoint at this content block. - - `type: "ephemeral"` + - `defer_loading: optional boolean` - - `"ephemeral"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ttl: optional "5m" or "1h"` + - `strict: optional boolean` - The time-to-live for the cache control breakpoint. + When true, guarantees schema validation on tool names and inputs - This may be one the following values: + - `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - `5m`: 5 minutes - - `1h`: 1 hour + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `name: "code_execution"` - - `"5m"` + Name of the tool. - - `"1h"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `defer_loading: optional boolean` + - `"code_execution"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "code_execution_20260120"` - - `strict: optional boolean` + - `"code_execution_20260120"` - When true, guarantees schema validation on tool names and inputs + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -### Beta Tool Search Tool Result Block + - `"direct"` -- `BetaToolSearchToolResultBlock object { content, tool_use_id, type }` + - `"code_execution_20250825"` - - `content: BetaToolSearchToolResultError or BetaToolSearchToolSearchResultBlock` + - `"code_execution_20260120"` - - `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `"code_execution_20260521"` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `"invalid_tool_input"` + Create a cache control breakpoint at this content block. - - `"unavailable"` + - `defer_loading: optional boolean` - - `"too_many_requests"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"execution_time_exceeded"` + - `strict: optional boolean` - - `error_message: string or null` + When true, guarantees schema validation on tool names and inputs - - `type: "tool_search_tool_result_error"` + - `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - - `"tool_search_tool_result_error"` + Code execution tool with REPL state persistence. - - `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + - `name: "code_execution"` - - `tool_references: array of BetaToolReferenceBlock` + Name of the tool. - - `tool_name: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "tool_reference"` + - `"code_execution"` - - `"tool_reference"` + - `type: "code_execution_20260521"` - - `type: "tool_search_tool_search_result"` + - `"code_execution_20260521"` - - `"tool_search_tool_search_result"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `tool_use_id: string` + - `"direct"` - - `type: "tool_search_tool_result"` + - `"code_execution_20250825"` - - `"tool_search_tool_result"` + - `"code_execution_20260120"` -### Beta Tool Search Tool Result Block Param + - `"code_execution_20260521"` -- `BetaToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `content: BetaToolSearchToolResultErrorParam or BetaToolSearchToolSearchResultBlockParam` + Create a cache control breakpoint at this content block. - - `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `defer_loading: optional boolean` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"invalid_tool_input"` + - `strict: optional boolean` - - `"unavailable"` + When true, guarantees schema validation on tool names and inputs - - `"too_many_requests"` + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"execution_time_exceeded"` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - - `type: "tool_search_tool_result_error"` + - `type: "browser_toolset_20260801"` - - `"tool_search_tool_result_error"` + - `"browser_toolset_20260801"` - - `error_message: optional string or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` + - `"direct"` - - `tool_references: array of BetaToolReferenceBlockParam` + - `"code_execution_20250825"` - - `tool_name: string` + - `"code_execution_20260120"` - - `type: "tool_reference"` + - `"code_execution_20260521"` - - `"tool_reference"` + - `cache_control: optional BetaCacheControlEphemeral or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Create a cache control breakpoint at this content block. - Create a cache control breakpoint at this content block. + - `configs: optional BetaBrowserToolsetConfigs or null` - - `type: "ephemeral"` + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `"ephemeral"` + - `close_tab: optional BetaBrowserCloseTabConfig or null` - - `ttl: optional "5m" or "1h"` + `close_tab`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `double_click: optional BetaBrowserDoubleClickConfig or null` - - `"1h"` + `double_click`'s config overrides. - - `type: "tool_search_tool_search_result"` + - `defer_loading: optional boolean or null` - - `"tool_search_tool_search_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_use_id: string` + - `enabled: optional boolean or null` - - `type: "tool_search_tool_result"` + 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. - - `"tool_search_tool_result"` + - `file_upload: optional BetaBrowserFileUploadConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `file_upload`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` -### Beta Tool Search Tool Result Error + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `BetaToolSearchToolResultError object { error_code, error_message, type }` + - `enabled: optional boolean or null` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + 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. - - `"invalid_tool_input"` + - `find: optional BetaBrowserFindConfig or null` - - `"unavailable"` + `find`'s config overrides. - - `"too_many_requests"` + - `defer_loading: optional boolean or null` - - `"execution_time_exceeded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `error_message: string or null` + - `enabled: optional boolean or null` - - `type: "tool_search_tool_result_error"` + 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. - - `"tool_search_tool_result_error"` + - `form_input: optional BetaBrowserFormInputConfig or null` -### Beta Tool Search Tool Result Error Param + `form_input`'s config overrides. -- `BetaToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `defer_loading: optional boolean or null` - - `error_code: "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` - - `"execution_time_exceeded"` + `get_page_text`'s config overrides. - - `type: "tool_search_tool_result_error"` + - `defer_loading: optional boolean or null` - - `"tool_search_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `error_message: optional string or null` + - `enabled: optional boolean or null` -### Beta Tool Search Tool Search Result Block + 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. -- `BetaToolSearchToolSearchResultBlock object { tool_references, type }` + - `hold_key: optional BetaBrowserHoldKeyConfig or null` - - `tool_references: array of BetaToolReferenceBlock` + `hold_key`'s config overrides. - - `tool_name: string` + - `defer_loading: optional boolean or null` - - `type: "tool_reference"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool_reference"` + - `enabled: optional boolean or null` - - `type: "tool_search_tool_search_result"` + 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. - - `"tool_search_tool_search_result"` + - `hover: optional BetaBrowserHoverConfig or null` -### Beta Tool Search Tool Search Result Block Param + `hover`'s config overrides. -- `BetaToolSearchToolSearchResultBlockParam object { tool_references, type }` + - `defer_loading: optional boolean or null` - - `tool_references: array of BetaToolReferenceBlockParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_name: string` + - `enabled: optional boolean or null` - - `type: "tool_reference"` + 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. - - `"tool_reference"` + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `javascript_exec`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `key: optional BetaBrowserKeyConfig or null` - This may be one the following values: + `key`'s config overrides. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"5m"` + - `enabled: optional boolean or null` - - `"1h"` + 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. - - `type: "tool_search_tool_search_result"` + - `left_click: optional BetaBrowserLeftClickConfig or null` - - `"tool_search_tool_search_result"` + `left_click`'s config overrides. -### Beta Tool Text Editor 20241022 + - `defer_loading: optional boolean or null` -- `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "str_replace_editor"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` - - `"str_replace_editor"` + `left_click_drag`'s config overrides. - - `type: "text_editor_20241022"` + - `defer_loading: optional boolean or null` - - `"text_editor_20241022"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` - - `"code_execution_20260120"` + `left_mouse_down`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` - - `ttl: optional "5m" or "1h"` + `left_mouse_up`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `list_tabs: optional BetaBrowserListTabsConfig or null` - - `"1h"` + `list_tabs`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `input_examples: optional array of map[unknown]` + - `enabled: optional boolean or null` - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `middle_click: optional BetaBrowserMiddleClickConfig or null` -### Beta Tool Text Editor 20250124 + `middle_click`'s config overrides. -- `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + - `defer_loading: optional boolean or null` - - `name: "str_replace_editor"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"str_replace_editor"` + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` - - `type: "text_editor_20250124"` + `mouse_move`'s config overrides. - - `"text_editor_20250124"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `navigate: optional BetaBrowserNavigateConfig or null` - - `"code_execution_20260521"` + `navigate`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "ephemeral"` + - `enabled: optional boolean or null` - - `"ephemeral"` + 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. - - `ttl: optional "5m" or "1h"` + - `new_tab: optional BetaBrowserNewTabConfig or null` - The time-to-live for the cache control breakpoint. + `new_tab`'s config overrides. - This may be one the following values: + - `defer_loading: optional boolean or null` - - `5m`: 5 minutes - - `1h`: 1 hour + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `enabled: optional boolean or null` - - `"5m"` + 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. - - `"1h"` + - `read_console: optional BetaBrowserReadConsoleConfig or null` - - `defer_loading: optional boolean` + `read_console`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. -### Beta Tool Text Editor 20250429 + - `read_network: optional BetaBrowserReadNetworkConfig or null` -- `BetaToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + `read_network`'s config overrides. - - `name: "str_replace_based_edit_tool"` + - `defer_loading: optional boolean or null` - Name of the tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This is how the tool will be called by the model and in `tool_use` blocks. + - `enabled: optional boolean or null` - - `"str_replace_based_edit_tool"` + 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. - - `type: "text_editor_20250429"` + - `read_page: optional BetaBrowserReadPageConfig or null` - - `"text_editor_20250429"` + `read_page`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `right_click: optional BetaBrowserRightClickConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `right_click`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `screenshot: optional BetaBrowserScreenshotConfig or null` - This may be one the following values: + `screenshot`'s config overrides. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"5m"` + - `enabled: optional boolean or null` - - `"1h"` + 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. - - `defer_loading: optional boolean` + - `scroll: optional BetaBrowserScrollConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `scroll`'s config overrides. - - `input_examples: optional array of map[unknown]` + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` -### Beta Tool Text Editor 20250728 + 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. -- `BetaToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + - `scroll_to: optional BetaBrowserScrollToConfig or null` - - `name: "str_replace_based_edit_tool"` + `scroll_to`'s config overrides. - Name of the tool. + - `defer_loading: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"str_replace_based_edit_tool"` + - `enabled: optional boolean or null` - - `type: "text_editor_20250728"` + 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. - - `"text_editor_20250728"` + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + `switch_tab`'s config overrides. - - `"direct"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250825"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260120"` + - `enabled: optional boolean or null` - - `"code_execution_20260521"` + 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. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `triple_click: optional BetaBrowserTripleClickConfig or null` - Create a cache control breakpoint at this content block. + `triple_click`'s config overrides. - - `type: "ephemeral"` + - `defer_loading: optional boolean or null` - - `"ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ttl: optional "5m" or "1h"` + - `enabled: optional boolean or null` - The time-to-live for the cache control breakpoint. + 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. - This may be one the following values: + - `type: optional BetaBrowserTypeConfig or null` - - `5m`: 5 minutes - - `1h`: 1 hour + `type`'s config overrides. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `defer_loading: optional boolean or null` - - `"5m"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"1h"` + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `wait: optional BetaBrowserWaitConfig or null` - - `input_examples: optional array of map[unknown]` + `wait`'s config overrides. - - `max_characters: optional number or null` + - `defer_loading: optional boolean or null` - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. -### Beta Tool Union + - `zoom: optional BetaBrowserZoomConfig or null` -- `BetaToolUnion = BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` + `zoom`'s config overrides. - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `defer_loading: optional boolean or null` - - `BetaTool object { input_schema, name, allowed_callers, 7 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `input_schema: object { type, properties, required }` + - `enabled: optional boolean or null` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + 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. - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - - `type: "object"` + - `display_height_px: number` - - `"object"` + The height of the display in pixels. - - `properties: optional map[unknown] or null` + - `display_width_px: number` - - `required: optional array of string or null` + The width of the display in pixels. - - `name: string` + - `name: "computer"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. + - `"computer"` + + - `type: "computer_20241022"` + + - `"computer_20241022"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - `"direct"` @@ -27558,38 +32275,51 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `type: "ephemeral"` + - `defer_loading: optional boolean` - - `"ephemeral"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ttl: optional "5m" or "1h"` + - `display_number: optional number or null` - The time-to-live for the cache control breakpoint. + The X11 display number (e.g. 0, 1) for the display. - This may be one the following values: + - `input_examples: optional array of map[unknown]` - - `5m`: 5 minutes - - `1h`: 1 hour + - `strict: optional boolean` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + When true, guarantees schema validation on tool names and inputs - - `"5m"` + - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - `"1h"` + - `name: "memory"` - - `defer_loading: optional boolean` + Name of the tool. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + This is how the tool will be called by the model and in `tool_use` blocks. - - `description: optional string` + - `"memory"` - Description of what this tool does. + - `type: "memory_20250818"` - 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. + - `"memory_20250818"` - - `eager_input_streaming: optional boolean or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - 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. + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - `input_examples: optional array of map[unknown]` @@ -27597,23 +32327,27 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs - - `type: optional "custom" or null` + - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` - - `"custom"` + - `display_height_px: number` - - `BetaToolBash20241022 object { name, type, allowed_callers, 4 more }` + The height of the display in pixels. - - `name: "bash"` + - `display_width_px: number` + + The width of the display in pixels. + + - `name: "computer"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"bash"` + - `"computer"` - - `type: "bash_20241022"` + - `type: "computer_20250124"` - - `"bash_20241022"` + - `"computer_20250124"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -27633,25 +32367,29 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `display_number: optional number or null` + + The X11 display number (e.g. 0, 1) for the display. + - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs - - `BetaToolBash20250124 object { name, type, allowed_callers, 4 more }` + - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` - - `name: "bash"` + - `name: "str_replace_editor"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"bash"` + - `"str_replace_editor"` - - `type: "bash_20250124"` + - `type: "text_editor_20241022"` - - `"bash_20250124"` + - `"text_editor_20241022"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -27677,55 +32415,27 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs - - `BetaCodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - - `name: "code_execution"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. - - - `"code_execution"` - - - `type: "code_execution_20250522"` - - - `"code_execution_20250522"` - - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - - `"direct"` - - - `"code_execution_20250825"` - - - `"code_execution_20260120"` - - - `"code_execution_20260521"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `defer_loading: optional boolean` + - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `display_height_px: number` - - `strict: optional boolean` + The height of the display in pixels. - When true, guarantees schema validation on tool names and inputs + - `display_width_px: number` - - `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + The width of the display in pixels. - - `name: "code_execution"` + - `name: "computer"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"code_execution"` + - `"computer"` - - `type: "code_execution_20250825"` + - `type: "computer_20251124"` - - `"code_execution_20250825"` + - `"computer_20251124"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -27745,63 +32455,34 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `strict: optional boolean` - - When true, guarantees schema validation on tool names and inputs - - - `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - - `name: "code_execution"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. - - - `"code_execution"` - - - `type: "code_execution_20260120"` - - - `"code_execution_20260120"` - - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - - `"direct"` - - - `"code_execution_20250825"` - - - `"code_execution_20260120"` - - - `"code_execution_20260521"` + - `display_number: optional number or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + The X11 display number (e.g. 0, 1) for the display. - Create a cache control breakpoint at this content block. + - `enable_zoom: optional boolean` - - `defer_loading: optional boolean` + Whether to enable an action to take a zoomed-in screenshot of the screen. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs - - `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - - Code execution tool with REPL state persistence. + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `name: "code_execution"` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - Name of the tool. + - `type: "computer_toolset_20260801"` - This is how the tool will be called by the model and in `tool_use` blocks. - - - `"code_execution"` - - - `type: "code_execution_20260521"` - - - `"code_execution_20260521"` + - `"computer_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -27817,243 +32498,218 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` - - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - - `strict: optional boolean` - - When true, guarantees schema validation on tool names and inputs - - - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - - - `display_height_px: number` - - The height of the display in pixels. - - - `display_width_px: number` - - The width of the display in pixels. - - - `name: "computer"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. + - `configs: optional BetaComputerToolsetConfigs or null` - - `"computer"` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `type: "computer_20241022"` + - `cursor_position: optional BetaComputerCursorPositionConfig or null` - - `"computer_20241022"` + `cursor_position`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` - - - `"code_execution_20250825"` - - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` - - - `cache_control: optional BetaCacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `double_click: optional BetaComputerDoubleClickConfig or null` - - `display_number: optional number or null` + `double_click`'s config overrides. - The X11 display number (e.g. 0, 1) for the display. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `BetaMemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `hold_key: optional BetaComputerHoldKeyConfig or null` - - `name: "memory"` + `hold_key`'s config overrides. - Name of the tool. + - `defer_loading: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"memory"` + - `enabled: optional boolean or null` - - `type: "memory_20250818"` + 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. - - `"memory_20250818"` + - `key: optional BetaComputerKeyConfig or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + `key`'s config overrides. - - `"direct"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250825"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260120"` + - `enabled: optional boolean or null` - - `"code_execution_20260521"` + 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. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `left_click: optional BetaComputerLeftClickConfig or null` - Create a cache control breakpoint at this content block. + `left_click`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `input_examples: optional array of map[unknown]` + - `enabled: optional boolean or null` - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` - - `BetaToolComputerUse20250124 object { display_height_px, display_width_px, name, 7 more }` + `left_click_drag`'s config overrides. - - `display_height_px: number` + - `defer_loading: optional boolean or null` - The height of the display in pixels. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `display_width_px: number` + - `enabled: optional boolean or null` - The width of the display in pixels. + 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. - - `name: "computer"` + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` - Name of the tool. + `left_mouse_down`'s config overrides. - This is how the tool will be called by the model and in `tool_use` blocks. + - `defer_loading: optional boolean or null` - - `"computer"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "computer_20250124"` + - `enabled: optional boolean or null` - - `"computer_20250124"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` - - `"direct"` + `left_mouse_up`'s config overrides. - - `"code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` + - `enabled: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `middle_click: optional BetaComputerMiddleClickConfig or null` - - `defer_loading: optional boolean` + `middle_click`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `display_number: optional number or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The X11 display number (e.g. 0, 1) for the display. + - `enabled: optional boolean or null` - - `input_examples: optional array of map[unknown]` + 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. - - `strict: optional boolean` + - `mouse_move: optional BetaComputerMouseMoveConfig or null` - When true, guarantees schema validation on tool names and inputs + `mouse_move`'s config overrides. - - `BetaToolTextEditor20241022 object { name, type, allowed_callers, 4 more }` + - `defer_loading: optional boolean or null` - - `name: "str_replace_editor"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"str_replace_editor"` + - `right_click: optional BetaComputerRightClickConfig or null` - - `type: "text_editor_20241022"` + `right_click`'s config overrides. - - `"text_editor_20241022"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `screenshot: optional BetaComputerScreenshotConfig or null` - - `"code_execution_20260521"` + `screenshot`'s config overrides. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `defer_loading: optional boolean` + - `enabled: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 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. - - `input_examples: optional array of map[unknown]` + - `scroll: optional BetaComputerScrollConfig or null` - - `strict: optional boolean` + `scroll`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `BetaToolComputerUse20251124 object { display_height_px, display_width_px, name, 8 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `display_height_px: number` + - `enabled: optional boolean or null` - The height of the display in pixels. + 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. - - `display_width_px: number` + - `triple_click: optional BetaComputerTripleClickConfig or null` - The width of the display in pixels. + `triple_click`'s config overrides. - - `name: "computer"` + - `defer_loading: optional boolean or null` - Name of the tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This is how the tool will be called by the model and in `tool_use` blocks. + - `enabled: optional boolean or null` - - `"computer"` + 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. - - `type: "computer_20251124"` + - `type: optional BetaComputerTypeConfig or null` - - `"computer_20251124"` + `type`'s config overrides. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `"direct"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `wait: optional BetaComputerWaitConfig or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + `wait`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `defer_loading: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `enabled: optional boolean or null` - - `display_number: optional number or null` + 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. - The X11 display number (e.g. 0, 1) for the display. + - `zoom: optional BetaComputerZoomConfig or null` - - `enable_zoom: optional boolean` + `zoom`'s config overrides. - Whether to enable an action to take a zoomed-in screenshot of the screen. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` @@ -28836,7 +33492,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ ### Beta Tool Use Block -- `BetaToolUseBlock object { id, input, name, 2 more }` +- `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -28878,9 +33534,13 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + ### Beta Tool Use Block Param -- `BetaToolUseBlockParam object { id, input, name, 3 more }` +- `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -28945,6 +33605,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + ### Beta Tool Uses Keep - `BetaToolUsesKeep object { type, value }` @@ -29623,7 +34287,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -29669,6 +34333,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -30382,7 +35058,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -30428,6 +35104,18 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `type: "content"` - `"content"` @@ -31244,7 +35932,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -31290,6 +35978,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -31538,7 +36228,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -31584,6 +36274,18 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -31622,7 +36324,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -31714,7 +36416,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -31760,7 +36462,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -31772,15 +36478,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -31800,8 +36506,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -32381,141 +37214,104 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -33374,19 +38170,128 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs - - `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - - - `name: "code_execution"` + - `BetaCodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20250825"` + + - `"code_execution_20250825"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260120"` + + - `"code_execution_20260120"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence. + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260521"` + + - `"code_execution_20260521"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - Name of the tool. + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "browser_toolset_20260801"` - - `"code_execution"` - - - `type: "code_execution_20250825"` - - - `"code_execution_20250825"` + - `"browser_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -33402,89 +38307,386 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `configs: optional BetaBrowserToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `strict: optional boolean` + - `close_tab: optional BetaBrowserCloseTabConfig or null` - When true, guarantees schema validation on tool names and inputs + `close_tab`'s config overrides. - - `BetaCodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + - `defer_loading: optional boolean or null` - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "code_execution"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `double_click: optional BetaBrowserDoubleClickConfig or null` - - `"code_execution"` + `double_click`'s config overrides. - - `type: "code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `file_upload: optional BetaBrowserFileUploadConfig or null` - - `"code_execution_20260120"` + `file_upload`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional BetaCacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `find: optional BetaBrowserFindConfig or null` - - `strict: optional boolean` + `find`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `BetaCodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Code execution tool with REPL state persistence. + - `enabled: optional boolean or null` - - `name: "code_execution"` + 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. - Name of the tool. + - `form_input: optional BetaBrowserFormInputConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `form_input`'s config overrides. - - `"code_execution"` + - `defer_loading: optional boolean or null` - - `type: "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` - - `"code_execution_20250825"` + `get_page_text`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `hold_key: optional BetaBrowserHoldKeyConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `hold_key`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` @@ -33716,6 +38918,248 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -34551,7 +39995,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] @@ -34603,7 +40047,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -34649,6 +40093,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -34825,7 +40271,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -34871,6 +40317,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -35058,7 +40506,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -35104,6 +40552,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -35273,7 +40723,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -35319,6 +40769,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -35400,7 +40852,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -35446,6 +40898,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -35713,7 +41167,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -35755,6 +41209,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -37600,7 +43058,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -37642,6 +43100,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -39286,7 +44748,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -39328,6 +44790,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -40934,7 +46400,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -40976,6 +46442,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` diff --git a/content/en/api/beta/messages/batches.md b/content/en/api/beta/messages/batches.md index 346137eea9..dbb7f20b5d 100644 --- a/content/en/api/beta/messages/batches.md +++ b/content/en/api/beta/messages/batches.md @@ -23,7 +23,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -317,7 +319,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -363,6 +365,18 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -401,7 +415,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -493,7 +507,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -539,7 +553,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -551,15 +569,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -579,8 +597,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -1160,141 +1305,104 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `BetaToolChangeToolReference object { name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `name: string` + - `BetaToolChangeToolReference object { name, type }` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `name: string` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `type: "tool_reference"` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `"tool_reference"` - - `name: string` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `server_name: string` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `type: "mcp_tool_reference"` + - `name: string` - - `"mcp_tool_reference"` + - `server_name: string` - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `type: "mcp_tool_reference"` - Reference to every tool in the named MCP server's toolset. + - `"mcp_tool_reference"` - - `server_name: string` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "mcp_toolset_reference"` + Reference to every tool in the named MCP server's toolset. - - `"mcp_toolset_reference"` + - `server_name: string` - - `type: "tool_addition"` + - `type: "mcp_toolset_reference"` - - `"tool_addition"` + - `"mcp_toolset_reference"` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "tool_addition"` - Create a cache control breakpoint at this content block. + - `"tool_addition"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -2265,6 +2373,412 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -2495,6 +3009,248 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -3330,7 +4086,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] @@ -3382,7 +4138,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3428,6 +4184,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3604,7 +4362,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3650,6 +4408,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3837,7 +4597,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3883,6 +4643,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4052,7 +4814,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4098,6 +4860,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4179,7 +4943,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4225,6 +4989,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4492,7 +5258,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -4534,6 +5300,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -6379,7 +7149,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -6421,6 +7191,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -8065,7 +8839,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -8107,6 +8881,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -9713,7 +10491,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -9755,6 +10533,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` diff --git a/content/en/api/beta/messages/batches/cancel.md b/content/en/api/beta/messages/batches/cancel.md index d4092b2faa..2c196ec41a 100644 --- a/content/en/api/beta/messages/batches/cancel.md +++ b/content/en/api/beta/messages/batches/cancel.md @@ -27,7 +27,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/messages/batches/create.md b/content/en/api/beta/messages/batches/create.md index 587209d8d9..f0fa87f310 100644 --- a/content/en/api/beta/messages/batches/create.md +++ b/content/en/api/beta/messages/batches/create.md @@ -21,7 +21,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -315,7 +317,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -361,6 +363,18 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -399,7 +413,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -491,7 +505,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -537,7 +551,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -549,15 +567,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -577,8 +595,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -1158,141 +1303,104 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -2263,6 +2371,412 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -2493,6 +3007,248 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -3328,7 +4084,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] diff --git a/content/en/api/beta/messages/batches/delete.md b/content/en/api/beta/messages/batches/delete.md index 70c140e9c3..f5e26f8883 100644 --- a/content/en/api/beta/messages/batches/delete.md +++ b/content/en/api/beta/messages/batches/delete.md @@ -27,7 +27,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/messages/batches/list.md b/content/en/api/beta/messages/batches/list.md index 43df5ed168..a1d113713d 100644 --- a/content/en/api/beta/messages/batches/list.md +++ b/content/en/api/beta/messages/batches/list.md @@ -35,7 +35,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/messages/batches/results.md b/content/en/api/beta/messages/batches/results.md index ee140889cc..9957126712 100644 --- a/content/en/api/beta/messages/batches/results.md +++ b/content/en/api/beta/messages/batches/results.md @@ -27,7 +27,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -340,7 +342,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -382,6 +384,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` diff --git a/content/en/api/beta/messages/batches/retrieve.md b/content/en/api/beta/messages/batches/retrieve.md index d35825ddba..a261796277 100644 --- a/content/en/api/beta/messages/batches/retrieve.md +++ b/content/en/api/beta/messages/batches/retrieve.md @@ -25,7 +25,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/messages/count_tokens.md b/content/en/api/beta/messages/count_tokens.md index 04aacc355a..147877f603 100644 --- a/content/en/api/beta/messages/count_tokens.md +++ b/content/en/api/beta/messages/count_tokens.md @@ -21,7 +21,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -289,7 +291,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -335,6 +337,18 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -373,7 +387,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -465,7 +479,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -511,7 +525,11 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -523,15 +541,15 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -551,8 +569,135 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -1132,141 +1277,104 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -1717,7 +1825,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"none"` -- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 23 more` +- `tools: optional array of BetaTool or BetaToolBash20241022 or BetaToolBash20250124 or 25 more` Definitions of tools that the model may use. @@ -2065,6 +2173,412 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -2295,6 +2809,248 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -3034,7 +3790,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.", diff --git a/content/en/api/beta/messages/create.md b/content/en/api/beta/messages/create.md index 6d6428fd8c..f1d9ffd5b2 100644 --- a/content/en/api/beta/messages/create.md +++ b/content/en/api/beta/messages/create.md @@ -21,7 +21,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -299,7 +301,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"search_result_location"` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `source: BetaBase64ImageSource or BetaURLImageSource or BetaFileImageSource` @@ -345,6 +347,18 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `transformations: optional BetaImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `BetaRequestDocumentBlock object { source, type, cache_control, 3 more }` - `source: BetaBase64PDFSource or BetaPlainTextSource or BetaContentBlockSource or 2 more` @@ -383,7 +397,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -475,7 +489,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlockParam object { id, input, name, 3 more }` + - `BetaToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -521,7 +535,11 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` - - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `BetaToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -533,15 +551,15 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `content: optional string or array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `string` - - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 2 more` + - `array of BetaTextBlockParam or BetaImageBlockParam or BetaSearchResultBlockParam or 3 more` - `BetaTextBlockParam object { text, type, cache_control, citations }` - - `BetaImageBlockParam object { source, type, cache_control }` + - `BetaImageBlockParam object { source, type, cache_control, transformations }` - `BetaSearchResultBlockParam object { content, source, title, 3 more }` @@ -561,8 +579,135 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `BetaBrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BetaBrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BetaBrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BetaBrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BetaBrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BetaBrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BetaBrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `BetaServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -1142,141 +1287,104 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Opaque metadata from prior compaction, to be round-tripped verbatim - - `BetaMidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of BetaTextBlockParam or BetaRequestToolAdditionBlock or BetaRequestToolRemovalBlock` - - System instruction text blocks. - - - `BetaTextBlockParam object { text, type, cache_control, citations }` - - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to surface a declared tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is offered to the model from this point in the + conversation onward. - - `name: string` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - - `type: "tool_reference"` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `"tool_reference"` + - `BetaToolChangeToolReference object { name, type }` - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + - `name: string` - - `name: string` + - `type: "tool_reference"` - - `server_name: string` + - `"tool_reference"` - - `type: "mcp_tool_reference"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"mcp_tool_reference"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `name: string` - Reference to every tool in the named MCP server's toolset. + - `server_name: string` - - `server_name: string` + - `type: "mcp_tool_reference"` - - `type: "mcp_toolset_reference"` + - `"mcp_tool_reference"` - - `"mcp_toolset_reference"` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - - `type: "tool_addition"` + Reference to every tool in the named MCP server's toolset. - - `"tool_addition"` + - `server_name: string` - - `cache_control: optional BetaCacheControlEphemeral or null` + - `type: "mcp_toolset_reference"` - Create a cache control breakpoint at this content block. + - `"mcp_toolset_reference"` - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` + - `type: "tool_addition"` - Mid-conversation directive to withdraw a tool. + - `"tool_addition"` - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. + - `cache_control: optional BetaCacheControlEphemeral or null` - - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` + Create a cache control breakpoint at this content block. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - `BetaToolChangeToolReference object { name, type }` + Mid-conversation directive to withdraw a tool. - Reference to a single tool the caller declared directly in - `tools[]`. Does not accept the composed `{server}_{name}` form the - server assigns to MCP-resolved tools — use `mcp_tool_reference` or - `mcp_toolset_reference` for those. + `tool` references a tool (or MCP toolset) by name from the request's + `tools`; it is no longer offered to the model from this point in the + conversation onward. - - `BetaToolChangeMCPToolReference object { name, server_name, type }` + - `tool: BetaToolChangeToolReference or BetaToolChangeMCPToolReference or BetaToolChangeMCPToolsetReference` - Reference to a single MCP tool by its server and remote name — the - same `server_name`/`name` pair `mcp_tool_use` carries. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `BetaToolChangeMCPToolsetReference object { server_name, type }` + - `BetaToolChangeToolReference object { name, type }` - Reference to every tool in the named MCP server's toolset. + Reference to a single tool the caller declared directly in + `tools[]`. Does not accept the composed `{server}_{name}` form the + server assigns to MCP-resolved tools — use `mcp_tool_reference` or + `mcp_toolset_reference` for those. - - `type: "tool_removal"` + - `BetaToolChangeMCPToolReference object { name, server_name, type }` - - `"tool_removal"` + Reference to a single MCP tool by its server and remote name — the + same `server_name`/`name` pair `mcp_tool_use` carries. - - `cache_control: optional BetaCacheControlEphemeral or null` + - `BetaToolChangeMCPToolsetReference object { server_name, type }` - Create a cache control breakpoint at this content block. + Reference to every tool in the named MCP server's toolset. - - `type: "mid_conv_system"` + - `type: "tool_removal"` - - `"mid_conv_system"` + - `"tool_removal"` - `cache_control: optional BetaCacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `BetaRequestToolAdditionBlock object { tool, type, cache_control }` - - Mid-conversation directive to surface a declared tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is offered to the model from this point in the - conversation onward. - - - `BetaRequestToolRemovalBlock object { tool, type, cache_control }` - - Mid-conversation directive to withdraw a tool. - - `tool` references a tool (or MCP toolset) by name from the request's - `tools`; it is no longer offered to the model from this point in the - conversation onward. - - `BetaFallbackBlockParam object { from, to, type, trigger }` A `fallback` block echoed back from a prior response. @@ -2247,6 +2355,412 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaBrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaBrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BetaBrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaBrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BetaBrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BetaBrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BetaBrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BetaBrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaBrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BetaBrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BetaBrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaBrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaBrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaBrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaBrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaBrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BetaBrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaBrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaBrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BetaBrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BetaBrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BetaBrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BetaBrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BetaBrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaBrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaBrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaBrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BetaBrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BetaBrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaBrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaBrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaBrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaBrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolComputerUse20241022 object { display_height_px, display_width_px, name, 7 more }` - `display_height_px: number` @@ -2477,6 +2991,248 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BetaComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional BetaCacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BetaComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional BetaComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BetaComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BetaComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BetaComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BetaComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BetaComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BetaComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BetaComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BetaComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BetaComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BetaComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BetaComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BetaComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BetaComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BetaComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BetaComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BetaComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `BetaToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -3429,7 +4185,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `BetaToolUseBlock object { id, input, name, 2 more }` + - `BetaToolUseBlock object { id, input, name, 3 more }` - `id: string` @@ -3471,6 +4227,10 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `BetaServerToolUseBlock object { id, input, name, 2 more }` - `id: string` @@ -4760,7 +5520,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ { @@ -4840,14 +5600,14 @@ curl https://api.anthropic.com/v1/messages \ "type": "model_changed" } }, - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber", "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", "fallback_credit_token": "QW50aHJvcGljL0NsYXVkZQ==", "fallback_has_prefill_claim": true, - "recommended_model": "claude-sonnet-4-6", + "recommended_model": "claude-opus-4-8", "type": "refusal" }, "stop_reason": "end_turn", diff --git a/content/en/api/beta/models.md b/content/en/api/beta/models.md index ba29929c01..b440dd4e37 100644 --- a/content/en/api/beta/models.md +++ b/content/en/api/beta/models.md @@ -37,7 +37,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83,6 +83,8 @@ The Models API response can be used to determine which models are available for - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -267,7 +269,7 @@ curl https://api.anthropic.com/v1/models \ { "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -332,8 +334,8 @@ curl https://api.anthropic.com/v1/models \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" @@ -367,7 +369,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -413,6 +415,8 @@ The Models API response can be used to determine information about a specific mo - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -583,7 +587,7 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ ```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -648,8 +652,8 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/beta/models/list.md b/content/en/api/beta/models/list.md index 085e8eb100..5a4c0d6bd4 100644 --- a/content/en/api/beta/models/list.md +++ b/content/en/api/beta/models/list.md @@ -35,7 +35,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ The Models API response can be used to determine which models are available for - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -265,7 +267,7 @@ curl https://api.anthropic.com/v1/models \ { "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -330,8 +332,8 @@ curl https://api.anthropic.com/v1/models \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/beta/models/retrieve.md b/content/en/api/beta/models/retrieve.md index f048385b24..c123ef710d 100644 --- a/content/en/api/beta/models/retrieve.md +++ b/content/en/api/beta/models/retrieve.md @@ -25,7 +25,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ The Models API response can be used to determine information about a specific mo - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -241,7 +243,7 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ ```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "allowed_fallback_models": [ "string" ], @@ -306,8 +308,8 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/beta/sessions.md b/content/en/api/beta/sessions.md index 3544d00dc9..2ac65fe780 100644 --- a/content/en/api/beta/sessions.md +++ b/content/en/api/beta/sessions.md @@ -19,7 +19,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -141,7 +143,7 @@ Create Session - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -1520,7 +1522,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1540,7 +1542,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1776,7 +1778,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1822,6 +1824,8 @@ List Sessions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2535,7 +2539,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -2555,7 +2559,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -2733,7 +2737,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2779,6 +2783,8 @@ Get Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3482,7 +3488,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -3502,7 +3508,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -3676,7 +3682,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3722,6 +3728,8 @@ Update Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4649,7 +4657,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -4669,7 +4677,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -4843,7 +4851,7 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4889,6 +4897,8 @@ Delete Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -4960,7 +4970,7 @@ Archive Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -5006,6 +5016,8 @@ Archive Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -5710,7 +5722,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -5730,7 +5742,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -5976,7 +5988,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -9304,7 +9316,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -9350,6 +9362,8 @@ List Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -11417,7 +11431,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -11463,6 +11477,8 @@ Send Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -12376,7 +12392,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -12422,6 +12438,8 @@ Stream Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -23187,7 +23205,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -23233,6 +23251,8 @@ Add Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -23347,7 +23367,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -23393,6 +23413,8 @@ List Session Resources - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -23582,7 +23604,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -23628,6 +23650,8 @@ Get Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -23796,7 +23820,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -23842,6 +23866,8 @@ Update Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -24020,7 +24046,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -24066,6 +24092,8 @@ Delete Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -24579,7 +24607,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -24625,6 +24653,8 @@ List Session Threads - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -25132,7 +25162,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -25227,7 +25257,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -25273,6 +25303,8 @@ Get Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -25774,7 +25806,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -25866,7 +25898,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -25912,6 +25944,8 @@ Archive Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -26414,7 +26448,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -29108,7 +29142,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -29154,6 +29188,8 @@ List Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -31222,7 +31258,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -31268,6 +31304,8 @@ Stream Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/archive.md b/content/en/api/beta/sessions/archive.md index 82cd53a368..1d777aa0fb 100644 --- a/content/en/api/beta/sessions/archive.md +++ b/content/en/api/beta/sessions/archive.md @@ -21,7 +21,7 @@ Archive Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -771,7 +773,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -791,7 +793,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/archive \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/create.md b/content/en/api/beta/sessions/create.md index 945701aa12..a76c6cfc87 100644 --- a/content/en/api/beta/sessions/create.md +++ b/content/en/api/beta/sessions/create.md @@ -17,7 +17,7 @@ Create Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -139,7 +141,7 @@ Create Session - `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams` - Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model. + Replacement model. Accepts the model string, e.g. `claude-opus-5`, or a `model_config` object. Omit to use the agent's model. - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string` @@ -1518,7 +1520,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1538,7 +1540,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/delete.md b/content/en/api/beta/sessions/delete.md index 1a5d1e4940..0cc62a0c45 100644 --- a/content/en/api/beta/sessions/delete.md +++ b/content/en/api/beta/sessions/delete.md @@ -21,7 +21,7 @@ Delete Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Delete Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/events.md b/content/en/api/beta/sessions/events.md index dbedff0464..d5b0fc17a0 100644 --- a/content/en/api/beta/sessions/events.md +++ b/content/en/api/beta/sessions/events.md @@ -61,7 +61,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -107,6 +107,8 @@ List Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2174,7 +2176,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2220,6 +2222,8 @@ Send Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -3133,7 +3137,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -3179,6 +3183,8 @@ Stream Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/events/list.md b/content/en/api/beta/sessions/events/list.md index ceeeea27f1..a3f560e71f 100644 --- a/content/en/api/beta/sessions/events/list.md +++ b/content/en/api/beta/sessions/events/list.md @@ -59,7 +59,7 @@ List Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -105,6 +105,8 @@ List Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/events/send.md b/content/en/api/beta/sessions/events/send.md index e828958134..9e84d0177b 100644 --- a/content/en/api/beta/sessions/events/send.md +++ b/content/en/api/beta/sessions/events/send.md @@ -21,7 +21,7 @@ Send Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Send Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/events/stream.md b/content/en/api/beta/sessions/events/stream.md index 2375b6cf20..d5cac8f5ec 100644 --- a/content/en/api/beta/sessions/events/stream.md +++ b/content/en/api/beta/sessions/events/stream.md @@ -31,7 +31,7 @@ Stream Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ Stream Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/list.md b/content/en/api/beta/sessions/list.md index ba4a447392..e9ab0f89a6 100644 --- a/content/en/api/beta/sessions/list.md +++ b/content/en/api/beta/sessions/list.md @@ -83,7 +83,7 @@ List Sessions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -129,6 +129,8 @@ List Sessions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -842,7 +844,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -862,7 +864,7 @@ curl https://api.anthropic.com/v1/sessions \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/resources.md b/content/en/api/beta/sessions/resources.md index e227c5d3e9..4aa4f9fdf6 100644 --- a/content/en/api/beta/sessions/resources.md +++ b/content/en/api/beta/sessions/resources.md @@ -23,7 +23,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Add Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -183,7 +185,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -229,6 +231,8 @@ List Session Resources - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -418,7 +422,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -464,6 +468,8 @@ Get Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -632,7 +638,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -678,6 +684,8 @@ Update Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -856,7 +864,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -902,6 +910,8 @@ Delete Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/resources/add.md b/content/en/api/beta/sessions/resources/add.md index aaa53c3129..28a8fb5d2c 100644 --- a/content/en/api/beta/sessions/resources/add.md +++ b/content/en/api/beta/sessions/resources/add.md @@ -21,7 +21,7 @@ Add Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Add Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/resources/delete.md b/content/en/api/beta/sessions/resources/delete.md index 38a11a328b..d8da08448f 100644 --- a/content/en/api/beta/sessions/resources/delete.md +++ b/content/en/api/beta/sessions/resources/delete.md @@ -23,7 +23,7 @@ Delete Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Delete Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/resources/list.md b/content/en/api/beta/sessions/resources/list.md index 3f6fae85a8..33449528ff 100644 --- a/content/en/api/beta/sessions/resources/list.md +++ b/content/en/api/beta/sessions/resources/list.md @@ -31,7 +31,7 @@ List Session Resources - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ List Session Resources - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/resources/retrieve.md b/content/en/api/beta/sessions/resources/retrieve.md index 7662847515..e57c7382a5 100644 --- a/content/en/api/beta/sessions/resources/retrieve.md +++ b/content/en/api/beta/sessions/resources/retrieve.md @@ -23,7 +23,7 @@ Get Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Get Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/resources/update.md b/content/en/api/beta/sessions/resources/update.md index 28e470fc3c..05ec9caac6 100644 --- a/content/en/api/beta/sessions/resources/update.md +++ b/content/en/api/beta/sessions/resources/update.md @@ -23,7 +23,7 @@ Update Session Resource - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Update Session Resource - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/retrieve.md b/content/en/api/beta/sessions/retrieve.md index e6c6cdfafc..975b2c8eea 100644 --- a/content/en/api/beta/sessions/retrieve.md +++ b/content/en/api/beta/sessions/retrieve.md @@ -21,7 +21,7 @@ Get Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -770,7 +772,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -790,7 +792,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/threads.md b/content/en/api/beta/sessions/threads.md index 7c11fe1ffb..49056ecce0 100644 --- a/content/en/api/beta/sessions/threads.md +++ b/content/en/api/beta/sessions/threads.md @@ -33,7 +33,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ List Session Threads - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -586,7 +588,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -681,7 +683,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -727,6 +729,8 @@ Get Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1228,7 +1232,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1320,7 +1324,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1366,6 +1370,8 @@ Archive Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1868,7 +1874,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -4562,7 +4568,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -4608,6 +4614,8 @@ List Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -6676,7 +6684,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -6722,6 +6730,8 @@ Stream Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/threads/archive.md b/content/en/api/beta/sessions/threads/archive.md index 3d5043886f..d61135f55e 100644 --- a/content/en/api/beta/sessions/threads/archive.md +++ b/content/en/api/beta/sessions/threads/archive.md @@ -23,7 +23,7 @@ Archive Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Archive Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -571,7 +573,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID/archiv } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/threads/events.md b/content/en/api/beta/sessions/threads/events.md index 6ceec7d853..641f453503 100644 --- a/content/en/api/beta/sessions/threads/events.md +++ b/content/en/api/beta/sessions/threads/events.md @@ -35,7 +35,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ List Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2149,7 +2151,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2195,6 +2197,8 @@ Stream Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/threads/events/list.md b/content/en/api/beta/sessions/threads/events/list.md index 4b1c0345b6..9f9ea407e0 100644 --- a/content/en/api/beta/sessions/threads/events/list.md +++ b/content/en/api/beta/sessions/threads/events/list.md @@ -33,7 +33,7 @@ List Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ List Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/threads/events/stream.md b/content/en/api/beta/sessions/threads/events/stream.md index 2432971bd5..4c07a02360 100644 --- a/content/en/api/beta/sessions/threads/events/stream.md +++ b/content/en/api/beta/sessions/threads/events/stream.md @@ -33,7 +33,7 @@ Stream Session Thread Events - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Stream Session Thread Events - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/sessions/threads/list.md b/content/en/api/beta/sessions/threads/list.md index 89c5a40e35..cb0c5df43f 100644 --- a/content/en/api/beta/sessions/threads/list.md +++ b/content/en/api/beta/sessions/threads/list.md @@ -31,7 +31,7 @@ List Session Threads - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ List Session Threads - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -584,7 +586,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/threads/retrieve.md b/content/en/api/beta/sessions/threads/retrieve.md index ace5292851..5d70707310 100644 --- a/content/en/api/beta/sessions/threads/retrieve.md +++ b/content/en/api/beta/sessions/threads/retrieve.md @@ -23,7 +23,7 @@ Get Session Thread - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Get Session Thread - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -570,7 +572,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID/threads/$THREAD_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/sessions/update.md b/content/en/api/beta/sessions/update.md index a2786a3694..91a89c19c6 100644 --- a/content/en/api/beta/sessions/update.md +++ b/content/en/api/beta/sessions/update.md @@ -21,7 +21,7 @@ Update Session - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update Session - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -994,7 +996,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, @@ -1014,7 +1016,7 @@ curl https://api.anthropic.com/v1/sessions/$SESSION_ID \ } ], "model": { - "id": "claude-sonnet-4-6", + "id": "claude-opus-5", "effort": { "type": "low" }, diff --git a/content/en/api/beta/skills.md b/content/en/api/beta/skills.md index 332880184e..2382894167 100644 --- a/content/en/api/beta/skills.md +++ b/content/en/api/beta/skills.md @@ -19,7 +19,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -192,7 +194,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -238,6 +240,8 @@ List Skills - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -370,7 +374,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -416,6 +420,8 @@ Get Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -526,7 +532,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -572,6 +578,8 @@ Delete Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -804,7 +812,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -850,6 +858,8 @@ Create Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -978,7 +988,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1024,6 +1034,8 @@ List Skill Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1162,7 +1174,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1208,6 +1220,8 @@ Download a skill version's content as a zip archive. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1267,7 +1281,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1313,6 +1327,8 @@ Get Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1433,7 +1449,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1479,6 +1495,8 @@ Delete Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/create.md b/content/en/api/beta/skills/create.md index 801c724224..49192fc208 100644 --- a/content/en/api/beta/skills/create.md +++ b/content/en/api/beta/skills/create.md @@ -17,7 +17,7 @@ Create Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/delete.md b/content/en/api/beta/skills/delete.md index 40fc5576b9..e8aae4dd09 100644 --- a/content/en/api/beta/skills/delete.md +++ b/content/en/api/beta/skills/delete.md @@ -25,7 +25,7 @@ Delete Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Delete Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/list.md b/content/en/api/beta/skills/list.md index 6e93b012f3..b77699cf9f 100644 --- a/content/en/api/beta/skills/list.md +++ b/content/en/api/beta/skills/list.md @@ -40,7 +40,7 @@ List Skills - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -86,6 +86,8 @@ List Skills - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/retrieve.md b/content/en/api/beta/skills/retrieve.md index a5cedcfe99..e3edafe33f 100644 --- a/content/en/api/beta/skills/retrieve.md +++ b/content/en/api/beta/skills/retrieve.md @@ -25,7 +25,7 @@ Get Skill - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Get Skill - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions.md b/content/en/api/beta/skills/versions.md index 2392f08e33..db5eb40747 100644 --- a/content/en/api/beta/skills/versions.md +++ b/content/en/api/beta/skills/versions.md @@ -27,7 +27,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -73,6 +73,8 @@ Create Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -201,7 +203,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -247,6 +249,8 @@ List Skill Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -385,7 +389,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -431,6 +435,8 @@ Download a skill version's content as a zip archive. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -490,7 +496,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -536,6 +542,8 @@ Get Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -656,7 +664,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -702,6 +710,8 @@ Delete Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions/create.md b/content/en/api/beta/skills/versions/create.md index ebb35cee52..18afd0d109 100644 --- a/content/en/api/beta/skills/versions/create.md +++ b/content/en/api/beta/skills/versions/create.md @@ -25,7 +25,7 @@ Create Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Create Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions/delete.md b/content/en/api/beta/skills/versions/delete.md index 70ee4f88b4..1bb3e33fbe 100644 --- a/content/en/api/beta/skills/versions/delete.md +++ b/content/en/api/beta/skills/versions/delete.md @@ -31,7 +31,7 @@ Delete Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ Delete Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions/download.md b/content/en/api/beta/skills/versions/download.md index 28ae473b4d..32458f003c 100644 --- a/content/en/api/beta/skills/versions/download.md +++ b/content/en/api/beta/skills/versions/download.md @@ -31,7 +31,7 @@ Download a skill version's content as a zip archive. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ Download a skill version's content as a zip archive. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions/list.md b/content/en/api/beta/skills/versions/list.md index a6b2d584a0..75bcdfc1ce 100644 --- a/content/en/api/beta/skills/versions/list.md +++ b/content/en/api/beta/skills/versions/list.md @@ -37,7 +37,7 @@ List Skill Versions - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83,6 +83,8 @@ List Skill Versions - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/skills/versions/retrieve.md b/content/en/api/beta/skills/versions/retrieve.md index 0f77eb72ea..7902ddfbed 100644 --- a/content/en/api/beta/skills/versions/retrieve.md +++ b/content/en/api/beta/skills/versions/retrieve.md @@ -31,7 +31,7 @@ Get Skill Version - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ Get Skill Version - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels.md b/content/en/api/beta/tunnels.md index d793ed64d1..48e428f288 100644 --- a/content/en/api/beta/tunnels.md +++ b/content/en/api/beta/tunnels.md @@ -21,7 +21,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -169,7 +171,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -215,6 +217,8 @@ Fetches a tunnel by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -319,7 +323,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -365,6 +369,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -468,7 +474,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -514,6 +520,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -609,7 +617,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -655,6 +663,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -735,7 +745,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -781,6 +791,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -920,7 +932,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -966,6 +978,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1077,7 +1091,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1123,6 +1137,8 @@ Fetches a tunnel certificate by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1236,7 +1252,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1282,6 +1298,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1392,7 +1410,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1438,6 +1456,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/archive.md b/content/en/api/beta/tunnels/archive.md index b5ef9c724b..020ba1d3de 100644 --- a/content/en/api/beta/tunnels/archive.md +++ b/content/en/api/beta/tunnels/archive.md @@ -23,7 +23,7 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Archives a tunnel. Archival is irreversible: every non-archived certificate on t - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/certificates.md b/content/en/api/beta/tunnels/certificates.md index d3b0cbfdf8..0a9c1a8e48 100644 --- a/content/en/api/beta/tunnels/certificates.md +++ b/content/en/api/beta/tunnels/certificates.md @@ -25,7 +25,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -182,7 +184,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -228,6 +230,8 @@ Fetches a tunnel certificate by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -341,7 +345,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -387,6 +391,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -497,7 +503,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -543,6 +549,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/certificates/archive.md b/content/en/api/beta/tunnels/certificates/archive.md index c94a64cc23..dda833afc2 100644 --- a/content/en/api/beta/tunnels/certificates/archive.md +++ b/content/en/api/beta/tunnels/certificates/archive.md @@ -25,7 +25,7 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Archives a tunnel certificate, removing it from the set Anthropic trusts for the - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/certificates/create.md b/content/en/api/beta/tunnels/certificates/create.md index 063c5c54de..a145a56956 100644 --- a/content/en/api/beta/tunnels/certificates/create.md +++ b/content/en/api/beta/tunnels/certificates/create.md @@ -23,7 +23,7 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Registers a public CA certificate on a tunnel. Anthropic verifies the gateway's - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/certificates/list.md b/content/en/api/beta/tunnels/certificates/list.md index 8f974f5490..2b5d08b3b7 100644 --- a/content/en/api/beta/tunnels/certificates/list.md +++ b/content/en/api/beta/tunnels/certificates/list.md @@ -37,7 +37,7 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83,6 +83,8 @@ Lists the certificates registered on a tunnel. Archived certificates are exclude - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/certificates/retrieve.md b/content/en/api/beta/tunnels/certificates/retrieve.md index 682d7c6797..8fa648e58a 100644 --- a/content/en/api/beta/tunnels/certificates/retrieve.md +++ b/content/en/api/beta/tunnels/certificates/retrieve.md @@ -25,7 +25,7 @@ Fetches a tunnel certificate by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ Fetches a tunnel certificate by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/create.md b/content/en/api/beta/tunnels/create.md index 9a9dca8786..d841adad04 100644 --- a/content/en/api/beta/tunnels/create.md +++ b/content/en/api/beta/tunnels/create.md @@ -19,7 +19,7 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Creates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/list.md b/content/en/api/beta/tunnels/list.md index c1c0b97885..b56bea847e 100644 --- a/content/en/api/beta/tunnels/list.md +++ b/content/en/api/beta/tunnels/list.md @@ -33,7 +33,7 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -79,6 +79,8 @@ Lists tunnels. Results are ordered by creation time, newest first; archived tunn - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/retrieve.md b/content/en/api/beta/tunnels/retrieve.md index 864b4dc188..b8f949494f 100644 --- a/content/en/api/beta/tunnels/retrieve.md +++ b/content/en/api/beta/tunnels/retrieve.md @@ -23,7 +23,7 @@ Fetches a tunnel by ID. - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Fetches a tunnel by ID. - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/reveal_token.md b/content/en/api/beta/tunnels/reveal_token.md index 5f0f6ca54c..ba738ca23c 100644 --- a/content/en/api/beta/tunnels/reveal_token.md +++ b/content/en/api/beta/tunnels/reveal_token.md @@ -23,7 +23,7 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Reveals a tunnel's connector token. The value is fetched live on each call; Anth - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/tunnels/rotate_token.md b/content/en/api/beta/tunnels/rotate_token.md index 8a6cb7089e..ed5aa10645 100644 --- a/content/en/api/beta/tunnels/rotate_token.md +++ b/content/en/api/beta/tunnels/rotate_token.md @@ -23,7 +23,7 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Rotates a tunnel's connector token. Rotation invalidates the current token for n - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/user_profiles.md b/content/en/api/beta/user_profiles.md index adfd01da7b..613ea3609e 100644 --- a/content/en/api/beta/user_profiles.md +++ b/content/en/api/beta/user_profiles.md @@ -19,7 +19,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -89,6 +91,14 @@ Create User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. Maximum 255 characters. @@ -99,7 +109,7 @@ Create User Profile - `name: optional string or null` - Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters. + Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. - `relationship: optional "external" or "resold" or "internal"` @@ -113,7 +123,7 @@ Create User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -127,16 +137,6 @@ Create User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -161,13 +161,31 @@ Create User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -175,7 +193,7 @@ Create User Profile curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345", @@ -190,7 +208,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -198,8 +215,10 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -235,7 +254,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -281,6 +300,8 @@ List User Profiles - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -321,16 +342,6 @@ List User Profiles Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -355,13 +366,31 @@ List User Profiles A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` - `next_page: string or null` @@ -372,7 +401,7 @@ List User Profiles ```http curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -385,7 +414,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -393,8 +421,10 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" @@ -419,7 +449,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -465,6 +495,8 @@ Get User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -489,7 +521,7 @@ Get User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -503,16 +535,6 @@ Get User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -537,20 +559,38 @@ Get User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example ```http curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -561,7 +601,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -569,8 +608,10 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -592,7 +633,7 @@ Update User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -638,6 +679,8 @@ Update User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -662,6 +705,14 @@ Update User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough" or null` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. @@ -686,7 +737,7 @@ Update User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -700,16 +751,6 @@ Update User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -734,13 +775,31 @@ Update User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -748,7 +807,7 @@ Update User Profile curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345" @@ -762,7 +821,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -770,8 +828,10 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` @@ -793,7 +853,7 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -839,6 +899,8 @@ Create Enrollment URL - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -885,7 +947,7 @@ Create Enrollment URL curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -903,7 +965,7 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url ### Beta User Profile -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -917,16 +979,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -951,13 +1003,31 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Beta User Profile Enrollment URL diff --git a/content/en/api/beta/user_profiles/create.md b/content/en/api/beta/user_profiles/create.md index de4314d21e..1ed8ecd717 100644 --- a/content/en/api/beta/user_profiles/create.md +++ b/content/en/api/beta/user_profiles/create.md @@ -17,7 +17,7 @@ Create User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -87,6 +89,14 @@ Create User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. Maximum 255 characters. @@ -97,7 +107,7 @@ Create User Profile - `name: optional string or null` - Display name of the entity this profile represents. Required when relationship is `resold` (the resold-to company's name); optional otherwise. Maximum 255 characters. + Optional for all profiles. Real-world name of the entity this profile represents (company or individual); for a resold-to company (`relationship` `resold` / `access_type` `passthrough`), that company's name where known. Maximum 255 characters. - `relationship: optional "external" or "resold" or "internal"` @@ -111,7 +121,7 @@ Create User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -125,16 +135,6 @@ Create User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -159,13 +159,31 @@ Create User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -173,7 +191,7 @@ Create User Profile curl https://api.anthropic.com/v1/user_profiles \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345", @@ -188,7 +206,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -196,7 +213,9 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` diff --git a/content/en/api/beta/user_profiles/create_enrollment_url.md b/content/en/api/beta/user_profiles/create_enrollment_url.md index ca9d490a4d..a63ac20968 100644 --- a/content/en/api/beta/user_profiles/create_enrollment_url.md +++ b/content/en/api/beta/user_profiles/create_enrollment_url.md @@ -21,7 +21,7 @@ Create Enrollment URL - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Create Enrollment URL - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -113,7 +115,7 @@ Create Enrollment URL curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID/enrollment_url \ -X POST \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` diff --git a/content/en/api/beta/user_profiles/list.md b/content/en/api/beta/user_profiles/list.md index e27d63cf06..d45c40ffbc 100644 --- a/content/en/api/beta/user_profiles/list.md +++ b/content/en/api/beta/user_profiles/list.md @@ -35,7 +35,7 @@ List User Profiles - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ List User Profiles - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -121,16 +123,6 @@ List User Profiles Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -155,13 +147,31 @@ List User Profiles A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` - `next_page: string or null` @@ -172,7 +182,7 @@ List User Profiles ```http curl https://api.anthropic.com/v1/user_profiles \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -185,7 +195,6 @@ curl https://api.anthropic.com/v1/user_profiles \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -193,8 +202,10 @@ curl https://api.anthropic.com/v1/user_profiles \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" diff --git a/content/en/api/beta/user_profiles/retrieve.md b/content/en/api/beta/user_profiles/retrieve.md index 0cd4ab539e..d8402cbcaf 100644 --- a/content/en/api/beta/user_profiles/retrieve.md +++ b/content/en/api/beta/user_profiles/retrieve.md @@ -21,7 +21,7 @@ Get User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,7 +93,7 @@ Get User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -105,16 +107,6 @@ Get User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -139,20 +131,38 @@ Get User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example ```http curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" ``` @@ -163,7 +173,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -171,7 +180,9 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` diff --git a/content/en/api/beta/user_profiles/update.md b/content/en/api/beta/user_profiles/update.md index 0575728908..0e8a9c4008 100644 --- a/content/en/api/beta/user_profiles/update.md +++ b/content/en/api/beta/user_profiles/update.md @@ -21,7 +21,7 @@ Update User Profile - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update User Profile - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -91,6 +93,14 @@ Update User Profile ### Body Parameters +- `access_type: optional "application" or "passthrough" or null` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` If present, replaces the stored external_id. Omit to leave unchanged. Maximum 255 characters. @@ -115,7 +125,7 @@ Update User Profile ### Returns -- `BetaUserProfile object { id, created_at, metadata, 6 more }` +- `BetaUserProfile object { id, created_at, metadata, 7 more }` - `id: string` @@ -129,16 +139,6 @@ Update User Profile Arbitrary key-value metadata. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars. - - `relationship: "external" or "resold" or "internal"` - - How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. - - - `"external"` - - - `"resold"` - - - `"internal"` - - `trust_grants: map[BetaUserProfileTrustGrant]` Trust grants for this profile, keyed by grant name. Key omitted when no grant is active or in flight. @@ -163,13 +163,31 @@ Update User Profile A timestamp in RFC 3339 format + - `access_type: optional "application" or "passthrough"` + + How the platform uses the API on behalf of the entity this profile represents. `application`: the platform sells a product that uses the API behind the scenes, and the profile represents an individual end-user of that product. `passthrough`: the platform resells raw inference, and the profile identifies the resold-to company. + + - `"application"` + + - `"passthrough"` + - `external_id: optional string or null` Platform's own identifier for this user. Not enforced unique. - `name: optional string or null` - Display name of the entity this profile represents. For `resold` this is the resold-to company's name. + Real-world name of the entity this profile represents (company or individual). For a resold-to company (`access_type` `passthrough`, or `relationship` `resold` under the `user-profiles-2026-03-24` header) this is that company's name. + + - `relationship: optional "external" or "resold" or "internal"` + + How the entity behind a user profile relates to the platform that owns the API key. `external`: an individual end-user of the platform. `resold`: a company the platform resells Claude access to. `internal`: the platform's own usage. + + - `"external"` + + - `"resold"` + + - `"internal"` ### Example @@ -177,7 +195,7 @@ Update User Profile curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \ - -H 'anthropic-beta: user-profiles-2026-03-24' \ + -H 'anthropic-beta: user-profiles-2026-08-18' \ -H "X-Api-Key: $ANTHROPIC_API_KEY" \ -d '{ "external_id": "user_12345" @@ -191,7 +209,6 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ "id": "uprof_011CZkZCu8hGbp5mYRQgUmz9", "created_at": "2026-03-15T10:00:00Z", "metadata": {}, - "relationship": "external", "trust_grants": { "cyber": { "status": "active" @@ -199,7 +216,9 @@ curl https://api.anthropic.com/v1/user_profiles/$USER_PROFILE_ID \ }, "type": "user_profile", "updated_at": "2026-03-15T10:00:00Z", + "access_type": "application", "external_id": "user_12345", - "name": "Example User" + "name": "Example User", + "relationship": "external" } ``` diff --git a/content/en/api/beta/vaults.md b/content/en/api/beta/vaults.md index b4ec40ef58..4ff14d0953 100644 --- a/content/en/api/beta/vaults.md +++ b/content/en/api/beta/vaults.md @@ -19,7 +19,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -65,6 +65,8 @@ Create Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -191,7 +193,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -237,6 +239,8 @@ List Vaults - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -345,7 +349,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -391,6 +395,8 @@ Get Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -490,7 +496,7 @@ Update Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -536,6 +542,8 @@ Update Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -652,7 +660,7 @@ Delete Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -698,6 +706,8 @@ Delete Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -771,7 +781,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -817,6 +827,8 @@ Archive Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -969,7 +981,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1015,6 +1027,8 @@ Create Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1439,7 +1453,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1485,6 +1499,8 @@ List Credentials - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1732,7 +1748,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1778,6 +1794,8 @@ Get Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2016,7 +2034,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2062,6 +2080,8 @@ Update Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2437,7 +2457,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2483,6 +2503,8 @@ Delete Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2558,7 +2580,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2604,6 +2626,8 @@ Archive Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -2843,7 +2867,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -2889,6 +2913,8 @@ Validate Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/archive.md b/content/en/api/beta/vaults/archive.md index 37e7d3fcf3..1ce9cbc371 100644 --- a/content/en/api/beta/vaults/archive.md +++ b/content/en/api/beta/vaults/archive.md @@ -21,7 +21,7 @@ Archive Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Archive Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/create.md b/content/en/api/beta/vaults/create.md index 9438257a62..7f265c90c7 100644 --- a/content/en/api/beta/vaults/create.md +++ b/content/en/api/beta/vaults/create.md @@ -17,7 +17,7 @@ Create Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -63,6 +63,8 @@ Create Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials.md b/content/en/api/beta/vaults/credentials.md index ed923a0b04..4a4072d8ed 100644 --- a/content/en/api/beta/vaults/credentials.md +++ b/content/en/api/beta/vaults/credentials.md @@ -23,7 +23,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Create Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -493,7 +495,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -539,6 +541,8 @@ List Credentials - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -786,7 +790,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -832,6 +836,8 @@ Get Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1070,7 +1076,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1116,6 +1122,8 @@ Update Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1491,7 +1499,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1537,6 +1545,8 @@ Delete Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1612,7 +1622,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1658,6 +1668,8 @@ Archive Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -1897,7 +1909,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -1943,6 +1955,8 @@ Validate Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/archive.md b/content/en/api/beta/vaults/credentials/archive.md index 19bd66ba29..2131cf31b7 100644 --- a/content/en/api/beta/vaults/credentials/archive.md +++ b/content/en/api/beta/vaults/credentials/archive.md @@ -23,7 +23,7 @@ Archive Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Archive Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/create.md b/content/en/api/beta/vaults/credentials/create.md index 2e62126ffc..5eefa9acf5 100644 --- a/content/en/api/beta/vaults/credentials/create.md +++ b/content/en/api/beta/vaults/credentials/create.md @@ -21,7 +21,7 @@ Create Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Create Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/delete.md b/content/en/api/beta/vaults/credentials/delete.md index cb4b13ef59..0802933e6c 100644 --- a/content/en/api/beta/vaults/credentials/delete.md +++ b/content/en/api/beta/vaults/credentials/delete.md @@ -23,7 +23,7 @@ Delete Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Delete Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/list.md b/content/en/api/beta/vaults/credentials/list.md index 8c962d49d7..9656686d82 100644 --- a/content/en/api/beta/vaults/credentials/list.md +++ b/content/en/api/beta/vaults/credentials/list.md @@ -35,7 +35,7 @@ List Credentials - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ List Credentials - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md b/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md index 7e3423dd20..34b1264c38 100644 --- a/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md +++ b/content/en/api/beta/vaults/credentials/mcp_oauth_validate.md @@ -23,7 +23,7 @@ Validate Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Validate Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/retrieve.md b/content/en/api/beta/vaults/credentials/retrieve.md index eec669a322..34aee5697c 100644 --- a/content/en/api/beta/vaults/credentials/retrieve.md +++ b/content/en/api/beta/vaults/credentials/retrieve.md @@ -23,7 +23,7 @@ Get Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Get Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/credentials/update.md b/content/en/api/beta/vaults/credentials/update.md index d74f6d84f8..9f0810bd59 100644 --- a/content/en/api/beta/vaults/credentials/update.md +++ b/content/en/api/beta/vaults/credentials/update.md @@ -23,7 +23,7 @@ Update Credential - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Update Credential - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/delete.md b/content/en/api/beta/vaults/delete.md index 202c4d25f3..a3ffca482e 100644 --- a/content/en/api/beta/vaults/delete.md +++ b/content/en/api/beta/vaults/delete.md @@ -21,7 +21,7 @@ Delete Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Delete Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/list.md b/content/en/api/beta/vaults/list.md index f16dd88341..1e3ef161d4 100644 --- a/content/en/api/beta/vaults/list.md +++ b/content/en/api/beta/vaults/list.md @@ -31,7 +31,7 @@ List Vaults - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -77,6 +77,8 @@ List Vaults - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/retrieve.md b/content/en/api/beta/vaults/retrieve.md index 02997bfdee..966fb2fd7c 100644 --- a/content/en/api/beta/vaults/retrieve.md +++ b/content/en/api/beta/vaults/retrieve.md @@ -21,7 +21,7 @@ Get Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Get Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/beta/vaults/update.md b/content/en/api/beta/vaults/update.md index 774abd5e92..c895f71e1e 100644 --- a/content/en/api/beta/vaults/update.md +++ b/content/en/api/beta/vaults/update.md @@ -21,7 +21,7 @@ Update Vault - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Update Vault - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/completions.md b/content/en/api/completions.md index f86e385449..eb2c597e25 100644 --- a/content/en/api/completions.md +++ b/content/en/api/completions.md @@ -23,7 +23,7 @@ Future models and features will not be compatible with Text Completions. See our - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -69,6 +69,8 @@ Future models and features will not be compatible with Text Completions. See our - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/completions/create.md b/content/en/api/completions/create.md index f9dbfe4341..6adc7f5d65 100644 --- a/content/en/api/completions/create.md +++ b/content/en/api/completions/create.md @@ -21,7 +21,7 @@ Future models and features will not be compatible with Text Completions. See our - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -67,6 +67,8 @@ Future models and features will not be compatible with Text Completions. See our - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` diff --git a/content/en/api/errors.md b/content/en/api/errors.md index 833dbb5d62..42b0f880b0 100644 --- a/content/en/api/errors.md +++ b/content/en/api/errors.md @@ -8,7 +8,7 @@ description: Understand the HTTP status codes, error response shape, and request The API follows a predictable HTTP error code format: -* 400 - `invalid_request_error`: There was an issue with the format or content of your request. This error type may also be used for other 4XX status codes not listed in this section. +* 400 - `invalid_request_error`: There was an issue with the format or content of your request. This error type may also be used for other 4XX status codes not listed in this section. The API also returns a 400 when usage reaches an organization or workspace [spend limit you set](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit), except limits on the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace), which can return a 429 instead. * 401 - `authentication_error`: There's an issue with your API key (for example, it's malformed, revoked, or expired; see [Key expiration](https://platform.claude.com/docs/en/manage-claude/authentication#key-expiration)). On Claude Platform on AWS, this can also indicate a problem with your AWS credentials or SigV4 signature. @@ -22,7 +22,7 @@ The API follows a predictable HTTP error code format: * 413 - `request_too_large`: Request exceeds the maximum allowed number of bytes. See [Request size limits](https://platform.claude.com/docs/en/api/errors#request-size-limits) for per-endpoint maximums. -* 429 - `rate_limit_error`: Your account has hit a rate limit. +* 429 - `rate_limit_error`: Your organization has hit a [rate limit](https://platform.claude.com/docs/en/api/rate-limits), reached its usage tier's monthly spend cap, or reached a spend limit on the Claude Code workspace. A tier spend-cap 429 has no `retry-after` header and keeps failing until access resumes; see [Reaching your spend cap](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) for how to recognize it. * 500 - `api_error`: An unexpected error has occurred internal to Anthropic's systems. Retry the request with exponential backoff; if the error persists, contact support with the [request ID](https://platform.claude.com/docs/en/api/errors#request-id). diff --git a/content/en/api/files.md b/content/en/api/files.md new file mode 100644 index 0000000000..c027a006fc --- /dev/null +++ b/content/en/api/files.md @@ -0,0 +1,380 @@ +--- +title: Files +url: https://platform.claude.com/docs/en/api/files +--- + +# Files + +## Upload File + +**post** `/v1/files` + +Upload File + +### Returns + +- `FileMetadata object { id, created_at, filename, 5 more }` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +### Example + +```http +curl https://api.anthropic.com/v1/files \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F 'file=@/path/to/file' +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" +} +``` + +## List Files + +**get** `/v1/files` + +List Files + +### Query Parameters + +- `ids: optional array of string` + + Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted. + +- `limit: optional number` + + Number of items to return per page. + + Defaults to `20`. Ranges from `1` to `1000`. + +- `page: optional string` + + Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`. + +### Returns + +- `data: array of FileMetadata` + + List of file metadata objects. + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +- `next_page: optional string or null` + + Opaque cursor for the next page. Supply as `?page=` to fetch the next page; null when there are no more results. + +### Example + +```http +curl https://api.anthropic.com/v1/files \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" + } + ], + "next_page": "next_page" +} +``` + +## Download File + +**get** `/v1/files/{file_id}/content` + +Download File + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID/content \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +## Get File Metadata + +**get** `/v1/files/{file_id}` + +Get File Metadata + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Returns + +- `FileMetadata object { id, created_at, filename, 5 more }` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" +} +``` + +## Delete File + +**delete** `/v1/files/{file_id}` + +Delete File + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Returns + +- `DeletedFile object { id, type }` + + - `id: string` + + ID of the deleted file. + + - `type: optional "file_deleted"` + + Deleted object type. + + For file deletion, this is always `"file_deleted"`. + + - `"file_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "type": "file_deleted" +} +``` + +## Domain Types + +### Deleted File + +- `DeletedFile object { id, type }` + + - `id: string` + + ID of the deleted file. + + - `type: optional "file_deleted"` + + Deleted object type. + + For file deletion, this is always `"file_deleted"`. + + - `"file_deleted"` + +### File Metadata + +- `FileMetadata object { id, created_at, filename, 5 more }` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. diff --git a/content/en/api/files/delete.md b/content/en/api/files/delete.md new file mode 100644 index 0000000000..9c05a8a1bc --- /dev/null +++ b/content/en/api/files/delete.md @@ -0,0 +1,50 @@ +--- +title: Delete File +url: https://platform.claude.com/docs/en/api/files/delete +--- + +## Delete File + +**delete** `/v1/files/{file_id}` + +Delete File + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Returns + +- `DeletedFile object { id, type }` + + - `id: string` + + ID of the deleted file. + + - `type: optional "file_deleted"` + + Deleted object type. + + For file deletion, this is always `"file_deleted"`. + + - `"file_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "type": "file_deleted" +} +``` diff --git a/content/en/api/files/download.md b/content/en/api/files/download.md new file mode 100644 index 0000000000..954052b124 --- /dev/null +++ b/content/en/api/files/download.md @@ -0,0 +1,24 @@ +--- +title: Download File +url: https://platform.claude.com/docs/en/api/files/download +--- + +## Download File + +**get** `/v1/files/{file_id}/content` + +Download File + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID/content \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` diff --git a/content/en/api/files/list.md b/content/en/api/files/list.md new file mode 100644 index 0000000000..124d670f0f --- /dev/null +++ b/content/en/api/files/list.md @@ -0,0 +1,102 @@ +--- +title: List Files +url: https://platform.claude.com/docs/en/api/files/list +--- + +## List Files + +**get** `/v1/files` + +List Files + +### Query Parameters + +- `ids: optional array of string` + + Restrict the result set to Files whose `id` is in this list. At most 100 entries (after de-duplication). Mutually exclusive with `page` and `limit`. When supplied, the response is always a single page (`next_page` is null). IDs that do not resolve to a visible File — including deleted Files — are silently omitted. + +- `limit: optional number` + + Number of items to return per page. + + Defaults to `20`. Ranges from `1` to `1000`. + +- `page: optional string` + + Opaque page cursor returned in a prior list response's `next_page`. Prefixed `page_`. + +### Returns + +- `data: array of FileMetadata` + + List of file metadata objects. + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +- `next_page: optional string or null` + + Opaque cursor for the next page. Supply as `?page=` to fetch the next page; null when there are no more results. + +### Example + +```http +curl https://api.anthropic.com/v1/files \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" + } + ], + "next_page": "next_page" +} +``` diff --git a/content/en/api/files/retrieve_metadata.md b/content/en/api/files/retrieve_metadata.md new file mode 100644 index 0000000000..8c3d462b4d --- /dev/null +++ b/content/en/api/files/retrieve_metadata.md @@ -0,0 +1,81 @@ +--- +title: Get File Metadata +url: https://platform.claude.com/docs/en/api/files/retrieve_metadata +--- + +## Get File Metadata + +**get** `/v1/files/{file_id}` + +Get File Metadata + +### Path Parameters + +- `file_id: string` + + ID of the File. + +### Returns + +- `FileMetadata object { id, created_at, filename, 5 more }` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +### Example + +```http +curl https://api.anthropic.com/v1/files/$FILE_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" +} +``` diff --git a/content/en/api/files/upload.md b/content/en/api/files/upload.md new file mode 100644 index 0000000000..1ae166c56c --- /dev/null +++ b/content/en/api/files/upload.md @@ -0,0 +1,77 @@ +--- +title: Upload File +url: https://platform.claude.com/docs/en/api/files/upload +--- + +## Upload File + +**post** `/v1/files` + +Upload File + +### Returns + +- `FileMetadata object { id, created_at, filename, 5 more }` + + - `id: string` + + Unique object identifier. + + The format and length of IDs may change over time. + + - `created_at: string` + + RFC 3339 datetime string representing when the file was created. + + - `filename: string` + + Original filename of the uploaded file. + + - `mime_type: string` + + MIME type of the file. + + - `size_bytes: number` + + Size of the file in bytes. + + - `type: "file"` + + Object type. + + For files, this is always `"file"`. + + - `"file"` + + - `downloadable: optional boolean` + + Whether the file can be downloaded. + + - `expires_at: optional string or null` + + RFC 3339 datetime string representing when the file will expire and become unavailable for download. Null if the file does not expire. For files uploaded with `expires_in_seconds`, this is the upload time plus that value. + +### Example + +```http +curl https://api.anthropic.com/v1/files \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F 'file=@/path/to/file' +``` + +#### Response + +```json +{ + "id": "file_011CNha8iCJcU1wXNR6q4V8w", + "created_at": "2025-04-15T18:37:24.100435Z", + "filename": "document.pdf", + "mime_type": "application/pdf", + "size_bytes": 102400, + "type": "file", + "downloadable": false, + "expires_at": "2025-05-15T18:37:24.100435Z" +} +``` diff --git a/content/en/api/messages.md b/content/en/api/messages.md index ec254f4051..0cf07264f4 100644 --- a/content/en/api/messages.md +++ b/content/en/api/messages.md @@ -227,9 +227,9 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `source: Base64ImageSource or URLImageSource` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }` @@ -257,6 +257,14 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"` @@ -265,9 +273,21 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }` @@ -303,7 +323,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -317,6 +337,14 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"` @@ -387,7 +415,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -433,7 +461,11 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -445,15 +477,15 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }` @@ -473,8 +505,135 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -918,35 +1077,6 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"` @@ -1033,10 +1163,40 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. -- `container: optional string or null` +- `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` + - `inference_geo: optional string or null` Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. @@ -1551,19 +1711,16 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs - - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - - `name: "memory"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"memory"` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - - `type: "memory_20250818"` + - `type: "browser_toolset_20260801"` - - `"memory_20250818"` + - `"browser_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -1579,385 +1736,400 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `configs: optional BrowserToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `input_examples: optional array of map[unknown]` + - `close_tab: optional BrowserCloseTabConfig or null` - - `strict: optional boolean` + `close_tab`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "str_replace_editor"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `double_click: optional BrowserDoubleClickConfig or null` - - `"str_replace_editor"` + `double_click`'s config overrides. - - `type: "text_editor_20250124"` + - `defer_loading: optional boolean or null` - - `"text_editor_20250124"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `file_upload: optional BrowserFileUploadConfig or null` - - `"code_execution_20260120"` + `file_upload`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `find: optional BrowserFindConfig or null` - - `input_examples: optional array of map[unknown]` + `find`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + - `enabled: optional boolean or null` - - `name: "str_replace_based_edit_tool"` + 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. - Name of the tool. + - `form_input: optional BrowserFormInputConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `form_input`'s config overrides. - - `"str_replace_based_edit_tool"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_20250429"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_20250429"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `get_page_text: optional BrowserGetPageTextConfig or null` - - `"code_execution_20250825"` + `get_page_text`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `hold_key: optional BrowserHoldKeyConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `hold_key`'s config overrides. - - `input_examples: optional array of map[unknown]` + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` - - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + 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. - - `name: "str_replace_based_edit_tool"` + - `hover: optional BrowserHoverConfig or null` - Name of the tool. + `hover`'s config overrides. - This is how the tool will be called by the model and in `tool_use` blocks. + - `defer_loading: optional boolean or null` - - `"str_replace_based_edit_tool"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "text_editor_20250728"` + - `enabled: optional boolean or null` - - `"text_editor_20250728"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `javascript_exec: optional BrowserJavascriptExecConfig or null` - - `"direct"` + `javascript_exec`'s config overrides. - - `"code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `key: optional BrowserKeyConfig or null` - - `defer_loading: optional boolean` + `key`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `max_characters: optional number or null` + - `enabled: optional boolean or null` - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + 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. - - `strict: optional boolean` + - `left_click: optional BrowserLeftClickConfig or null` - When true, guarantees schema validation on tool names and inputs + `left_click`'s config overrides. - - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + - `defer_loading: optional boolean or null` - - `name: "web_search"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"web_search"` + - `left_click_drag: optional BrowserLeftClickDragConfig or null` - - `type: "web_search_20250305"` + `left_click_drag`'s config overrides. - - `"web_search_20250305"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` - - `"code_execution_20260521"` + `left_mouse_down`'s config overrides. - - `allowed_domains: optional array of string or null` + - `defer_loading: optional boolean or null` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `blocked_domains: optional array of string or null` + - `enabled: optional boolean or null` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` - Create a cache control breakpoint at this content block. + `left_mouse_up`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `max_uses: optional number or null` + - `enabled: optional boolean or null` - Maximum number of times the tool can be used in the API request. + 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. - - `strict: optional boolean` + - `list_tabs: optional BrowserListTabsConfig or null` - When true, guarantees schema validation on tool names and inputs + `list_tabs`'s config overrides. - - `user_location: optional UserLocation or null` + - `defer_loading: optional boolean or null` - Parameters for the user's location. Used to provide more relevant search results. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "approximate"` + - `enabled: optional boolean or null` - - `"approximate"` + 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. - - `city: optional string or null` + - `middle_click: optional BrowserMiddleClickConfig or null` - The city of the user. + `middle_click`'s config overrides. - - `country: optional string or null` + - `defer_loading: optional boolean or null` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `region: optional string or null` + - `enabled: optional boolean or null` - The region of the user. + 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. - - `timezone: optional string or null` + - `mouse_move: optional BrowserMouseMoveConfig or null` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + `mouse_move`'s config overrides. - - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + - `defer_loading: optional boolean or null` - - `name: "web_fetch"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"web_fetch"` + - `navigate: optional BrowserNavigateConfig or null` - - `type: "web_fetch_20250910"` + `navigate`'s config overrides. - - `"web_fetch_20250910"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `new_tab: optional BrowserNewTabConfig or null` - - `"code_execution_20260521"` + `new_tab`'s config overrides. - - `allowed_domains: optional array of string or null` + - `defer_loading: optional boolean or null` - List of domains to allow fetching from + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `blocked_domains: optional array of string or null` + - `enabled: optional boolean or null` - List of domains to block fetching from + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `read_console: optional BrowserReadConsoleConfig or null` - Create a cache control breakpoint at this content block. + `read_console`'s config overrides. - - `citations: optional CitationsConfigParam or null` + - `defer_loading: optional boolean or null` - Citations configuration for fetched documents. Citations are disabled by default. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `defer_loading: optional boolean` + - `enabled: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 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. - - `max_content_tokens: optional number or null` + - `read_network: optional BrowserReadNetworkConfig or null` - 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. + `read_network`'s config overrides. - - `max_uses: optional number or null` + - `defer_loading: optional boolean or null` - Maximum number of times the tool can be used in the API request. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + - `read_page: optional BrowserReadPageConfig or null` - - `name: "web_search"` + `read_page`'s config overrides. - Name of the tool. + - `defer_loading: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_search"` + - `enabled: optional boolean or null` - - `type: "web_search_20260209"` + 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. - - `"web_search_20260209"` + - `right_click: optional BrowserRightClickConfig or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + `right_click`'s config overrides. - - `"direct"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250825"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260120"` + - `enabled: optional boolean or null` - - `"code_execution_20260521"` + 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. - - `allowed_domains: optional array of string or null` + - `screenshot: optional BrowserScreenshotConfig or null` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + `screenshot`'s config overrides. - - `blocked_domains: optional array of string or null` + - `defer_loading: optional boolean or null` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `scroll: optional BrowserScrollConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `scroll`'s config overrides. - - `max_uses: optional number or null` + - `defer_loading: optional boolean or null` - Maximum number of times the tool can be used in the API request. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `user_location: optional UserLocation or null` + - `scroll_to: optional BrowserScrollToConfig or null` - Parameters for the user's location. Used to provide more relevant search results. + `scroll_to`'s config overrides. - - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` + - `defer_loading: optional boolean or null` - - `name: "web_fetch"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Name of the tool. + - `enabled: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"web_fetch"` + - `switch_tab: optional BrowserSwitchTabConfig or null` - - `type: "web_fetch_20260209"` + `switch_tab`'s config overrides. - - `"web_fetch_20260209"` + - `defer_loading: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"direct"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `triple_click: optional BrowserTripleClickConfig or null` - - `"code_execution_20260521"` + `triple_click`'s config overrides. - - `allowed_domains: optional array of string or null` + - `defer_loading: optional boolean or null` - List of domains to allow fetching from + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `blocked_domains: optional array of string or null` + - `enabled: optional boolean or null` - List of domains to block fetching from + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `type: optional BrowserTypeConfig or null` - Create a cache control breakpoint at this content block. + `type`'s config overrides. - - `citations: optional CitationsConfigParam or null` + - `defer_loading: optional boolean or null` - Citations configuration for fetched documents. Citations are disabled by default. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `defer_loading: optional boolean` + - `enabled: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 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. - - `max_content_tokens: optional number or null` + - `wait: optional BrowserWaitConfig or null` - 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. + `wait`'s config overrides. - - `max_uses: optional number or null` + - `defer_loading: optional boolean or null` - Maximum number of times the tool can be used in the API request. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + - `zoom: optional BrowserZoomConfig or null` - Web fetch tool with use_cache parameter for bypassing cached content. + `zoom`'s config overrides. - - `name: "web_fetch"` + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + + - `name: "memory"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"web_fetch"` + - `"memory"` - - `type: "web_fetch_20260309"` + - `type: "memory_20250818"` - - `"web_fetch_20260309"` + - `"memory_20250818"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -1969,185 +2141,275 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260521"` - - `allowed_domains: optional array of string or null` + - `cache_control: optional CacheControlEphemeral or null` - List of domains to allow fetching from + Create a cache control breakpoint at this content block. - - `blocked_domains: optional array of string or null` + - `defer_loading: optional boolean` - List of domains to block fetching from + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` - `cache_control: optional CacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `citations: optional CitationsConfigParam or null` + - `configs: optional ComputerToolsetConfigs or null` - Citations configuration for fetched documents. Citations are disabled by default. + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `defer_loading: optional boolean` + - `cursor_position: optional ComputerCursorPositionConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `cursor_position`'s config overrides. - - `max_content_tokens: optional number or null` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `max_uses: optional number or null` + - `enabled: optional boolean or null` - Maximum number of times the tool can be used in the API request. + 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. - - `strict: optional boolean` + - `double_click: optional ComputerDoubleClickConfig or null` - When true, guarantees schema validation on tool names and inputs + `double_click`'s config overrides. - - `use_cache: optional boolean` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + - `enabled: optional boolean or null` - - `name: "web_search"` + 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. - Name of the tool. + - `hold_key: optional ComputerHoldKeyConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `hold_key`'s config overrides. - - `"web_search"` + - `defer_loading: optional boolean or null` - - `type: "web_search_20260318"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_search_20260318"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `key: optional ComputerKeyConfig or null` - - `"code_execution_20250825"` + `key`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_domains: optional array of string or null` + - `enabled: optional boolean or null` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + 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. - - `blocked_domains: optional array of string or null` + - `left_click: optional ComputerLeftClickConfig or null` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + `left_click`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `defer_loading: optional boolean` + - `enabled: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 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. - - `max_uses: optional number or null` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - Maximum number of times the tool can be used in the API request. + `left_click_drag`'s config overrides. - - `response_inclusion: optional "full" or "excluded"` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"full"` + - `enabled: optional boolean or null` - - `"excluded"` + 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. - - `strict: optional boolean` + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - When true, guarantees schema validation on tool names and inputs + `left_mouse_down`'s config overrides. - - `user_location: optional UserLocation or null` + - `defer_loading: optional boolean or null` - Parameters for the user's location. Used to provide more relevant search results. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + - `enabled: optional boolean or null` - - `name: "web_fetch"` + 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. - Name of the tool. + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `left_mouse_up`'s config overrides. - - `"web_fetch"` + - `defer_loading: optional boolean or null` - - `type: "web_fetch_20260318"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_fetch_20260318"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `middle_click: optional ComputerMiddleClickConfig or null` - - `"code_execution_20250825"` + `middle_click`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_domains: optional array of string or null` + - `enabled: optional boolean or null` - List of domains to allow fetching from + 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. - - `blocked_domains: optional array of string or null` + - `mouse_move: optional ComputerMouseMoveConfig or null` - List of domains to block fetching from + `mouse_move`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `citations: optional CitationsConfigParam or null` + - `enabled: optional boolean or null` - Citations configuration for fetched documents. Citations are disabled by default. + 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. - - `defer_loading: optional boolean` + - `right_click: optional ComputerRightClickConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `right_click`'s config overrides. - - `max_content_tokens: optional number or null` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `max_uses: optional number or null` + - `enabled: optional boolean or null` - Maximum number of times the tool can be used in the API request. + 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. - - `response_inclusion: optional "full" or "excluded"` + - `screenshot: optional ComputerScreenshotConfig or null` - 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. + `screenshot`'s config overrides. - - `"full"` + - `defer_loading: optional boolean or null` - - `"excluded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `use_cache: optional boolean` + - `scroll: optional ComputerScrollConfig or null` - 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. + `scroll`'s config overrides. - - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + - `defer_loading: optional boolean or null` - - `name: "tool_search_tool_bm25"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + + - `name: "str_replace_editor"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"tool_search_tool_bm25"` - - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + - `"str_replace_editor"` - - `"tool_search_tool_bm25_20251119"` + - `type: "text_editor_20250124"` - - `"tool_search_tool_bm25"` + - `"text_editor_20250124"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -2167,25 +2429,25 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `input_examples: optional array of map[unknown]` + - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs - - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` - - `name: "tool_search_tool_regex"` + - `name: "str_replace_based_edit_tool"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"tool_search_tool_regex"` - - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + - `"str_replace_based_edit_tool"` - - `"tool_search_tool_regex_20251119"` + - `type: "text_editor_20250429"` - - `"tool_search_tool_regex"` + - `"text_editor_20250429"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -2205,1065 +2467,1642 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `input_examples: optional array of map[unknown]` + - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs -- `top_k: optional number` + - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` - Only sample from the top K options for each subsequent token. + - `name: "str_replace_based_edit_tool"` - Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). + Name of the tool. - Recommended for advanced use cases only. + This is how the tool will be called by the model and in `tool_use` blocks. -- `top_p: optional number` + - `"str_replace_based_edit_tool"` - Use nucleus sampling. + - `type: "text_editor_20250728"` - 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`. + - `"text_editor_20250728"` - Recommended for advanced use cases only. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -### Returns + - `"direct"` -- `Message object { id, container, content, 7 more }` + - `"code_execution_20250825"` - - `id: string` + - `"code_execution_20260120"` - Unique object identifier. + - `"code_execution_20260521"` - The format and length of IDs may change over time. + - `cache_control: optional CacheControlEphemeral or null` - - `container: Container or null` + Create a cache control breakpoint at this content block. - Information about the container used in the request (for the code execution tool) + - `defer_loading: optional boolean` - - `id: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - Identifier for the container used in this request + - `input_examples: optional array of map[unknown]` - - `expires_at: string` + - `max_characters: optional number or null` - The time at which the container will expire. + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. - - `content: array of ContentBlock` + - `strict: optional boolean` - Content generated by the model. + When true, guarantees schema validation on tool names and inputs - This is an array of content blocks, each of which has a `type` that determines its shape. + - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` - Example: + - `name: "web_search"` - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + Name of the tool. - 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. + This is how the tool will be called by the model and in `tool_use` blocks. - For example, if the input `messages` were: + - `"web_search"` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + - `type: "web_search_20250305"` - Then the response `content` might be: + - `"web_search_20250305"` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `TextBlock object { citations, text, type }` + - `"direct"` - - `citations: array of TextCitation or null` + - `"code_execution_20250825"` - Citations supporting the text block. + - `"code_execution_20260120"` - 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`. + - `"code_execution_20260521"` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `allowed_domains: optional array of string or null` - - `cited_text: string` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `document_index: number` + - `blocked_domains: optional array of string or null` - - `document_title: string or null` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `end_char_index: number` + - `cache_control: optional CacheControlEphemeral or null` - - `file_id: string or null` + Create a cache control breakpoint at this content block. - - `start_char_index: number` + - `defer_loading: optional boolean` - - `type: "char_location"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"char_location"` + - `max_uses: optional number or null` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + Maximum number of times the tool can be used in the API request. - - `cited_text: string` + - `strict: optional boolean` - - `document_index: number` + When true, guarantees schema validation on tool names and inputs - - `document_title: string or null` + - `user_location: optional UserLocation or null` - - `end_page_number: number` + Parameters for the user's location. Used to provide more relevant search results. - - `file_id: string or null` + - `type: "approximate"` - - `start_page_number: number` + - `"approximate"` - - `type: "page_location"` + - `city: optional string or null` - - `"page_location"` + The city of the user. - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `country: optional string or null` - - `cited_text: string` + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. - The full text of the cited block range, concatenated. + - `region: optional string or null` - 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. + The region of the user. - - `document_index: number` + - `timezone: optional string or null` - - `document_title: string or null` + The [IANA timezone](https://nodatime.org/TimeZones) of the user. - - `end_block_index: number` + - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `name: "web_fetch"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Name of the tool. - - `file_id: string or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `start_block_index: number` + - `"web_fetch"` - 0-based index of the first cited block in the source's `content` array. + - `type: "web_fetch_20250910"` - - `type: "content_block_location"` + - `"web_fetch_20250910"` - - `"content_block_location"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"direct"` - - `cited_text: string` + - `"code_execution_20250825"` - - `encrypted_index: string` + - `"code_execution_20260120"` - - `title: string or null` + - `"code_execution_20260521"` - - `type: "web_search_result_location"` + - `allowed_domains: optional array of string or null` - - `"web_search_result_location"` + List of domains to allow fetching from - - `url: string` + - `blocked_domains: optional array of string or null` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + List of domains to block fetching from - - `cited_text: string` + - `cache_control: optional CacheControlEphemeral or null` - The full text of the cited block range, concatenated. + Create a cache control breakpoint at this content block. - 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. + - `citations: optional CitationsConfigParam or null` - - `end_block_index: number` + Citations configuration for fetched documents. Citations are disabled by default. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `defer_loading: optional boolean` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `search_result_index: number` + - `max_content_tokens: optional number or null` - 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. + 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. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `max_uses: optional number or null` - - `source: string` + Maximum number of times the tool can be used in the API request. - - `start_block_index: number` + - `strict: optional boolean` - 0-based index of the first cited block in the source's `content` array. + When true, guarantees schema validation on tool names and inputs - - `title: string or null` + - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` - - `type: "search_result_location"` + - `name: "web_search"` - - `"search_result_location"` + Name of the tool. - - `text: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "text"` + - `"web_search"` - - `"text"` + - `type: "web_search_20260209"` - - `ThinkingBlock object { signature, thinking, type }` + - `"web_search_20260209"` - - `signature: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `"direct"` - 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. + - `"code_execution_20250825"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `"code_execution_20260120"` - - `thinking: string` + - `"code_execution_20260521"` - The text of Claude's thinking process for this block. + - `allowed_domains: optional array of string or null` - - `type: "thinking"` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `"thinking"` + - `blocked_domains: optional array of string or null` - - `RedactedThinkingBlock object { data, type }` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `data: string` + - `cache_control: optional CacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `defer_loading: optional boolean` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "redacted_thinking"` + - `max_uses: optional number or null` - - `"redacted_thinking"` + Maximum number of times the tool can be used in the API request. - - `ToolUseBlock object { id, caller, input, 2 more }` + - `strict: optional boolean` - - `id: string` + When true, guarantees schema validation on tool names and inputs - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `user_location: optional UserLocation or null` - Tool invocation directly from the model. + Parameters for the user's location. Used to provide more relevant search results. - - `DirectCaller object { type }` + - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` - Tool invocation directly from the model. + - `name: "web_fetch"` - - `type: "direct"` + Name of the tool. - - `"direct"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `ServerToolCaller object { tool_id, type }` + - `"web_fetch"` - Tool invocation generated by a server-side tool. + - `type: "web_fetch_20260209"` - - `tool_id: string` + - `"web_fetch_20260209"` - - `type: "code_execution_20250825"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"code_execution_20250825"` + - `"direct"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `"code_execution_20250825"` - - `tool_id: string` + - `"code_execution_20260120"` - - `type: "code_execution_20260120"` + - `"code_execution_20260521"` - - `"code_execution_20260120"` + - `allowed_domains: optional array of string or null` - - `input: map[unknown]` + List of domains to allow fetching from - - `name: string` + - `blocked_domains: optional array of string or null` - - `type: "tool_use"` + List of domains to block fetching from - - `"tool_use"` + - `cache_control: optional CacheControlEphemeral or null` - - `ServerToolUseBlock object { id, caller, input, 2 more }` + Create a cache control breakpoint at this content block. - - `id: string` + - `citations: optional CitationsConfigParam or null` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + Citations configuration for fetched documents. Citations are disabled by default. - Tool invocation directly from the model. + - `defer_loading: optional boolean` - - `DirectCaller object { type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - Tool invocation directly from the model. + - `max_content_tokens: optional number or null` - - `ServerToolCaller object { tool_id, type }` + 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. - Tool invocation generated by a server-side tool. + - `max_uses: optional number or null` - - `ServerToolCaller20260120 object { tool_id, type }` + Maximum number of times the tool can be used in the API request. - - `input: map[unknown]` + - `strict: optional boolean` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + When true, guarantees schema validation on tool names and inputs - - `"web_search"` + - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` - - `"web_fetch"` + Web fetch tool with use_cache parameter for bypassing cached content. - - `"code_execution"` + - `name: "web_fetch"` - - `"bash_code_execution"` + Name of the tool. - - `"text_editor_code_execution"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"tool_search_tool_regex"` + - `"web_fetch"` - - `"tool_search_tool_bm25"` + - `type: "web_fetch_20260309"` - - `type: "server_tool_use"` + - `"web_fetch_20260309"` - - `"server_tool_use"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `"direct"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"code_execution_20250825"` - Tool invocation directly from the model. + - `"code_execution_20260120"` - - `DirectCaller object { type }` + - `"code_execution_20260521"` - Tool invocation directly from the model. + - `allowed_domains: optional array of string or null` - - `ServerToolCaller object { tool_id, type }` + List of domains to allow fetching from - Tool invocation generated by a server-side tool. + - `blocked_domains: optional array of string or null` - - `ServerToolCaller20260120 object { tool_id, type }` + List of domains to block fetching from - - `content: WebSearchToolResultBlockContent` + - `cache_control: optional CacheControlEphemeral or null` - - `WebSearchToolResultError object { error_code, type }` + Create a cache control breakpoint at this content block. - - `error_code: WebSearchToolResultErrorCode` + - `citations: optional CitationsConfigParam or null` - - `"invalid_tool_input"` + Citations configuration for fetched documents. Citations are disabled by default. - - `"unavailable"` + - `defer_loading: optional boolean` - - `"max_uses_exceeded"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"too_many_requests"` + - `max_content_tokens: optional number or null` - - `"query_too_long"` + 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. - - `"request_too_large"` + - `max_uses: optional number or null` - - `type: "web_search_tool_result_error"` + Maximum number of times the tool can be used in the API request. - - `"web_search_tool_result_error"` + - `strict: optional boolean` - - `array of WebSearchResultBlock` + When true, guarantees schema validation on tool names and inputs - - `encrypted_content: string` + - `use_cache: optional boolean` - - `page_age: string or null` + 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. - - `title: string` + - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` - - `type: "web_search_result"` + - `name: "web_search"` - - `"web_search_result"` + Name of the tool. - - `url: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `tool_use_id: string` + - `"web_search"` - - `type: "web_search_tool_result"` + - `type: "web_search_20260318"` - - `"web_search_tool_result"` + - `"web_search_20260318"` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"direct"` - Tool invocation directly from the model. + - `"code_execution_20250825"` - - `DirectCaller object { type }` + - `"code_execution_20260120"` - Tool invocation directly from the model. + - `"code_execution_20260521"` - - `ServerToolCaller object { tool_id, type }` + - `allowed_domains: optional array of string or null` - Tool invocation generated by a server-side tool. + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `ServerToolCaller20260120 object { tool_id, type }` + - `blocked_domains: optional array of string or null` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `error_code: WebFetchToolResultErrorCode` + Create a cache control breakpoint at this content block. - - `"invalid_tool_input"` + - `defer_loading: optional boolean` - - `"url_too_long"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"url_not_allowed"` + - `max_uses: optional number or null` - - `"url_not_in_prior_context"` + Maximum number of times the tool can be used in the API request. - - `"url_not_accessible"` + - `response_inclusion: optional "full" or "excluded"` - - `"unsupported_content_type"` + 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. - - `"too_many_requests"` + - `"full"` - - `"max_uses_exceeded"` + - `"excluded"` - - `"unavailable"` + - `strict: optional boolean` - - `type: "web_fetch_tool_result_error"` + When true, guarantees schema validation on tool names and inputs - - `"web_fetch_tool_result_error"` + - `user_location: optional UserLocation or null` - - `WebFetchBlock object { content, retrieved_at, type, url }` + Parameters for the user's location. Used to provide more relevant search results. - - `content: DocumentBlock` + - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` - - `citations: CitationsConfig or null` + - `name: "web_fetch"` - Citation configuration for the document + Name of the tool. - - `enabled: boolean` + This is how the tool will be called by the model and in `tool_use` blocks. - - `source: Base64PDFSource or PlainTextSource` + - `"web_fetch"` - - `Base64PDFSource object { data, media_type, type }` + - `type: "web_fetch_20260318"` - - `data: string` + - `"web_fetch_20260318"` - - `media_type: "application/pdf"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"application/pdf"` + - `"direct"` - - `type: "base64"` + - `"code_execution_20250825"` - - `"base64"` + - `"code_execution_20260120"` - - `PlainTextSource object { data, media_type, type }` + - `"code_execution_20260521"` - - `data: string` + - `allowed_domains: optional array of string or null` - - `media_type: "text/plain"` + List of domains to allow fetching from - - `"text/plain"` + - `blocked_domains: optional array of string or null` - - `type: "text"` + List of domains to block fetching from - - `"text"` + - `cache_control: optional CacheControlEphemeral or null` - - `title: string or null` + Create a cache control breakpoint at this content block. - The title of the document + - `citations: optional CitationsConfigParam or null` - - `type: "document"` + Citations configuration for fetched documents. Citations are disabled by default. - - `"document"` + - `defer_loading: optional boolean` - - `retrieved_at: string or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - ISO 8601 timestamp when the content was retrieved + - `max_content_tokens: optional number or null` - - `type: "web_fetch_result"` + 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. - - `"web_fetch_result"` + - `max_uses: optional number or null` - - `url: string` + Maximum number of times the tool can be used in the API request. - Fetched content URL + - `response_inclusion: optional "full" or "excluded"` - - `tool_use_id: string` + 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. - - `type: "web_fetch_tool_result"` + - `"full"` - - `"web_fetch_tool_result"` + - `"excluded"` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `strict: optional boolean` - - `content: CodeExecutionToolResultBlockContent` + When true, guarantees schema validation on tool names and inputs - Code execution result with encrypted stdout for PFC + web_search results. + - `use_cache: optional boolean` - - `CodeExecutionToolResultError object { error_code, type }` + 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. - - `error_code: CodeExecutionToolResultErrorCode` + - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` - - `"invalid_tool_input"` + - `name: "tool_search_tool_bm25"` - - `"unavailable"` + Name of the tool. - - `"too_many_requests"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"execution_time_exceeded"` + - `"tool_search_tool_bm25"` - - `type: "code_execution_tool_result_error"` + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` - - `"code_execution_tool_result_error"` + - `"tool_search_tool_bm25_20251119"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"tool_search_tool_bm25"` - - `content: array of CodeExecutionOutputBlock` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `file_id: string` + - `"direct"` - - `type: "code_execution_output"` + - `"code_execution_20250825"` - - `"code_execution_output"` + - `"code_execution_20260120"` - - `return_code: number` + - `"code_execution_20260521"` - - `stderr: string` + - `cache_control: optional CacheControlEphemeral or null` - - `stdout: string` + Create a cache control breakpoint at this content block. - - `type: "code_execution_result"` + - `defer_loading: optional boolean` - - `"code_execution_result"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `strict: optional boolean` - Code execution result with encrypted stdout for PFC + web_search results. + When true, guarantees schema validation on tool names and inputs - - `content: array of CodeExecutionOutputBlock` + - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` - - `file_id: string` + - `name: "tool_search_tool_regex"` - - `type: "code_execution_output"` + Name of the tool. - - `encrypted_stdout: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `return_code: number` + - `"tool_search_tool_regex"` - - `stderr: string` + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` - - `type: "encrypted_code_execution_result"` + - `"tool_search_tool_regex_20251119"` - - `"encrypted_code_execution_result"` + - `"tool_search_tool_regex"` - - `tool_use_id: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "code_execution_tool_result"` + - `"direct"` - - `"code_execution_tool_result"` + - `"code_execution_20250825"` - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"code_execution_20260120"` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `"code_execution_20260521"` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `error_code: BashCodeExecutionToolResultErrorCode` + Create a cache control breakpoint at this content block. - - `"invalid_tool_input"` + - `defer_loading: optional boolean` - - `"unavailable"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"too_many_requests"` + - `strict: optional boolean` - - `"execution_time_exceeded"` + When true, guarantees schema validation on tool names and inputs - - `"output_file_too_large"` +- `top_k: optional number` - - `type: "bash_code_execution_tool_result_error"` + Only sample from the top K options for each subsequent token. - - `"bash_code_execution_tool_result_error"` + Used to remove "long tail" low probability responses. [Learn more technical details here](https://towardsdatascience.com/how-to-sample-from-language-models-682bceb97277). - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + Recommended for advanced use cases only. - - `content: array of BashCodeExecutionOutputBlock` +- `top_p: optional number` - - `file_id: string` + Use nucleus sampling. - - `type: "bash_code_execution_output"` + 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`. - - `"bash_code_execution_output"` + Recommended for advanced use cases only. - - `return_code: number` +### Returns - - `stderr: string` +- `Message object { id, container, content, 7 more }` - - `stdout: string` + - `id: string` - - `type: "bash_code_execution_result"` + Unique object identifier. - - `"bash_code_execution_result"` + The format and length of IDs may change over time. - - `tool_use_id: string` + - `container: Container or null` - - `type: "bash_code_execution_tool_result"` + Information about the container used in the request (for the code execution tool) - - `"bash_code_execution_tool_result"` + - `id: string` - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Identifier for the container used in this request - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + - `expires_at: string` - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + The time at which the container will expire. - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `skills: array of ContainerSkill or null` - - `"invalid_tool_input"` + Skills loaded in the container - - `"unavailable"` + - `skill_id: string` - - `"too_many_requests"` + Skill ID - - `"execution_time_exceeded"` + - `type: "anthropic" or "custom"` - - `"file_not_found"` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `error_message: string or null` + - `"anthropic"` - - `type: "text_editor_code_execution_tool_result_error"` + - `"custom"` - - `"text_editor_code_execution_tool_result_error"` + - `version: string` - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + Skill version or 'latest' for most recent version - - `content: string` + - `content: array of ContentBlock` - - `file_type: "text" or "image" or "pdf"` + Content generated by the model. - - `"text"` + This is an array of content blocks, each of which has a `type` that determines its shape. - - `"image"` + Example: - - `"pdf"` + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `num_lines: number or null` + 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. - - `start_line: number or null` + For example, if the input `messages` were: - - `total_lines: number or null` + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - - `type: "text_editor_code_execution_view_result"` + Then the response `content` might be: - - `"text_editor_code_execution_view_result"` + ```json + [{"type": "text", "text": "B)"}] + ``` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `TextBlock object { citations, text, type }` - - `is_file_update: boolean` + - `citations: array of TextCitation or null` - - `type: "text_editor_code_execution_create_result"` + Citations supporting the text block. - - `"text_editor_code_execution_create_result"` + 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`. - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `lines: array of string or null` + - `cited_text: string` - - `new_lines: number or null` + - `document_index: number` - - `new_start: number or null` + - `document_title: string or null` - - `old_lines: number or null` + - `end_char_index: number` - - `old_start: number or null` + - `file_id: string or null` - - `type: "text_editor_code_execution_str_replace_result"` + - `start_char_index: number` - - `"text_editor_code_execution_str_replace_result"` + - `type: "char_location"` - - `tool_use_id: string` + - `"char_location"` - - `type: "text_editor_code_execution_tool_result"` + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"text_editor_code_execution_tool_result"` + - `cited_text: string` - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + - `document_index: number` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `document_title: string or null` - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `end_page_number: number` - - `error_code: ToolSearchToolResultErrorCode` + - `file_id: string or null` - - `"invalid_tool_input"` + - `start_page_number: number` - - `"unavailable"` + - `type: "page_location"` - - `"too_many_requests"` + - `"page_location"` - - `"execution_time_exceeded"` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `error_message: string or null` + - `cited_text: string` - - `type: "tool_search_tool_result_error"` + The full text of the cited block range, concatenated. - - `"tool_search_tool_result_error"` + 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. - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `document_index: number` - - `tool_references: array of ToolReferenceBlock` + - `document_title: string or null` - - `tool_name: string` + - `end_block_index: number` - - `type: "tool_reference"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"tool_reference"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "tool_search_tool_search_result"` + - `file_id: string or null` - - `"tool_search_tool_search_result"` + - `start_block_index: number` - - `tool_use_id: string` + 0-based index of the first cited block in the source's `content` array. - - `type: "tool_search_tool_result"` + - `type: "content_block_location"` - - `"tool_search_tool_result"` + - `"content_block_location"` - - `ContainerUploadBlock object { file_id, type }` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - Response model for a file uploaded to the container. + - `cited_text: string` - - `file_id: string` + - `encrypted_index: string` - - `type: "container_upload"` + - `title: string or null` - - `"container_upload"` + - `type: "web_search_result_location"` - - `model: Model` + - `"web_search_result_location"` - The model that will complete your prompt. + - `url: string` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `cited_text: string` - The model that will complete your prompt. + The full text of the cited block range, concatenated. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + 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. - - `"claude-sonnet-5"` + - `end_block_index: number` - High-performance model for coding and agents + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"claude-fable-5"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Next generation of intelligence for the hardest knowledge work and coding problems + - `search_result_index: number` - - `"claude-mythos-5"` + 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. - Most capable model for cybersecurity and biology research + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"claude-opus-5"` + - `source: string` - Powerful intelligence for long-running agents and coding + - `start_block_index: number` - - `"claude-opus-4-8"` + 0-based index of the first cited block in the source's `content` array. - Powerful intelligence for long-running agents and coding + - `title: string or null` - - `"claude-opus-4-7"` + - `type: "search_result_location"` - Powerful intelligence for long-running agents and coding + - `"search_result_location"` - - `"claude-mythos-preview"` + - `text: string` - New class of intelligence, strongest in coding and cybersecurity + - `type: "text"` - - `"claude-opus-4-6"` + - `"text"` - Powerful intelligence for long-running agents and coding + - `ThinkingBlock object { signature, thinking, type }` - - `"claude-sonnet-4-6"` + - `signature: string` - Best combination of speed and intelligence + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"claude-haiku-4-5"` + 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. - Fastest model with near-frontier intelligence + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"claude-haiku-4-5-20251001"` + - `thinking: string` - Fastest model with near-frontier intelligence + The text of Claude's thinking process for this block. - - `"claude-opus-4-5"` + - `type: "thinking"` - Powerful intelligence for long-running agents and coding + - `"thinking"` - - `"claude-opus-4-5-20251101"` + - `RedactedThinkingBlock object { data, type }` - Powerful intelligence for long-running agents and coding + - `data: string` - - `"claude-sonnet-4-5"` + 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. - High-performance model for agents and coding + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"claude-sonnet-4-5-20250929"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - High-performance model for agents and coding + - `type: "redacted_thinking"` - - `string` + - `"redacted_thinking"` - - `role: "assistant"` + - `ToolUseBlock object { id, caller, input, 3 more }` - Conversational role of the generated message. + - `id: string` - This will always be `"assistant"`. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"assistant"` + Tool invocation directly from the model. - - `stop_details: RefusalStopDetails or null` + - `DirectCaller object { type }` - Structured information about a refusal. + Tool invocation directly from the model. - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `type: "direct"` - The policy category that triggered a refusal. + - `"direct"` - - `"cyber"` + - `ServerToolCaller object { tool_id, type }` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + Tool invocation generated by a server-side tool. - - `"bio"` + - `tool_id: string` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `type: "code_execution_20250825"` - - `"frontier_llm"` + - `"code_execution_20250825"` - 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. + - `ServerToolCaller20260120 object { tool_id, type }` - - `"reasoning_extraction"` + - `tool_id: string` - 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). + - `type: "code_execution_20260120"` - - `"general_harms"` + - `"code_execution_20260120"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `input: map[unknown]` - - `explanation: string or null` + - `name: string` - Human-readable explanation of the refusal. + - `type: "tool_use"` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `"tool_use"` - - `type: "refusal"` + - `toolset_name: optional string or null` - - `"refusal"` + For a toolset member tool_use, the toolset family. - - `stop_reason: StopReason or null` + - `ServerToolUseBlock object { id, caller, input, 2 more }` - The reason that we stopped. + - `id: string` - This may be one the following values: + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + Tool invocation directly from the model. - 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. + - `DirectCaller object { type }` - - `"end_turn"` + Tool invocation directly from the model. - - `"max_tokens"` + - `ServerToolCaller object { tool_id, type }` - - `"stop_sequence"` + Tool invocation generated by a server-side tool. - - `"tool_use"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"pause_turn"` + - `input: map[unknown]` - - `"refusal"` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `"model_context_window_exceeded"` + - `"web_search"` - - `stop_sequence: string or null` + - `"web_fetch"` - Which custom stop sequence was generated, if any. + - `"code_execution"` - This value will be a non-null string if one of your custom stop sequences was generated. + - `"bash_code_execution"` - - `type: "message"` + - `"text_editor_code_execution"` - Object type. + - `"tool_search_tool_regex"` - For Messages, this is always `"message"`. + - `"tool_search_tool_bm25"` - - `"message"` + - `type: "server_tool_use"` - - `usage: Usage` + - `"server_tool_use"` - Billing and rate-limit usage. + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - 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. + Tool invocation directly from the model. - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `DirectCaller object { type }` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + Tool invocation directly from the model. - - `cache_creation: CacheCreation or null` + - `ServerToolCaller object { tool_id, type }` - Breakdown of cached tokens by TTL + Tool invocation generated by a server-side tool. - - `ephemeral_1h_input_tokens: number` + - `ServerToolCaller20260120 object { tool_id, type }` - The number of input tokens used to create the 1 hour cache entry. + - `content: WebSearchToolResultBlockContent` - - `ephemeral_5m_input_tokens: number` + - `WebSearchToolResultError object { error_code, type }` - The number of input tokens used to create the 5 minute cache entry. + - `error_code: WebSearchToolResultErrorCode` - - `cache_creation_input_tokens: number or null` + - `"invalid_tool_input"` - The number of input tokens used to create the cache entry. + - `"unavailable"` - - `cache_read_input_tokens: number or null` + - `"max_uses_exceeded"` - The number of input tokens read from the cache. + - `"too_many_requests"` - - `inference_geo: string or null` + - `"query_too_long"` - The geographic region where inference was performed for this request. + - `"request_too_large"` - - `input_tokens: number` + - `type: "web_search_tool_result_error"` - The number of input tokens which were used. + - `"web_search_tool_result_error"` - - `output_tokens: number` + - `array of WebSearchResultBlock` - The number of output tokens which were used. + - `encrypted_content: string` - - `output_tokens_details: OutputTokensDetails or null` + - `page_age: string or null` - Breakdown of output tokens by category. + - `title: string` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `type: "web_search_result"` - - `thinking_tokens: number` + - `"web_search_result"` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `url: string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `tool_use_id: string` - - `server_tool_use: ServerToolUsage or null` + - `type: "web_search_tool_result"` - The number of server tool requests. + - `"web_search_tool_result"` - - `web_fetch_requests: number` + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - The number of web fetch tool requests. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `web_search_requests: number` + Tool invocation directly from the model. - The number of web search tool requests. + - `DirectCaller object { type }` - - `service_tier: "standard" or "priority" or "batch" or null` + Tool invocation directly from the model. - If the request used the priority, standard, or batch tier. + - `ServerToolCaller object { tool_id, type }` - - `"standard"` + Tool invocation generated by a server-side tool. - - `"priority"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"batch"` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` -### Example + - `WebFetchToolResultErrorBlock object { error_code, type }` -```http -curl https://api.anthropic.com/v1/messages \ - -H 'Content-Type: application/json' \ - -H 'anthropic-version: 2023-06-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" \ - --max-time 600 \ - -d '{ - "max_tokens": 1024, - "messages": [ - { - "content": "Hello, world", - "role": "user" - } - ], - "model": "claude-opus-4-6", - "stream": false, - "system": [ - { - "text": "Today'\''s date is 2024-06-01.", - "type": "text" - } - ], - "temperature": 1, - "thinking": { - "type": "adaptive" - }, - "tools": [ - { - "input_schema": { - "type": "object", - "properties": { - "location": "bar", - "unit": "bar" - }, - "required": [ - "location" - ] - }, - "name": "name" - } - ], - "top_k": 5, - "top_p": 0.7 - }' -``` + - `error_code: WebFetchToolResultErrorCode` -#### Response + - `"invalid_tool_input"` -```json -{ - "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", - "container": { - "id": "container_011CpZohnwH4vuy7gazohgSP", - "expires_at": "2019-12-27T18:11:19.117Z" - }, - "content": [ - { - "citations": [ - { - "cited_text": "The grass is green. The sky is blue.", - "document_index": 0, - "document_title": "My Document", - "end_char_index": 0, - "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", - "start_char_index": 0, - "type": "char_location" - } - ], - "text": "Hi! My name is Claude.", - "type": "text" - } - ], - "model": "claude-opus-4-6", - "role": "assistant", - "stop_details": { - "category": "cyber", - "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", - "type": "refusal" - }, - "stop_reason": "end_turn", - "stop_sequence": null, - "type": "message", - "usage": { - "cache_creation": { - "ephemeral_1h_input_tokens": 0, - "ephemeral_5m_input_tokens": 0 - }, - "cache_creation_input_tokens": 2051, - "cache_read_input_tokens": 2051, - "inference_geo": "global", + - `"url_too_long"` + + - `"url_not_allowed"` + + - `"url_not_in_prior_context"` + + - `"url_not_accessible"` + + - `"unsupported_content_type"` + + - `"too_many_requests"` + + - `"max_uses_exceeded"` + + - `"unavailable"` + + - `type: "web_fetch_tool_result_error"` + + - `"web_fetch_tool_result_error"` + + - `WebFetchBlock object { content, retrieved_at, type, url }` + + - `content: DocumentBlock` + + - `citations: CitationsConfig or null` + + Citation configuration for the document + + - `enabled: boolean` + + - `source: Base64PDFSource or PlainTextSource` + + - `Base64PDFSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "application/pdf"` + + - `"application/pdf"` + + - `type: "base64"` + + - `"base64"` + + - `PlainTextSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "text/plain"` + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `title: string or null` + + The title of the document + + - `type: "document"` + + - `"document"` + + - `retrieved_at: string or null` + + ISO 8601 timestamp when the content was retrieved + + - `type: "web_fetch_result"` + + - `"web_fetch_result"` + + - `url: string` + + Fetched content URL + + - `tool_use_id: string` + + - `type: "web_fetch_tool_result"` + + - `"web_fetch_tool_result"` + + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: CodeExecutionToolResultBlockContent` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `CodeExecutionToolResultError object { error_code, type }` + + - `error_code: CodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + + - `BashCodeExecutionToolResultError object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + + - `error_code: TextEditorCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"file_not_found"` + + - `error_message: string or null` + + - `type: "text_editor_code_execution_tool_result_error"` + + - `"text_editor_code_execution_tool_result_error"` + + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + + - `content: string` + + - `file_type: "text" or "image" or "pdf"` + + - `"text"` + + - `"image"` + + - `"pdf"` + + - `num_lines: number or null` + + - `start_line: number or null` + + - `total_lines: number or null` + + - `type: "text_editor_code_execution_view_result"` + + - `"text_editor_code_execution_view_result"` + + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + + - `is_file_update: boolean` + + - `type: "text_editor_code_execution_create_result"` + + - `"text_editor_code_execution_create_result"` + + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + + - `lines: array of string or null` + + - `new_lines: number or null` + + - `new_start: number or null` + + - `old_lines: number or null` + + - `old_start: number or null` + + - `type: "text_editor_code_execution_str_replace_result"` + + - `"text_editor_code_execution_str_replace_result"` + + - `tool_use_id: string` + + - `type: "text_editor_code_execution_tool_result"` + + - `"text_editor_code_execution_tool_result"` + + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + + - `ToolSearchToolResultError object { error_code, error_message, type }` + + - `error_code: ToolSearchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `error_message: string or null` + + - `type: "tool_search_tool_result_error"` + + - `"tool_search_tool_result_error"` + + - `ToolSearchToolSearchResultBlock object { tool_references, type }` + + - `tool_references: array of ToolReferenceBlock` + + - `tool_name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `type: "tool_search_tool_search_result"` + + - `"tool_search_tool_search_result"` + + - `tool_use_id: string` + + - `type: "tool_search_tool_result"` + + - `"tool_search_tool_result"` + + - `ContainerUploadBlock object { file_id, type }` + + Response model for a file uploaded to the container. + + - `file_id: string` + + - `type: "container_upload"` + + - `"container_upload"` + + - `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5"` + + High-performance model for coding and agents + + - `"claude-fable-5"` + + Next generation of intelligence for the hardest knowledge work and coding problems + + - `"claude-mythos-5"` + + Most capable model for cybersecurity and biology research + + - `"claude-opus-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-8"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-7"` + + Powerful intelligence for long-running agents and coding + + - `"claude-mythos-preview"` + + New class of intelligence, strongest in coding and cybersecurity + + - `"claude-opus-4-6"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-6"` + + Best combination of speed and intelligence + + - `"claude-haiku-4-5"` + + Fastest model with near-frontier intelligence + + - `"claude-haiku-4-5-20251001"` + + Fastest model with near-frontier intelligence + + - `"claude-opus-4-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-5-20251101"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-5"` + + High-performance model for agents and coding + + - `"claude-sonnet-4-5-20250929"` + + High-performance model for agents and coding + + - `string` + + - `role: "assistant"` + + Conversational role of the generated message. + + This will always be `"assistant"`. + + - `"assistant"` + + - `stop_details: RefusalStopDetails or null` + + Structured information about a refusal. + + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + + The policy category that triggered a refusal. + + - `"cyber"` + + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + + - `"bio"` + + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + + - `"frontier_llm"` + + 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. + + - `"reasoning_extraction"` + + 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). + + - `"general_harms"` + + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + + - `explanation: string or null` + + Human-readable explanation of the refusal. + + This text is not guaranteed to be stable. `null` when no explanation is available for the category. + + - `type: "refusal"` + + - `"refusal"` + + - `stop_reason: StopReason or null` + + The reason that we stopped. + + This may be one the following values: + + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window + + 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. + + - `"end_turn"` + + - `"max_tokens"` + + - `"stop_sequence"` + + - `"tool_use"` + + - `"pause_turn"` + + - `"refusal"` + + - `"model_context_window_exceeded"` + + - `stop_sequence: string or null` + + Which custom stop sequence was generated, if any. + + This value will be a non-null string if one of your custom stop sequences was generated. + + - `type: "message"` + + Object type. + + For Messages, this is always `"message"`. + + - `"message"` + + - `usage: Usage` + + Billing and rate-limit usage. + + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + + 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. + + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + + - `cache_creation: CacheCreation or null` + + Breakdown of cached tokens by TTL + + - `ephemeral_1h_input_tokens: number` + + The number of input tokens used to create the 1 hour cache entry. + + - `ephemeral_5m_input_tokens: number` + + The number of input tokens used to create the 5 minute cache entry. + + - `cache_creation_input_tokens: number or null` + + The number of input tokens used to create the cache entry. + + - `cache_read_input_tokens: number or null` + + The number of input tokens read from the cache. + + - `inference_geo: string or null` + + The geographic region where inference was performed for this request. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `output_tokens_details: OutputTokensDetails or null` + + Breakdown of output tokens by category. + + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. + + - `thinking_tokens: number` + + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. + + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. + + - `server_tool_use: ServerToolUsage or null` + + The number of server tool requests. + + - `web_fetch_requests: number` + + The number of web fetch tool requests. + + - `web_search_requests: number` + + The number of web search tool requests. + + - `service_tier: "standard" or "priority" or "batch" or null` + + If the request used the priority, standard, or batch tier. + + - `"standard"` + + - `"priority"` + + - `"batch"` + +### Example + +```http +curl https://api.anthropic.com/v1/messages \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + --max-time 600 \ + -d '{ + "max_tokens": 1024, + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-5", + "stream": false, + "system": [ + { + "text": "Today'\''s date is 2024-06-01.", + "type": "text" + } + ], + "temperature": 1, + "thinking": { + "type": "adaptive" + }, + "tools": [ + { + "input_schema": { + "type": "object", + "properties": { + "location": "bar", + "unit": "bar" + }, + "required": [ + "location" + ] + }, + "name": "name" + } + ], + "top_k": 5, + "top_p": 0.7 + }' +``` + +#### Response + +```json +{ + "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", + "container": { + "id": "container_011CpZohnwH4vuy7gazohgSP", + "expires_at": "2019-12-27T18:11:19.117Z", + "skills": [ + { + "skill_id": "pdf", + "type": "anthropic", + "version": "latest" + } + ] + }, + "content": [ + { + "citations": [ + { + "cited_text": "The grass is green. The sky is blue.", + "document_index": 0, + "document_title": "My Document", + "end_char_index": 0, + "file_id": "file_011CNha8iCJcU1wXNR6q4V8w", + "start_char_index": 0, + "type": "char_location" + } + ], + "text": "Hi! My name is Claude.", + "type": "text" + } + ], + "model": "claude-opus-5", + "role": "assistant", + "stop_details": { + "category": "cyber", + "explanation": "This request was declined because it conflicts with Anthropic's Usage Policy.", + "type": "refusal" + }, + "stop_reason": "end_turn", + "stop_sequence": null, + "type": "message", + "usage": { + "cache_creation": { + "ephemeral_1h_input_tokens": 0, + "ephemeral_5m_input_tokens": 0 + }, + "cache_creation_input_tokens": 2051, + "cache_read_input_tokens": 2051, + "inference_geo": "global", "input_tokens": 2095, "output_tokens": 503, "output_tokens_details": { @@ -3278,3555 +4117,9332 @@ curl https://api.anthropic.com/v1/messages \ } ``` -## Count tokens in a Message +## Count tokens in a Message + +**post** `/v1/messages/count_tokens` + +Count the number of tokens in a Message. + +The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it. + +Learn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting) + +### Header Parameters + +- `"anthropic-user-profile-id": optional string` + + 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. + +### Body Parameters + +- `messages: array of MessageParam` + + Input messages. + + 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. + + 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. + + 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. + + Example with a single `user` message: + + ```json + [{"role": "user", "content": "Hello, Claude"}] + ``` + + Example with multiple conversational turns: + + ```json + [ + {"role": "user", "content": "Hello there."}, + {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + {"role": "user", "content": "Can you explain LLMs in plain English?"}, + ] + ``` + + Example with a partially-filled response from Claude: + + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("}, + ] + ``` + + 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: + + ```json + {"role": "user", "content": "Hello, Claude"} + ``` + + ```json + {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + ``` + + See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + + 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. + + There is a limit of 100,000 messages in a single request. + + - `content: string or array of ContentBlockParam` + + - `string` + + - `array of ContentBlockParam` + + - `TextBlockParam object { text, type, cache_control, citations }` + + - `text: string` + + - `type: "text"` + + - `"text"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `citations: optional array of TextCitationParam or null` + + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `source: Base64ImageSource or URLImageSource or FileImageSource` + + - `Base64ImageSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + + - `"image/jpeg"` + + - `"image/png"` + + - `"image/gif"` + + - `"image/webp"` + + - `type: "base64"` + + - `"base64"` + + - `URLImageSource object { type, url }` + + - `type: "url"` + + - `"url"` + + - `url: string` + + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + + - `type: "image"` + + - `"image"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + + - `DocumentBlockParam object { source, type, cache_control, 3 more }` + + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` + + - `Base64PDFSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "application/pdf"` + + - `"application/pdf"` + + - `type: "base64"` + + - `"base64"` + + - `PlainTextSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "text/plain"` + + - `"text/plain"` + + - `type: "text"` + + - `"text"` + + - `ContentBlockSource object { content, type }` + + - `content: string or array of ContentBlockSourceContent` + + - `string` + + - `ContentBlockSourceContent = array of ContentBlockSourceContent` + + - `TextBlockParam object { text, type, cache_control, citations }` + + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `type: "content"` + + - `"content"` + + - `URLPDFSource object { type, url }` + + - `type: "url"` + + - `"url"` + + - `url: string` + + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + + - `type: "document"` + + - `"document"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + - `enabled: optional boolean` + + - `context: optional string or null` + + - `title: optional string or null` + + - `SearchResultBlockParam object { content, source, title, 3 more }` + + - `content: array of TextBlockParam` + + - `text: string` + + - `type: "text"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional array of TextCitationParam or null` + + - `source: string` + + - `title: string` + + - `type: "search_result"` + + - `"search_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam` + + - `ThinkingBlockParam object { signature, thinking, type }` + + - `signature: string` + + 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. + + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + + - `thinking: string` + + The `thinking` text of this block as returned by the API. + + - `type: "thinking"` + + - `"thinking"` + + - `RedactedThinkingBlockParam object { data, type }` + + - `data: string` + + 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. + + - `type: "redacted_thinking"` + + - `"redacted_thinking"` + + - `ToolUseBlockParam object { id, input, name, 4 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: string` + + - `type: "tool_use"` + + - `"tool_use"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + + Tool invocation directly from the model. + + - `DirectCaller object { type }` + + Tool invocation directly from the model. + + - `type: "direct"` + + - `"direct"` + + - `ServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `tool_id: string` + + - `type: "code_execution_20250825"` + + - `"code_execution_20250825"` + + - `ServerToolCaller20260120 object { tool_id, type }` + + - `tool_id: string` + + - `type: "code_execution_20260120"` + + - `"code_execution_20260120"` + + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` + + - `tool_use_id: string` + + - `type: "tool_result"` + + - `"tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` + + - `string` + + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` + + - `TextBlockParam object { text, type, cache_control, citations }` + + - `ImageBlockParam object { source, type, cache_control, transformations }` + + - `SearchResultBlockParam object { content, source, title, 3 more }` + + - `DocumentBlockParam object { source, type, cache_control, 3 more }` + + - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + + Tool reference block that can be included in tool_result content. + + - `tool_name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + + - `is_error: optional boolean` + + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + + - `ServerToolUseBlockParam object { id, input, name, 3 more }` + + - `id: string` + + - `input: map[unknown]` + + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + + - `"web_search"` + + - `"web_fetch"` + + - `"code_execution"` + + - `"bash_code_execution"` + + - `"text_editor_code_execution"` + + - `"tool_search_tool_regex"` + + - `"tool_search_tool_bm25"` + + - `type: "server_tool_use"` + + - `"server_tool_use"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + + Tool invocation directly from the model. + + - `DirectCaller object { type }` + + Tool invocation directly from the model. + + - `ServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `ServerToolCaller20260120 object { tool_id, type }` + + - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + + - `content: WebSearchToolResultBlockParamContent` + + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + + - `encrypted_content: string` + + - `title: string` + + - `type: "web_search_result"` + + - `"web_search_result"` + + - `url: string` + + - `page_age: optional string or null` + + - `WebSearchToolRequestError object { error_code, type }` + + - `error_code: WebSearchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"max_uses_exceeded"` + + - `"too_many_requests"` + + - `"query_too_long"` + + - `"request_too_large"` + + - `type: "web_search_tool_result_error"` + + - `"web_search_tool_result_error"` + + - `tool_use_id: string` + + - `type: "web_search_tool_result"` + + - `"web_search_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + + Tool invocation directly from the model. + + - `DirectCaller object { type }` + + Tool invocation directly from the model. + + - `ServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `ServerToolCaller20260120 object { tool_id, type }` + + - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + + - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + + - `WebFetchToolResultErrorBlockParam object { error_code, type }` + + - `error_code: WebFetchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"url_too_long"` + + - `"url_not_allowed"` + + - `"url_not_in_prior_context"` + + - `"url_not_accessible"` + + - `"unsupported_content_type"` + + - `"too_many_requests"` + + - `"max_uses_exceeded"` + + - `"unavailable"` + + - `type: "web_fetch_tool_result_error"` + + - `"web_fetch_tool_result_error"` + + - `WebFetchBlockParam object { content, type, url, retrieved_at }` + + - `content: DocumentBlockParam` + + - `type: "web_fetch_result"` + + - `"web_fetch_result"` + + - `url: string` + + Fetched content URL + + - `retrieved_at: optional string or null` + + ISO 8601 timestamp when the content was retrieved + + - `tool_use_id: string` + + - `type: "web_fetch_tool_result"` + + - `"web_fetch_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + + Tool invocation directly from the model. + + - `DirectCaller object { type }` + + Tool invocation directly from the model. + + - `ServerToolCaller object { tool_id, type }` + + Tool invocation generated by a server-side tool. + + - `ServerToolCaller20260120 object { tool_id, type }` + + - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: CodeExecutionToolResultBlockParamContent` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `CodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: CodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of CodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + + - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + + - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + + - `error_code: TextEditorCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"file_not_found"` + + - `type: "text_editor_code_execution_tool_result_error"` + + - `"text_editor_code_execution_tool_result_error"` + + - `error_message: optional string or null` + + - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + + - `content: string` + + - `file_type: "text" or "image" or "pdf"` + + - `"text"` + + - `"image"` + + - `"pdf"` + + - `type: "text_editor_code_execution_view_result"` + + - `"text_editor_code_execution_view_result"` + + - `num_lines: optional number or null` + + - `start_line: optional number or null` + + - `total_lines: optional number or null` + + - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + + - `is_file_update: boolean` + + - `type: "text_editor_code_execution_create_result"` + + - `"text_editor_code_execution_create_result"` + + - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + + - `type: "text_editor_code_execution_str_replace_result"` + + - `"text_editor_code_execution_str_replace_result"` + + - `lines: optional array of string or null` + + - `new_lines: optional number or null` + + - `new_start: optional number or null` + + - `old_lines: optional number or null` + + - `old_start: optional number or null` + + - `tool_use_id: string` + + - `type: "text_editor_code_execution_tool_result"` + + - `"text_editor_code_execution_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + + - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + + - `error_code: ToolSearchToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "tool_search_tool_result_error"` + + - `"tool_search_tool_result_error"` + + - `error_message: optional string or null` + + - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + + - `tool_references: array of ToolReferenceBlockParam` + + - `tool_name: string` + + - `type: "tool_reference"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "tool_search_tool_search_result"` + + - `"tool_search_tool_search_result"` + + - `tool_use_id: string` + + - `type: "tool_search_tool_result"` + + - `"tool_search_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `ContainerUploadBlockParam object { file_id, type, cache_control }` + + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. + + - `file_id: string` + + - `type: "container_upload"` + + - `"container_upload"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `role: "user" or "assistant" or "system"` + + - `"user"` + + - `"assistant"` + + - `"system"` + +- `model: Model` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + + The model that will complete your prompt. + + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + + - `"claude-sonnet-5"` + + High-performance model for coding and agents + + - `"claude-fable-5"` + + Next generation of intelligence for the hardest knowledge work and coding problems + + - `"claude-mythos-5"` + + Most capable model for cybersecurity and biology research + + - `"claude-opus-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-8"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-7"` + + Powerful intelligence for long-running agents and coding + + - `"claude-mythos-preview"` + + New class of intelligence, strongest in coding and cybersecurity + + - `"claude-opus-4-6"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-6"` + + Best combination of speed and intelligence + + - `"claude-haiku-4-5"` + + Fastest model with near-frontier intelligence + + - `"claude-haiku-4-5-20251001"` + + Fastest model with near-frontier intelligence + + - `"claude-opus-4-5"` + + Powerful intelligence for long-running agents and coding + + - `"claude-opus-4-5-20251101"` + + Powerful intelligence for long-running agents and coding + + - `"claude-sonnet-4-5"` + + High-performance model for agents and coding + + - `"claude-sonnet-4-5-20250929"` + + High-performance model for agents and coding + + - `string` + +- `cache_control: optional CacheControlEphemeral or null` + + Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + +- `output_config: optional OutputConfig` + + Configuration options for the model's output, such as the output format. + + - `effort: optional "low" or "medium" or "high" or 2 more or null` + + All possible effort levels. + + - `"low"` + + - `"medium"` + + - `"high"` + + - `"xhigh"` + + - `"max"` + + - `format: optional JSONOutputFormat or null` + + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + + - `schema: map[unknown]` + + The JSON schema of the format + + - `type: "json_schema"` + + - `"json_schema"` + +- `system: optional string or array of TextBlockParam` + + System prompt. + + 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). + + - `string` + + - `array of TextBlockParam` + + - `text: string` + + - `type: "text"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional array of TextCitationParam or null` + +- `thinking: optional ThinkingConfigParam` + + Configuration for enabling Claude's extended thinking. + + 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. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + + - `ThinkingConfigEnabled object { budget_tokens, type, display }` + + - `budget_tokens: number` + + 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. + + Must be ≥1024 and less than `max_tokens`. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + + - `type: "enabled"` + + - `"enabled"` + + - `display: optional "summarized" or "omitted" or null` + + 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`. + + - `"summarized"` + + - `"omitted"` + + - `ThinkingConfigDisabled object { type }` + + - `type: "disabled"` + + - `"disabled"` + + - `ThinkingConfigAdaptive object { type, display }` + + - `type: "adaptive"` + + - `"adaptive"` + + - `display: optional "summarized" or "omitted" or null` + + 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`. + + - `"summarized"` + + - `"omitted"` + +- `tool_choice: optional ToolChoice` + + 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. + + - `ToolChoiceAuto object { type, disable_parallel_tool_use }` + + The model will automatically decide whether to use tools. + + - `type: "auto"` + + - `"auto"` + + - `disable_parallel_tool_use: optional boolean` + + Whether to disable parallel tool use. + + Defaults to `false`. If set to `true`, the model will output at most one tool use. + + - `ToolChoiceAny object { type, disable_parallel_tool_use }` + + The model will use any available tools. + + - `type: "any"` + + - `"any"` + + - `disable_parallel_tool_use: optional boolean` + + Whether to disable parallel tool use. + + Defaults to `false`. If set to `true`, the model will output exactly one tool use. + + - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` + + The model will use the specified tool with `tool_choice.name`. + + - `name: string` + + The name of the tool to use. + + - `type: "tool"` + + - `"tool"` + + - `disable_parallel_tool_use: optional boolean` + + Whether to disable parallel tool use. + + Defaults to `false`. If set to `true`, the model will output exactly one tool use. + + - `ToolChoiceNone object { type }` + + The model will not be allowed to use tools. + + - `type: "none"` + + - `"none"` + +- `tools: optional array of MessageCountTokensTool` + + Definitions of tools that the model may use. + + 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. + + 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)). + + Each tool definition includes: + + * `name`: Name of the tool. + * `description`: Optional, but strongly-recommended description of the tool. + * `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. + + For example, if you defined `tools` as: + + ```json + [ + { + "name": "get_stock_price", + "description": "Get the current stock price for a given ticker symbol.", + "input_schema": { + "type": "object", + "properties": { + "ticker": { + "type": "string", + "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + } + }, + "required": ["ticker"] + } + } + ] + ``` + + 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: + + ```json + [ + { + "type": "tool_use", + "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "name": "get_stock_price", + "input": { "ticker": "^GSPC" } + } + ] + ``` + + 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: + + ```json + [ + { + "type": "tool_result", + "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "content": "259.75 USD" + } + ] + ``` + + 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. + + See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + + - `Tool object { input_schema, name, allowed_callers, 7 more }` + + - `input_schema: object { type, properties, required }` + + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + + This defines the shape of the `input` that your tool accepts and that the model will produce. + + - `type: "object"` + + - `"object"` + + - `properties: optional map[unknown] or null` + + - `required: optional array of string or null` + + - `name: string` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `description: optional string` + + Description of what this tool does. + + 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. + + - `eager_input_streaming: optional boolean or null` + + 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. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `type: optional "custom" or null` + + - `"custom"` + + - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` + + - `name: "bash"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"bash"` + + - `type: "bash_20250124"` + + - `"bash_20250124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20250522"` + + - `"code_execution_20250522"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20250825"` + + - `"code_execution_20250825"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260120"` + + - `"code_execution_20260120"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence. + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260521"` + + - `"code_execution_20260521"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + + - `name: "memory"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"memory"` + + - `type: "memory_20250818"` + + - `"memory_20250818"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + + - `name: "str_replace_editor"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"str_replace_editor"` + + - `type: "text_editor_20250124"` + + - `"text_editor_20250124"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + + - `name: "str_replace_based_edit_tool"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"str_replace_based_edit_tool"` + + - `type: "text_editor_20250429"` + + - `"text_editor_20250429"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + + - `name: "str_replace_based_edit_tool"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"str_replace_based_edit_tool"` + + - `type: "text_editor_20250728"` + + - `"text_editor_20250728"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `input_examples: optional array of map[unknown]` + + - `max_characters: optional number or null` + + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + + - `name: "web_search"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_search"` + + - `type: "web_search_20250305"` + + - `"web_search_20250305"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + + - `blocked_domains: optional array of string or null` + + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `user_location: optional UserLocation or null` + + Parameters for the user's location. Used to provide more relevant search results. + + - `type: "approximate"` + + - `"approximate"` + + - `city: optional string or null` + + The city of the user. + + - `country: optional string or null` + + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + + - `region: optional string or null` + + The region of the user. + + - `timezone: optional string or null` + + The [IANA timezone](https://nodatime.org/TimeZones) of the user. + + - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + + - `name: "web_fetch"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_fetch"` + + - `type: "web_fetch_20250910"` + + - `"web_fetch_20250910"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + List of domains to allow fetching from + + - `blocked_domains: optional array of string or null` + + List of domains to block fetching from + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + Citations configuration for fetched documents. Citations are disabled by default. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_content_tokens: optional number or null` + + 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. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + + - `name: "web_search"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_search"` + + - `type: "web_search_20260209"` + + - `"web_search_20260209"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + + - `blocked_domains: optional array of string or null` + + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `user_location: optional UserLocation or null` + + Parameters for the user's location. Used to provide more relevant search results. + + - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` + + - `name: "web_fetch"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_fetch"` + + - `type: "web_fetch_20260209"` + + - `"web_fetch_20260209"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + List of domains to allow fetching from + + - `blocked_domains: optional array of string or null` + + List of domains to block fetching from + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + Citations configuration for fetched documents. Citations are disabled by default. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_content_tokens: optional number or null` + + 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. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + + Web fetch tool with use_cache parameter for bypassing cached content. + + - `name: "web_fetch"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_fetch"` + + - `type: "web_fetch_20260309"` + + - `"web_fetch_20260309"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + List of domains to allow fetching from + + - `blocked_domains: optional array of string or null` + + List of domains to block fetching from + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + Citations configuration for fetched documents. Citations are disabled by default. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_content_tokens: optional number or null` + + 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. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `use_cache: optional boolean` + + 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. + + - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + + - `name: "web_search"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_search"` + + - `type: "web_search_20260318"` + + - `"web_search_20260318"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + + - `blocked_domains: optional array of string or null` + + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `response_inclusion: optional "full" or "excluded"` + + 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. + + - `"full"` + + - `"excluded"` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `user_location: optional UserLocation or null` + + Parameters for the user's location. Used to provide more relevant search results. + + - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + + - `name: "web_fetch"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"web_fetch"` + + - `type: "web_fetch_20260318"` + + - `"web_fetch_20260318"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `allowed_domains: optional array of string or null` + + List of domains to allow fetching from + + - `blocked_domains: optional array of string or null` + + List of domains to block fetching from + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + Citations configuration for fetched documents. Citations are disabled by default. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `max_content_tokens: optional number or null` + + 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. + + - `max_uses: optional number or null` + + Maximum number of times the tool can be used in the API request. + + - `response_inclusion: optional "full" or "excluded"` + + 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. + + - `"full"` + + - `"excluded"` + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `use_cache: optional boolean` + + 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. + + - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + + - `name: "tool_search_tool_bm25"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"tool_search_tool_bm25"` + + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + + - `"tool_search_tool_bm25_20251119"` + + - `"tool_search_tool_bm25"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + + - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + + - `name: "tool_search_tool_regex"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"tool_search_tool_regex"` + + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + + - `"tool_search_tool_regex_20251119"` + + - `"tool_search_tool_regex"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + +### Returns + +- `MessageTokensCount object { input_tokens }` + + - `input_tokens: number` + + The total number of tokens across the provided list of messages, system prompt, and tools. + +### Example + +```http +curl https://api.anthropic.com/v1/messages/count_tokens \ + -H 'Content-Type: application/json' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -d '{ + "messages": [ + { + "content": "Hello, world", + "role": "user" + } + ], + "model": "claude-opus-5", + "system": [ + { + "text": "Today'\''s date is 2024-06-01.", + "type": "text" + } + ], + "thinking": { + "type": "adaptive" + }, + "tools": [ + { + "input_schema": { + "type": "object", + "properties": { + "location": "bar", + "unit": "bar" + }, + "required": [ + "location" + ] + }, + "name": "name" + } + ] + }' +``` + +#### Response + +```json +{ + "input_tokens": 2095 +} +``` + +## Domain Types + +### Base64 Image Source + +- `Base64ImageSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + + - `"image/jpeg"` + + - `"image/png"` + + - `"image/gif"` + + - `"image/webp"` + + - `type: "base64"` + + - `"base64"` + +### Base64 PDF Source + +- `Base64PDFSource object { data, media_type, type }` + + - `data: string` + + - `media_type: "application/pdf"` + + - `"application/pdf"` + + - `type: "base64"` + + - `"base64"` + +### Bash Code Execution Output Block + +- `BashCodeExecutionOutputBlock object { file_id, type }` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + +### Bash Code Execution Output Block Param + +- `BashCodeExecutionOutputBlockParam object { file_id, type }` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + +### Bash Code Execution Result Block + +- `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + +### Bash Code Execution Result Block Param + +- `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + +### Bash Code Execution Tool Result Block + +- `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + + - `BashCodeExecutionToolResultError object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + +### Bash Code Execution Tool Result Block Param + +- `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + + - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + + - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of BashCodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "bash_code_execution_output"` + + - `"bash_code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "bash_code_execution_result"` + + - `"bash_code_execution_result"` + + - `tool_use_id: string` + + - `type: "bash_code_execution_tool_result"` + + - `"bash_code_execution_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + +### Bash Code Execution Tool Result Error + +- `BashCodeExecutionToolResultError object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + +### Bash Code Execution Tool Result Error Code + +- `BashCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + +### Bash Code Execution Tool Result Error Param + +- `BashCodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` + + - `type: "bash_code_execution_tool_result_error"` + + - `"bash_code_execution_tool_result_error"` + +### Browser Close Tab Config + +- `BrowserCloseTabConfig object { defer_loading, enabled }` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Double Click Config + +- `BrowserDoubleClickConfig object { defer_loading, enabled }` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser File Upload Config + +- `BrowserFileUploadConfig object { defer_loading, enabled }` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Find Config + +- `BrowserFindConfig object { defer_loading, enabled }` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Form Input Config + +- `BrowserFormInputConfig object { defer_loading, enabled }` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Get Page Text Config + +- `BrowserGetPageTextConfig object { defer_loading, enabled }` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Hold Key Config + +- `BrowserHoldKeyConfig object { defer_loading, enabled }` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Hover Config + +- `BrowserHoverConfig object { defer_loading, enabled }` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Javascript Exec Config + +- `BrowserJavascriptExecConfig object { defer_loading, enabled }` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Key Config + +- `BrowserKeyConfig object { defer_loading, enabled }` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Left Click Config + +- `BrowserLeftClickConfig object { defer_loading, enabled }` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Left Click Drag Config + +- `BrowserLeftClickDragConfig object { defer_loading, enabled }` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Left Mouse Down Config + +- `BrowserLeftMouseDownConfig object { defer_loading, enabled }` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Left Mouse Up Config + +- `BrowserLeftMouseUpConfig object { defer_loading, enabled }` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser List Tabs Config + +- `BrowserListTabsConfig object { defer_loading, enabled }` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Middle Click Config + +- `BrowserMiddleClickConfig object { defer_loading, enabled }` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Mouse Move Config + +- `BrowserMouseMoveConfig object { defer_loading, enabled }` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Navigate Config + +- `BrowserNavigateConfig object { defer_loading, enabled }` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser New Tab Config + +- `BrowserNewTabConfig object { defer_loading, enabled }` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Read Console Config + +- `BrowserReadConsoleConfig object { defer_loading, enabled }` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Read Network Config + +- `BrowserReadNetworkConfig object { defer_loading, enabled }` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Read Page Config + +- `BrowserReadPageConfig object { defer_loading, enabled }` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Right Click Config + +- `BrowserRightClickConfig object { defer_loading, enabled }` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Screenshot Config + +- `BrowserScreenshotConfig object { defer_loading, enabled }` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Scroll Config + +- `BrowserScrollConfig object { defer_loading, enabled }` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Scroll To Config + +- `BrowserScrollToConfig object { defer_loading, enabled }` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser State Block Param + +- `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Browser State Change + +- `BrowserStateChange = BrowserStateChangeTabOpened or BrowserStateChangeDownloadStarted or BrowserStateChangeDownloadCompleted or BrowserStateChangeDownloadFailed` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Browser State Change Download Completed + +- `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + +### Browser State Change Download Failed + +- `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + +### Browser State Change Download Started + +- `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + +### Browser State Change Tab Opened + +- `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + +### Browser State Tab Entry + +- `BrowserStateTabEntry object { tab_id, title, url, active }` + + One open browser tab reported in a `browser_state` block's `tabs` + inventory. + + `tab_id` is the caller-assigned identifier for the tab; `title` and + `url` describe the page the tab is currently showing and may be empty + strings (a blank tab legitimately has both empty). `active` marks the + tab that is active after this call; whenever `tabs` is non-empty, + exactly one entry is marked. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + +### Browser Switch Tab Config + +- `BrowserSwitchTabConfig object { defer_loading, enabled }` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Toolset 20260801 + +- `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Toolset Configs + +- `BrowserToolsetConfigs object { close_tab, double_click, file_upload, 28 more }` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Triple Click Config + +- `BrowserTripleClickConfig object { defer_loading, enabled }` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Type Config + +- `BrowserTypeConfig object { defer_loading, enabled }` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Wait Config + +- `BrowserWaitConfig object { defer_loading, enabled }` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Browser Zoom Config + +- `BrowserZoomConfig object { defer_loading, enabled }` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Cache Control Ephemeral + +- `CacheControlEphemeral object { type, ttl }` + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + +### Cache Creation + +- `CacheCreation object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }` + + - `ephemeral_1h_input_tokens: number` + + The number of input tokens used to create the 1 hour cache entry. + + - `ephemeral_5m_input_tokens: number` + + The number of input tokens used to create the 5 minute cache entry. + +### Citation Char Location + +- `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `file_id: string or null` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + +### Citation Char Location Param + +- `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + +### Citation Content Block Location + +- `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `file_id: string or null` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + +### Citation Content Block Location Param + +- `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + +### Citation Page Location + +- `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `file_id: string or null` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + +### Citation Page Location Param + +- `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + +### Citation Search Result Location Param + +- `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + +### Citation Web Search Result Location Param + +- `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + +### Citations Config + +- `CitationsConfig object { enabled }` + + - `enabled: boolean` + +### Citations Config Param + +- `CitationsConfigParam object { enabled }` + + - `enabled: optional boolean` + +### Citations Delta + +- `CitationsDelta object { citation, type }` + + - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_char_index: number` + + - `file_id: string or null` + + - `start_char_index: number` + + - `type: "char_location"` + + - `"char_location"` + + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + - `document_index: number` + + - `document_title: string or null` + + - `end_page_number: number` + + - `file_id: string or null` + + - `start_page_number: number` + + - `type: "page_location"` + + - `"page_location"` + + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `document_index: number` + + - `document_title: string or null` + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `file_id: string or null` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `type: "content_block_location"` + + - `"content_block_location"` + + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + + - `type: "citations_delta"` + + - `"citations_delta"` + +### Citations Search Result Location + +- `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + + - `cited_text: string` + + The full text of the cited block range, concatenated. + + 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. + + - `end_block_index: number` + + Exclusive 0-based end index of the cited block range in the source's `content` array. + + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + + - `search_result_index: number` + + 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. + + Counted separately from `document_index`; server-side web search results are not included in this count. + + - `source: string` + + - `start_block_index: number` + + 0-based index of the first cited block in the source's `content` array. + + - `title: string or null` + + - `type: "search_result_location"` + + - `"search_result_location"` + +### Citations Web Search Result Location + +- `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + + - `cited_text: string` + + - `encrypted_index: string` + + - `title: string or null` + + - `type: "web_search_result_location"` + + - `"web_search_result_location"` + + - `url: string` + +### Code Execution Output Block + +- `CodeExecutionOutputBlock object { file_id, type }` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + +### Code Execution Output Block Param + +- `CodeExecutionOutputBlockParam object { file_id, type }` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + +### Code Execution Result Block + +- `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + +### Code Execution Result Block Param + +- `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + +### Code Execution Tool 20250522 + +- `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20250522"` + + - `"code_execution_20250522"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + +### Code Execution Tool 20250825 + +- `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20250825"` + + - `"code_execution_20250825"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + +### Code Execution Tool 20260120 + +- `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260120"` + + - `"code_execution_20260120"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + +### Code Execution Tool 20260521 + +- `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + + Code execution tool with REPL state persistence. + + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. + + - `"code_execution"` + + - `type: "code_execution_20260521"` + + - `"code_execution_20260521"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour + + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + + - `"5m"` + + - `"1h"` + + - `defer_loading: optional boolean` + + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + + - `strict: optional boolean` + + When true, guarantees schema validation on tool names and inputs + +### Code Execution Tool Result Block + +- `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: CodeExecutionToolResultBlockContent` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `CodeExecutionToolResultError object { error_code, type }` + + - `error_code: CodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + +### Code Execution Tool Result Block Content + +- `CodeExecutionToolResultBlockContent = CodeExecutionToolResultError or CodeExecutionResultBlock or EncryptedCodeExecutionResultBlock` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `CodeExecutionToolResultError object { error_code, type }` + + - `error_code: CodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of CodeExecutionOutputBlock` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + +### Code Execution Tool Result Block Param + +- `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: CodeExecutionToolResultBlockParamContent` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `CodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: CodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `type: "code_execution_tool_result_error"` + + - `"code_execution_tool_result_error"` + + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + + - `content: array of CodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `"code_execution_output"` + + - `return_code: number` + + - `stderr: string` + + - `stdout: string` + + - `type: "code_execution_result"` + + - `"code_execution_result"` + + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + + Code execution result with encrypted stdout for PFC + web_search results. + + - `content: array of CodeExecutionOutputBlockParam` + + - `file_id: string` + + - `type: "code_execution_output"` + + - `encrypted_stdout: string` + + - `return_code: number` + + - `stderr: string` + + - `type: "encrypted_code_execution_result"` + + - `"encrypted_code_execution_result"` + + - `tool_use_id: string` + + - `type: "code_execution_tool_result"` + + - `"code_execution_tool_result"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour -**post** `/v1/messages/count_tokens` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. -Count the number of tokens in a Message. + - `"5m"` -The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it. + - `"1h"` -Learn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting) +### Code Execution Tool Result Block Param Content -### Header Parameters +- `CodeExecutionToolResultBlockParamContent = CodeExecutionToolResultErrorParam or CodeExecutionResultBlockParam or EncryptedCodeExecutionResultBlockParam` -- `"anthropic-user-profile-id": optional string` + Code execution result with encrypted stdout for PFC + web_search results. - 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. + - `CodeExecutionToolResultErrorParam object { error_code, type }` -### Body Parameters + - `error_code: CodeExecutionToolResultErrorCode` -- `messages: array of MessageParam` + - `"invalid_tool_input"` - Input messages. + - `"unavailable"` - 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. + - `"too_many_requests"` - 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. + - `"execution_time_exceeded"` - 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. + - `type: "code_execution_tool_result_error"` - Example with a single `user` message: + - `"code_execution_tool_result_error"` - ```json - [{"role": "user", "content": "Hello, Claude"}] - ``` + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - Example with multiple conversational turns: + - `content: array of CodeExecutionOutputBlockParam` - ```json - [ - {"role": "user", "content": "Hello there."}, - {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, - {"role": "user", "content": "Can you explain LLMs in plain English?"}, - ] - ``` + - `file_id: string` - Example with a partially-filled response from Claude: + - `type: "code_execution_output"` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("}, - ] - ``` + - `"code_execution_output"` - 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: + - `return_code: number` - ```json - {"role": "user", "content": "Hello, Claude"} - ``` + - `stderr: string` - ```json - {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} - ``` + - `stdout: string` - See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + - `type: "code_execution_result"` - 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. + - `"code_execution_result"` - There is a limit of 100,000 messages in a single request. + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `content: string or array of ContentBlockParam` + Code execution result with encrypted stdout for PFC + web_search results. - - `string` + - `content: array of CodeExecutionOutputBlockParam` - - `array of ContentBlockParam` + - `file_id: string` - - `TextBlockParam object { text, type, cache_control, citations }` + - `type: "code_execution_output"` - - `text: string` + - `encrypted_stdout: string` - - `type: "text"` + - `return_code: number` - - `"text"` + - `stderr: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "encrypted_code_execution_result"` - Create a cache control breakpoint at this content block. + - `"encrypted_code_execution_result"` - - `type: "ephemeral"` +### Code Execution Tool Result Error - - `"ephemeral"` +- `CodeExecutionToolResultError object { error_code, type }` - - `ttl: optional "5m" or "1h"` + - `error_code: CodeExecutionToolResultErrorCode` - The time-to-live for the cache control breakpoint. + - `"invalid_tool_input"` - This may be one the following values: + - `"unavailable"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"too_many_requests"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"execution_time_exceeded"` - - `"5m"` + - `type: "code_execution_tool_result_error"` - - `"1h"` + - `"code_execution_tool_result_error"` - - `citations: optional array of TextCitationParam or null` +### Code Execution Tool Result Error Code - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` +- `CodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - - `cited_text: string` + - `"invalid_tool_input"` - - `document_index: number` + - `"unavailable"` - - `document_title: string or null` + - `"too_many_requests"` - - `end_char_index: number` + - `"execution_time_exceeded"` - - `start_char_index: number` +### Code Execution Tool Result Error Param - - `type: "char_location"` +- `CodeExecutionToolResultErrorParam object { error_code, type }` - - `"char_location"` + - `error_code: CodeExecutionToolResultErrorCode` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"invalid_tool_input"` - - `cited_text: string` + - `"unavailable"` - - `document_index: number` + - `"too_many_requests"` - - `document_title: string or null` + - `"execution_time_exceeded"` - - `end_page_number: number` + - `type: "code_execution_tool_result_error"` - - `start_page_number: number` + - `"code_execution_tool_result_error"` - - `type: "page_location"` +### Computer Cursor Position Config - - `"page_location"` +- `ComputerCursorPositionConfig object { defer_loading, enabled }` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + `cursor_position`'s config overrides. - - `cited_text: string` + - `defer_loading: optional boolean or null` - The full text of the cited block range, concatenated. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - 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. + - `enabled: optional boolean or null` - - `document_index: number` + 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. - - `document_title: string or null` +### Computer Double Click Config - - `end_block_index: number` +- `ComputerDoubleClickConfig object { defer_loading, enabled }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + `double_click`'s config overrides. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `defer_loading: optional boolean or null` - - `start_block_index: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - 0-based index of the first cited block in the source's `content` array. + - `enabled: optional boolean or null` - - `type: "content_block_location"` + 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. - - `"content_block_location"` +### Computer Hold Key Config - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` +- `ComputerHoldKeyConfig object { defer_loading, enabled }` - - `cited_text: string` + `hold_key`'s config overrides. - - `encrypted_index: string` + - `defer_loading: optional boolean or null` - - `title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "web_search_result_location"` + - `enabled: optional boolean or null` - - `"web_search_result_location"` + 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. - - `url: string` +### Computer Key Config - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` +- `ComputerKeyConfig object { defer_loading, enabled }` - - `cited_text: string` + `key`'s config overrides. - The full text of the cited block range, concatenated. + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_block_index: number` + - `enabled: optional boolean or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. +### Computer Left Click Config - - `search_result_index: number` +- `ComputerLeftClickConfig object { defer_loading, enabled }` - 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. + `left_click`'s config overrides. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `defer_loading: optional boolean or null` - - `source: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_block_index: number` + - `enabled: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `title: string or null` +### Computer Left Click Drag Config - - `type: "search_result_location"` +- `ComputerLeftClickDragConfig object { defer_loading, enabled }` - - `"search_result_location"` + `left_click_drag`'s config overrides. - - `ImageBlockParam object { source, type, cache_control }` + - `defer_loading: optional boolean or null` - - `source: Base64ImageSource or URLImageSource` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `Base64ImageSource object { data, media_type, type }` + - `enabled: optional boolean or null` - - `data: string` + 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. - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` +### Computer Left Mouse Down Config - - `"image/jpeg"` +- `ComputerLeftMouseDownConfig object { defer_loading, enabled }` - - `"image/png"` + `left_mouse_down`'s config overrides. - - `"image/gif"` + - `defer_loading: optional boolean or null` - - `"image/webp"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "base64"` + - `enabled: optional boolean or null` - - `"base64"` + 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. - - `URLImageSource object { type, url }` +### Computer Left Mouse Up Config - - `type: "url"` +- `ComputerLeftMouseUpConfig object { defer_loading, enabled }` - - `"url"` + `left_mouse_up`'s config overrides. - - `url: string` + - `defer_loading: optional boolean or null` - - `type: "image"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"image"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. +### Computer Middle Click Config - - `DocumentBlockParam object { source, type, cache_control, 3 more }` +- `ComputerMiddleClickConfig object { defer_loading, enabled }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + `middle_click`'s config overrides. - - `Base64PDFSource object { data, media_type, type }` + - `defer_loading: optional boolean or null` - - `data: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `media_type: "application/pdf"` + - `enabled: optional boolean or null` - - `"application/pdf"` + 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. - - `type: "base64"` +### Computer Mouse Move Config - - `"base64"` +- `ComputerMouseMoveConfig object { defer_loading, enabled }` - - `PlainTextSource object { data, media_type, type }` + `mouse_move`'s config overrides. - - `data: string` + - `defer_loading: optional boolean or null` - - `media_type: "text/plain"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text/plain"` + - `enabled: optional boolean or null` - - `type: "text"` + 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. - - `"text"` +### Computer Right Click Config - - `ContentBlockSource object { content, type }` +- `ComputerRightClickConfig object { defer_loading, enabled }` - - `content: string or array of ContentBlockSourceContent` + `right_click`'s config overrides. - - `string` + - `defer_loading: optional boolean or null` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `TextBlockParam object { text, type, cache_control, citations }` + - `enabled: optional boolean or null` - - `ImageBlockParam object { source, type, cache_control }` + 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. - - `type: "content"` +### Computer Screenshot Config - - `"content"` +- `ComputerScreenshotConfig object { defer_loading, enabled }` - - `URLPDFSource object { type, url }` + `screenshot`'s config overrides. - - `type: "url"` + - `defer_loading: optional boolean or null` - - `"url"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `url: string` + - `enabled: optional boolean or null` - - `type: "document"` + 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. + +### Computer Scroll Config + +- `ComputerScrollConfig object { defer_loading, enabled }` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + +### Computer Toolset 20260801 + +- `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `type: "ephemeral"` + + - `"ephemeral"` + + - `ttl: optional "5m" or "1h"` + + The time-to-live for the cache control breakpoint. + + This may be one the following values: + + - `5m`: 5 minutes + - `1h`: 1 hour - - `"document"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `cache_control: optional CacheControlEphemeral or null` + - `"5m"` - Create a cache control breakpoint at this content block. + - `"1h"` - - `citations: optional CitationsConfigParam or null` + - `configs: optional ComputerToolsetConfigs or null` - - `enabled: optional boolean` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `context: optional string or null` + - `cursor_position: optional ComputerCursorPositionConfig or null` - - `title: optional string or null` + `cursor_position`'s config overrides. - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `defer_loading: optional boolean or null` - - `content: array of TextBlockParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `text: string` + - `enabled: optional boolean or null` - - `type: "text"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `double_click: optional ComputerDoubleClickConfig or null` - Create a cache control breakpoint at this content block. + `double_click`'s config overrides. - - `citations: optional array of TextCitationParam or null` + - `defer_loading: optional boolean or null` - - `source: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `title: string` + - `enabled: optional boolean or null` - - `type: "search_result"` + 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. - - `"search_result"` + - `hold_key: optional ComputerHoldKeyConfig or null` - - `cache_control: optional CacheControlEphemeral or null` + `hold_key`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `citations: optional CitationsConfigParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ThinkingBlockParam object { signature, thinking, type }` + - `enabled: optional boolean or null` - - `signature: string` + 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. - 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. + - `key: optional ComputerKeyConfig or null` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + `key`'s config overrides. - - `thinking: string` + - `defer_loading: optional boolean or null` - The `thinking` text of this block as returned by the API. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "thinking"` + - `enabled: optional boolean or null` - - `"thinking"` + 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. - - `RedactedThinkingBlockParam object { data, type }` + - `left_click: optional ComputerLeftClickConfig or null` - - `data: string` + `left_click`'s config overrides. - 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. + - `defer_loading: optional boolean or null` - - `type: "redacted_thinking"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"redacted_thinking"` + - `enabled: optional boolean or null` - - `ToolUseBlockParam object { id, input, name, 3 more }` + 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. - - `id: string` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - - `input: map[unknown]` + `left_click_drag`'s config overrides. - - `name: string` + - `defer_loading: optional boolean or null` - - `type: "tool_use"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool_use"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + `left_mouse_down`'s config overrides. - Tool invocation directly from the model. + - `defer_loading: optional boolean or null` - - `DirectCaller object { type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Tool invocation directly from the model. + - `enabled: optional boolean or null` - - `type: "direct"` + 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. - - `"direct"` + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - - `ServerToolCaller object { tool_id, type }` + `left_mouse_up`'s config overrides. - Tool invocation generated by a server-side tool. + - `defer_loading: optional boolean or null` - - `tool_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_20250825"` + - `enabled: optional boolean or null` - - `"code_execution_20250825"` + 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. - - `ServerToolCaller20260120 object { tool_id, type }` + - `middle_click: optional ComputerMiddleClickConfig or null` - - `tool_id: string` + `middle_click`'s config overrides. - - `type: "code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "tool_result"` + - `mouse_move: optional ComputerMouseMoveConfig or null` - - `"tool_result"` + `mouse_move`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `enabled: optional boolean or null` - - `string` + 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. - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `right_click: optional ComputerRightClickConfig or null` - - `TextBlockParam object { text, type, cache_control, citations }` + `right_click`'s config overrides. - - `ImageBlockParam object { source, type, cache_control }` + - `defer_loading: optional boolean or null` - - `SearchResultBlockParam object { content, source, title, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `enabled: optional boolean or null` - - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + 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. - Tool reference block that can be included in tool_result content. + - `screenshot: optional ComputerScreenshotConfig or null` - - `tool_name: string` + `screenshot`'s config overrides. - - `type: "tool_reference"` + - `defer_loading: optional boolean or null` - - `"tool_reference"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `is_error: optional boolean` + - `scroll: optional ComputerScrollConfig or null` - - `ServerToolUseBlockParam object { id, input, name, 3 more }` + `scroll`'s config overrides. - - `id: string` + - `defer_loading: optional boolean or null` - - `input: map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `enabled: optional boolean or null` - - `"web_search"` + 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. - - `"web_fetch"` + - `triple_click: optional ComputerTripleClickConfig or null` - - `"code_execution"` + `triple_click`'s config overrides. - - `"bash_code_execution"` + - `defer_loading: optional boolean or null` - - `"text_editor_code_execution"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool_search_tool_regex"` + - `enabled: optional boolean or null` - - `"tool_search_tool_bm25"` + 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. - - `type: "server_tool_use"` + - `type: optional ComputerTypeConfig or null` - - `"server_tool_use"` + `type`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `enabled: optional boolean or null` - Tool invocation directly from the model. + 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. - - `DirectCaller object { type }` + - `wait: optional ComputerWaitConfig or null` - Tool invocation directly from the model. + `wait`'s config overrides. - - `ServerToolCaller object { tool_id, type }` + - `defer_loading: optional boolean or null` - Tool invocation generated by a server-side tool. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ServerToolCaller20260120 object { tool_id, type }` + - `enabled: optional boolean or null` - - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + 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. - - `content: WebSearchToolResultBlockParamContent` + - `zoom: optional ComputerZoomConfig or null` - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + `zoom`'s config overrides. - - `encrypted_content: string` + - `defer_loading: optional boolean or null` - - `title: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "web_search_result"` + - `enabled: optional boolean or null` - - `"web_search_result"` + 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. - - `url: string` +### Computer Toolset Configs - - `page_age: optional string or null` +- `ComputerToolsetConfigs object { cursor_position, double_click, hold_key, 14 more }` - - `WebSearchToolRequestError object { error_code, type }` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `error_code: WebSearchToolResultErrorCode` + - `cursor_position: optional ComputerCursorPositionConfig or null` - - `"invalid_tool_input"` + `cursor_position`'s config overrides. - - `"unavailable"` + - `defer_loading: optional boolean or null` - - `"max_uses_exceeded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"query_too_long"` + 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. - - `"request_too_large"` + - `double_click: optional ComputerDoubleClickConfig or null` - - `type: "web_search_tool_result_error"` + `double_click`'s config overrides. - - `"web_search_tool_result_error"` + - `defer_loading: optional boolean or null` - - `tool_use_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "web_search_tool_result"` + - `enabled: optional boolean or null` - - `"web_search_tool_result"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `hold_key: optional ComputerHoldKeyConfig or null` - Create a cache control breakpoint at this content block. + `hold_key`'s config overrides. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `defer_loading: optional boolean or null` - Tool invocation directly from the model. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `DirectCaller object { type }` + - `enabled: optional boolean or null` - Tool invocation directly from the model. + 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. - - `ServerToolCaller object { tool_id, type }` + - `key: optional ComputerKeyConfig or null` - Tool invocation generated by a server-side tool. + `key`'s config overrides. - - `ServerToolCaller20260120 object { tool_id, type }` + - `defer_loading: optional boolean or null` - - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + - `enabled: optional boolean or null` - - `WebFetchToolResultErrorBlockParam object { error_code, type }` + 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. - - `error_code: WebFetchToolResultErrorCode` + - `left_click: optional ComputerLeftClickConfig or null` - - `"invalid_tool_input"` + `left_click`'s config overrides. - - `"url_too_long"` + - `defer_loading: optional boolean or null` - - `"url_not_allowed"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"url_not_in_prior_context"` + - `enabled: optional boolean or null` - - `"url_not_accessible"` + 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. - - `"unsupported_content_type"` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - - `"too_many_requests"` + `left_click_drag`'s config overrides. - - `"max_uses_exceeded"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "web_fetch_tool_result_error"` + - `enabled: optional boolean or null` - - `"web_fetch_tool_result_error"` + 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. - - `WebFetchBlockParam object { content, type, url, retrieved_at }` + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - - `content: DocumentBlockParam` + `left_mouse_down`'s config overrides. - - `type: "web_fetch_result"` + - `defer_loading: optional boolean or null` - - `"web_fetch_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `url: string` + - `enabled: optional boolean or null` - Fetched content URL + 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. - - `retrieved_at: optional string or null` + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - ISO 8601 timestamp when the content was retrieved + `left_mouse_up`'s config overrides. - - `tool_use_id: string` + - `defer_loading: optional boolean or null` - - `type: "web_fetch_tool_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_fetch_tool_result"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `middle_click: optional ComputerMiddleClickConfig or null` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + `middle_click`'s config overrides. - Tool invocation directly from the model. + - `defer_loading: optional boolean or null` - - `DirectCaller object { type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Tool invocation directly from the model. + - `enabled: optional boolean or null` - - `ServerToolCaller object { tool_id, type }` + 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. - Tool invocation generated by a server-side tool. + - `mouse_move: optional ComputerMouseMoveConfig or null` - - `ServerToolCaller20260120 object { tool_id, type }` + `mouse_move`'s config overrides. - - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `defer_loading: optional boolean or null` - - `content: CodeExecutionToolResultBlockParamContent` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Code execution result with encrypted stdout for PFC + web_search results. + - `enabled: optional boolean or null` - - `CodeExecutionToolResultErrorParam object { error_code, type }` + 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. - - `error_code: CodeExecutionToolResultErrorCode` + - `right_click: optional ComputerRightClickConfig or null` - - `"invalid_tool_input"` + `right_click`'s config overrides. - - `"unavailable"` + - `defer_loading: optional boolean or null` - - `"too_many_requests"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"execution_time_exceeded"` + - `enabled: optional boolean or null` - - `type: "code_execution_tool_result_error"` + 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. - - `"code_execution_tool_result_error"` + - `screenshot: optional ComputerScreenshotConfig or null` - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + `screenshot`'s config overrides. - - `content: array of CodeExecutionOutputBlockParam` + - `defer_loading: optional boolean or null` - - `file_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_output"` + - `enabled: optional boolean or null` - - `"code_execution_output"` + 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. - - `return_code: number` + - `scroll: optional ComputerScrollConfig or null` - - `stderr: string` + `scroll`'s config overrides. - - `stdout: string` + - `defer_loading: optional boolean or null` - - `type: "code_execution_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_result"` + - `enabled: optional boolean or null` - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + 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. - Code execution result with encrypted stdout for PFC + web_search results. + - `triple_click: optional ComputerTripleClickConfig or null` - - `content: array of CodeExecutionOutputBlockParam` + `triple_click`'s config overrides. - - `file_id: string` + - `defer_loading: optional boolean or null` - - `type: "code_execution_output"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `encrypted_stdout: string` + - `enabled: optional boolean or null` - - `return_code: number` + 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. - - `stderr: string` + - `type: optional ComputerTypeConfig or null` - - `type: "encrypted_code_execution_result"` + `type`'s config overrides. - - `"encrypted_code_execution_result"` + - `defer_loading: optional boolean or null` - - `tool_use_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_tool_result"` + - `enabled: optional boolean or null` - - `"code_execution_tool_result"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `wait: optional ComputerWaitConfig or null` - Create a cache control breakpoint at this content block. + `wait`'s config overrides. - - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `defer_loading: optional boolean or null` - - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + - `enabled: optional boolean or null` - - `error_code: BashCodeExecutionToolResultErrorCode` + 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. - - `"invalid_tool_input"` + - `zoom: optional ComputerZoomConfig or null` - - `"unavailable"` + `zoom`'s config overrides. - - `"too_many_requests"` + - `defer_loading: optional boolean or null` - - `"execution_time_exceeded"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"output_file_too_large"` + - `enabled: optional boolean or null` - - `type: "bash_code_execution_tool_result_error"` + 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. - - `"bash_code_execution_tool_result_error"` +### Computer Triple Click Config - - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` +- `ComputerTripleClickConfig object { defer_loading, enabled }` - - `content: array of BashCodeExecutionOutputBlockParam` + `triple_click`'s config overrides. - - `file_id: string` + - `defer_loading: optional boolean or null` - - `type: "bash_code_execution_output"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"bash_code_execution_output"` + - `enabled: optional boolean or null` - - `return_code: number` + 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. - - `stderr: string` +### Computer Type Config - - `stdout: string` +- `ComputerTypeConfig object { defer_loading, enabled }` - - `type: "bash_code_execution_result"` + `type`'s config overrides. - - `"bash_code_execution_result"` + - `defer_loading: optional boolean or null` - - `tool_use_id: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "bash_code_execution_tool_result"` + - `enabled: optional boolean or null` - - `"bash_code_execution_tool_result"` + 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. - - `cache_control: optional CacheControlEphemeral or null` +### Computer Wait Config - Create a cache control breakpoint at this content block. +- `ComputerWaitConfig object { defer_loading, enabled }` - - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + `wait`'s config overrides. - - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + - `defer_loading: optional boolean or null` - - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `enabled: optional boolean or null` - - `"invalid_tool_input"` + 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. - - `"unavailable"` +### Computer Zoom Config - - `"too_many_requests"` +- `ComputerZoomConfig object { defer_loading, enabled }` - - `"execution_time_exceeded"` + `zoom`'s config overrides. - - `"file_not_found"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_code_execution_tool_result_error"` + - `enabled: optional boolean or null` - - `error_message: optional string or null` + 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. - - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` +### Container - - `content: string` +- `Container object { id, expires_at, skills }` - - `file_type: "text" or "image" or "pdf"` + Information about the container used in the request (for the code execution tool) - - `"text"` + - `id: string` - - `"image"` + Identifier for the container used in this request - - `"pdf"` + - `expires_at: string` - - `type: "text_editor_code_execution_view_result"` + The time at which the container will expire. - - `"text_editor_code_execution_view_result"` + - `skills: array of ContainerSkill or null` - - `num_lines: optional number or null` + Skills loaded in the container - - `start_line: optional number or null` + - `skill_id: string` - - `total_lines: optional number or null` + Skill ID - - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `type: "anthropic" or "custom"` - - `is_file_update: boolean` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `type: "text_editor_code_execution_create_result"` + - `"anthropic"` - - `"text_editor_code_execution_create_result"` + - `"custom"` - - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `version: string` - - `type: "text_editor_code_execution_str_replace_result"` + Skill version or 'latest' for most recent version - - `"text_editor_code_execution_str_replace_result"` +### Container Params - - `lines: optional array of string or null` +- `ContainerParams object { id, skills }` - - `new_lines: optional number or null` + Container parameters with skills to be loaded. - - `new_start: optional number or null` + - `id: optional string or null` - - `old_lines: optional number or null` + Container id - - `old_start: optional number or null` + - `skills: optional array of SkillParams or null` - - `tool_use_id: string` + List of skills to load in the container - - `type: "text_editor_code_execution_tool_result"` + - `skill_id: string` - - `"text_editor_code_execution_tool_result"` + Skill ID - - `cache_control: optional CacheControlEphemeral or null` + - `type: "anthropic" or "custom"` - Create a cache control breakpoint at this content block. + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `"anthropic"` - - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + - `"custom"` - - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `version: optional string` - - `error_code: ToolSearchToolResultErrorCode` + Skill version or 'latest' for most recent version - - `"invalid_tool_input"` +### Container Skill - - `"unavailable"` +- `ContainerSkill object { skill_id, type, version }` - - `"too_many_requests"` + A skill that was loaded in a container (response model). - - `"execution_time_exceeded"` + - `skill_id: string` - - `type: "tool_search_tool_result_error"` + Skill ID - - `"tool_search_tool_result_error"` + - `type: "anthropic" or "custom"` - - `error_message: optional string or null` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + - `"anthropic"` - - `tool_references: array of ToolReferenceBlockParam` + - `"custom"` - - `tool_name: string` + - `version: string` - - `type: "tool_reference"` + Skill version or 'latest' for most recent version - - `cache_control: optional CacheControlEphemeral or null` +### Container Upload Block - Create a cache control breakpoint at this content block. +- `ContainerUploadBlock object { file_id, type }` - - `type: "tool_search_tool_search_result"` + Response model for a file uploaded to the container. - - `"tool_search_tool_search_result"` + - `file_id: string` - - `tool_use_id: string` + - `type: "container_upload"` - - `type: "tool_search_tool_result"` + - `"container_upload"` - - `"tool_search_tool_result"` +### Container Upload Block Param - - `cache_control: optional CacheControlEphemeral or null` +- `ContainerUploadBlockParam object { file_id, type, cache_control }` - Create a cache control breakpoint at this content block. + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - - `ContainerUploadBlockParam object { file_id, type, cache_control }` + - `file_id: string` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + - `type: "container_upload"` - - `file_id: string` + - `"container_upload"` - - `type: "container_upload"` + - `cache_control: optional CacheControlEphemeral or null` - - `"container_upload"` + Create a cache control breakpoint at this content block. - - `cache_control: optional CacheControlEphemeral or null` + - `type: "ephemeral"` - Create a cache control breakpoint at this content block. + - `"ephemeral"` - - `MidConversationSystemBlockParam object { content, type, cache_control }` + - `ttl: optional "5m" or "1h"` - System instructions that appear mid-conversation. + The time-to-live for the cache control breakpoint. - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + This may be one the following values: - - `content: array of TextBlockParam` + - `5m`: 5 minutes + - `1h`: 1 hour - System instruction text blocks. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `text: string` + - `"5m"` - - `type: "text"` + - `"1h"` - - `cache_control: optional CacheControlEphemeral or null` +### Content Block - Create a cache control breakpoint at this content block. +- `ContentBlock = TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` - - `citations: optional array of TextCitationParam or null` + Response model for a file uploaded to the container. - - `type: "mid_conv_system"` + - `TextBlock object { citations, text, type }` - - `"mid_conv_system"` + - `citations: array of TextCitation or null` - - `cache_control: optional CacheControlEphemeral or null` + Citations supporting the text block. - Create a cache control breakpoint at this content block. + 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`. - - `role: "user" or "assistant" or "system"` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `"user"` + - `cited_text: string` - - `"assistant"` + - `document_index: number` - - `"system"` + - `document_title: string or null` -- `model: Model` + - `end_char_index: number` - The model that will complete your prompt. + - `file_id: string or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `start_char_index: number` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "char_location"` - The model that will complete your prompt. + - `"char_location"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"claude-sonnet-5"` + - `cited_text: string` - High-performance model for coding and agents + - `document_index: number` - - `"claude-fable-5"` + - `document_title: string or null` - Next generation of intelligence for the hardest knowledge work and coding problems + - `end_page_number: number` - - `"claude-mythos-5"` + - `file_id: string or null` - Most capable model for cybersecurity and biology research + - `start_page_number: number` - - `"claude-opus-5"` + - `type: "page_location"` - Powerful intelligence for long-running agents and coding + - `"page_location"` - - `"claude-opus-4-8"` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - Powerful intelligence for long-running agents and coding + - `cited_text: string` - - `"claude-opus-4-7"` + The full text of the cited block range, concatenated. - Powerful intelligence for long-running agents and coding + 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. - - `"claude-mythos-preview"` + - `document_index: number` - New class of intelligence, strongest in coding and cybersecurity + - `document_title: string or null` - - `"claude-opus-4-6"` + - `end_block_index: number` - Powerful intelligence for long-running agents and coding + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"claude-sonnet-4-6"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Best combination of speed and intelligence + - `file_id: string or null` - - `"claude-haiku-4-5"` + - `start_block_index: number` - Fastest model with near-frontier intelligence + 0-based index of the first cited block in the source's `content` array. - - `"claude-haiku-4-5-20251001"` + - `type: "content_block_location"` - Fastest model with near-frontier intelligence + - `"content_block_location"` - - `"claude-opus-4-5"` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - Powerful intelligence for long-running agents and coding + - `cited_text: string` - - `"claude-opus-4-5-20251101"` + - `encrypted_index: string` - Powerful intelligence for long-running agents and coding + - `title: string or null` - - `"claude-sonnet-4-5"` + - `type: "web_search_result_location"` - High-performance model for agents and coding + - `"web_search_result_location"` - - `"claude-sonnet-4-5-20250929"` + - `url: string` - High-performance model for agents and coding + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `string` + - `cited_text: string` -- `cache_control: optional CacheControlEphemeral or null` + The full text of the cited block range, concatenated. - Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + 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. -- `output_config: optional OutputConfig` + - `end_block_index: number` - Configuration options for the model's output, such as the output format. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `effort: optional "low" or "medium" or "high" or 2 more or null` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - All possible effort levels. + - `search_result_index: number` - - `"low"` + 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. - - `"medium"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"high"` + - `source: string` - - `"xhigh"` + - `start_block_index: number` - - `"max"` + 0-based index of the first cited block in the source's `content` array. - - `format: optional JSONOutputFormat or null` + - `title: string or null` - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + - `type: "search_result_location"` - - `schema: map[unknown]` + - `"search_result_location"` - The JSON schema of the format + - `text: string` - - `type: "json_schema"` + - `type: "text"` - - `"json_schema"` + - `"text"` -- `system: optional string or array of TextBlockParam` + - `ThinkingBlock object { signature, thinking, type }` - System prompt. + - `signature: string` - 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). + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `string` + 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. - - `array of TextBlockParam` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `text: string` + - `thinking: string` - - `type: "text"` + The text of Claude's thinking process for this block. - - `cache_control: optional CacheControlEphemeral or null` + - `type: "thinking"` - Create a cache control breakpoint at this content block. + - `"thinking"` - - `citations: optional array of TextCitationParam or null` + - `RedactedThinkingBlock object { data, type }` -- `thinking: optional ThinkingConfigParam` + - `data: string` - Configuration for enabling Claude's extended thinking. + 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. - 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. + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `ThinkingConfigEnabled object { budget_tokens, type, display }` + - `type: "redacted_thinking"` - - `budget_tokens: number` + - `"redacted_thinking"` - 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. + - `ToolUseBlock object { id, caller, input, 3 more }` - Must be ≥1024 and less than `max_tokens`. + - `id: string` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "enabled"` + Tool invocation directly from the model. - - `"enabled"` + - `DirectCaller object { type }` - - `display: optional "summarized" or "omitted" or null` + Tool invocation directly from the model. - 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`. + - `type: "direct"` - - `"summarized"` + - `"direct"` - - `"omitted"` + - `ServerToolCaller object { tool_id, type }` - - `ThinkingConfigDisabled object { type }` + Tool invocation generated by a server-side tool. - - `type: "disabled"` + - `tool_id: string` - - `"disabled"` + - `type: "code_execution_20250825"` - - `ThinkingConfigAdaptive object { type, display }` + - `"code_execution_20250825"` - - `type: "adaptive"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"adaptive"` + - `tool_id: string` - - `display: optional "summarized" or "omitted" or null` + - `type: "code_execution_20260120"` - 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`. + - `"code_execution_20260120"` - - `"summarized"` + - `input: map[unknown]` - - `"omitted"` + - `name: string` -- `tool_choice: optional ToolChoice` + - `type: "tool_use"` - 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. + - `"tool_use"` - - `ToolChoiceAuto object { type, disable_parallel_tool_use }` + - `toolset_name: optional string or null` - The model will automatically decide whether to use tools. + For a toolset member tool_use, the toolset family. - - `type: "auto"` + - `ServerToolUseBlock object { id, caller, input, 2 more }` - - `"auto"` + - `id: string` - - `disable_parallel_tool_use: optional boolean` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - Whether to disable parallel tool use. + Tool invocation directly from the model. - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `DirectCaller object { type }` - - `ToolChoiceAny object { type, disable_parallel_tool_use }` + Tool invocation directly from the model. - The model will use any available tools. + - `ServerToolCaller object { tool_id, type }` - - `type: "any"` + Tool invocation generated by a server-side tool. - - `"any"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `disable_parallel_tool_use: optional boolean` + - `input: map[unknown]` - Whether to disable parallel tool use. + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `"web_search"` - - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` + - `"web_fetch"` - The model will use the specified tool with `tool_choice.name`. + - `"code_execution"` - - `name: string` + - `"bash_code_execution"` - The name of the tool to use. + - `"text_editor_code_execution"` - - `type: "tool"` + - `"tool_search_tool_regex"` - - `"tool"` + - `"tool_search_tool_bm25"` - - `disable_parallel_tool_use: optional boolean` + - `type: "server_tool_use"` - Whether to disable parallel tool use. + - `"server_tool_use"` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `ToolChoiceNone object { type }` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - The model will not be allowed to use tools. + Tool invocation directly from the model. - - `type: "none"` + - `DirectCaller object { type }` - - `"none"` + Tool invocation directly from the model. -- `tools: optional array of MessageCountTokensTool` + - `ServerToolCaller object { tool_id, type }` - Definitions of tools that the model may use. + Tool invocation generated by a server-side tool. - 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. + - `ServerToolCaller20260120 object { tool_id, type }` - 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)). + - `content: WebSearchToolResultBlockContent` - Each tool definition includes: + - `WebSearchToolResultError object { error_code, type }` - * `name`: Name of the tool. - * `description`: Optional, but strongly-recommended description of the tool. - * `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. + - `error_code: WebSearchToolResultErrorCode` - For example, if you defined `tools` as: + - `"invalid_tool_input"` - ```json - [ - { - "name": "get_stock_price", - "description": "Get the current stock price for a given ticker symbol.", - "input_schema": { - "type": "object", - "properties": { - "ticker": { - "type": "string", - "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." - } - }, - "required": ["ticker"] - } - } - ] - ``` + - `"unavailable"` - 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: + - `"max_uses_exceeded"` - ```json - [ - { - "type": "tool_use", - "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", - "name": "get_stock_price", - "input": { "ticker": "^GSPC" } - } - ] - ``` + - `"too_many_requests"` - 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: + - `"query_too_long"` - ```json - [ - { - "type": "tool_result", - "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", - "content": "259.75 USD" - } - ] - ``` + - `"request_too_large"` - 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. + - `type: "web_search_tool_result_error"` - See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + - `"web_search_tool_result_error"` - - `Tool object { input_schema, name, allowed_callers, 7 more }` + - `array of WebSearchResultBlock` - - `input_schema: object { type, properties, required }` + - `encrypted_content: string` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + - `page_age: string or null` - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `title: string` - - `type: "object"` + - `type: "web_search_result"` - - `"object"` + - `"web_search_result"` - - `properties: optional map[unknown] or null` + - `url: string` - - `required: optional array of string or null` + - `tool_use_id: string` - - `name: string` + - `type: "web_search_tool_result"` - Name of the tool. + - `"web_search_tool_result"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"direct"` + Tool invocation directly from the model. - - `"code_execution_20250825"` + - `DirectCaller object { type }` - - `"code_execution_20260120"` + Tool invocation directly from the model. - - `"code_execution_20260521"` + - `ServerToolCaller object { tool_id, type }` - - `cache_control: optional CacheControlEphemeral or null` + Tool invocation generated by a server-side tool. - Create a cache control breakpoint at this content block. + - `ServerToolCaller20260120 object { tool_id, type }` - - `defer_loading: optional boolean` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `WebFetchToolResultErrorBlock object { error_code, type }` - - `description: optional string` + - `error_code: WebFetchToolResultErrorCode` - Description of what this tool does. + - `"invalid_tool_input"` - 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. + - `"url_too_long"` - - `eager_input_streaming: optional boolean or null` + - `"url_not_allowed"` - 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. + - `"url_not_in_prior_context"` - - `input_examples: optional array of map[unknown]` + - `"url_not_accessible"` - - `strict: optional boolean` + - `"unsupported_content_type"` - When true, guarantees schema validation on tool names and inputs + - `"too_many_requests"` - - `type: optional "custom" or null` + - `"max_uses_exceeded"` - - `"custom"` + - `"unavailable"` - - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` + - `type: "web_fetch_tool_result_error"` - - `name: "bash"` + - `"web_fetch_tool_result_error"` - Name of the tool. + - `WebFetchBlock object { content, retrieved_at, type, url }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `content: DocumentBlock` - - `"bash"` + - `citations: CitationsConfig or null` - - `type: "bash_20250124"` + Citation configuration for the document - - `"bash_20250124"` + - `enabled: boolean` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `source: Base64PDFSource or PlainTextSource` - - `"direct"` + - `Base64PDFSource object { data, media_type, type }` - - `"code_execution_20250825"` + - `data: string` - - `"code_execution_20260120"` + - `media_type: "application/pdf"` - - `"code_execution_20260521"` + - `"application/pdf"` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "base64"` - Create a cache control breakpoint at this content block. + - `"base64"` - - `defer_loading: optional boolean` + - `PlainTextSource object { data, media_type, type }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `data: string` - - `input_examples: optional array of map[unknown]` + - `media_type: "text/plain"` - - `strict: optional boolean` + - `"text/plain"` - When true, guarantees schema validation on tool names and inputs + - `type: "text"` - - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + - `"text"` - - `name: "code_execution"` + - `title: string or null` - Name of the tool. + The title of the document - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "document"` - - `"code_execution"` + - `"document"` - - `type: "code_execution_20250522"` + - `retrieved_at: string or null` - - `"code_execution_20250522"` + ISO 8601 timestamp when the content was retrieved - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "web_fetch_result"` - - `"direct"` + - `"web_fetch_result"` - - `"code_execution_20250825"` + - `url: string` - - `"code_execution_20260120"` + Fetched content URL - - `"code_execution_20260521"` + - `tool_use_id: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "web_fetch_tool_result"` - Create a cache control breakpoint at this content block. + - `"web_fetch_tool_result"` - - `defer_loading: optional boolean` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `content: CodeExecutionToolResultBlockContent` - - `strict: optional boolean` + Code execution result with encrypted stdout for PFC + web_search results. - When true, guarantees schema validation on tool names and inputs + - `CodeExecutionToolResultError object { error_code, type }` - - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + - `error_code: CodeExecutionToolResultErrorCode` - - `name: "code_execution"` + - `"invalid_tool_input"` - Name of the tool. + - `"unavailable"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"too_many_requests"` - - `"code_execution"` + - `"execution_time_exceeded"` - - `type: "code_execution_20250825"` + - `type: "code_execution_tool_result_error"` - - `"code_execution_20250825"` + - `"code_execution_tool_result_error"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"direct"` + - `content: array of CodeExecutionOutputBlock` - - `"code_execution_20250825"` + - `file_id: string` - - `"code_execution_20260120"` + - `type: "code_execution_output"` - - `"code_execution_20260521"` + - `"code_execution_output"` - - `cache_control: optional CacheControlEphemeral or null` + - `return_code: number` - Create a cache control breakpoint at this content block. + - `stderr: string` - - `defer_loading: optional boolean` + - `stdout: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "code_execution_result"` - - `strict: optional boolean` + - `"code_execution_result"` - When true, guarantees schema validation on tool names and inputs + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + Code execution result with encrypted stdout for PFC + web_search results. - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `content: array of CodeExecutionOutputBlock` - - `name: "code_execution"` + - `file_id: string` - Name of the tool. + - `type: "code_execution_output"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `encrypted_stdout: string` - - `"code_execution"` + - `return_code: number` - - `type: "code_execution_20260120"` + - `stderr: string` - - `"code_execution_20260120"` + - `type: "encrypted_code_execution_result"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"encrypted_code_execution_result"` - - `"direct"` + - `tool_use_id: string` - - `"code_execution_20250825"` + - `type: "code_execution_tool_result"` - - `"code_execution_20260120"` + - `"code_execution_tool_result"` - - `"code_execution_20260521"` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` - Create a cache control breakpoint at this content block. + - `BashCodeExecutionToolResultError object { error_code, type }` - - `defer_loading: optional boolean` + - `error_code: BashCodeExecutionToolResultErrorCode` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"invalid_tool_input"` - - `strict: optional boolean` + - `"unavailable"` - When true, guarantees schema validation on tool names and inputs + - `"too_many_requests"` - - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + - `"execution_time_exceeded"` - Code execution tool with REPL state persistence. + - `"output_file_too_large"` - - `name: "code_execution"` + - `type: "bash_code_execution_tool_result_error"` - Name of the tool. + - `"bash_code_execution_tool_result_error"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"code_execution"` + - `content: array of BashCodeExecutionOutputBlock` - - `type: "code_execution_20260521"` + - `file_id: string` - - `"code_execution_20260521"` + - `type: "bash_code_execution_output"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"bash_code_execution_output"` - - `"direct"` + - `return_code: number` - - `"code_execution_20250825"` + - `stderr: string` - - `"code_execution_20260120"` + - `stdout: string` - - `"code_execution_20260521"` + - `type: "bash_code_execution_result"` - - `cache_control: optional CacheControlEphemeral or null` + - `"bash_code_execution_result"` - Create a cache control breakpoint at this content block. + - `tool_use_id: string` - - `defer_loading: optional boolean` + - `type: "bash_code_execution_tool_result"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"bash_code_execution_tool_result"` - - `strict: optional boolean` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - When true, guarantees schema validation on tool names and inputs + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `name: "memory"` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - Name of the tool. + - `"invalid_tool_input"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"unavailable"` - - `"memory"` + - `"too_many_requests"` - - `type: "memory_20250818"` + - `"execution_time_exceeded"` - - `"memory_20250818"` + - `"file_not_found"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `error_message: string or null` - - `"direct"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"code_execution_20250825"` + - `"text_editor_code_execution_tool_result_error"` - - `"code_execution_20260120"` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `"code_execution_20260521"` + - `content: string` - - `cache_control: optional CacheControlEphemeral or null` + - `file_type: "text" or "image" or "pdf"` - Create a cache control breakpoint at this content block. + - `"text"` - - `defer_loading: optional boolean` + - `"image"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"pdf"` - - `input_examples: optional array of map[unknown]` + - `num_lines: number or null` - - `strict: optional boolean` + - `start_line: number or null` - When true, guarantees schema validation on tool names and inputs + - `total_lines: number or null` - - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + - `type: "text_editor_code_execution_view_result"` - - `name: "str_replace_editor"` + - `"text_editor_code_execution_view_result"` - Name of the tool. + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `is_file_update: boolean` - - `"str_replace_editor"` + - `type: "text_editor_code_execution_create_result"` - - `type: "text_editor_20250124"` + - `"text_editor_code_execution_create_result"` - - `"text_editor_20250124"` + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `lines: array of string or null` - - `"direct"` + - `new_lines: number or null` - - `"code_execution_20250825"` + - `new_start: number or null` - - `"code_execution_20260120"` + - `old_lines: number or null` - - `"code_execution_20260521"` + - `old_start: number or null` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "text_editor_code_execution_str_replace_result"` - Create a cache control breakpoint at this content block. + - `"text_editor_code_execution_str_replace_result"` - - `defer_loading: optional boolean` + - `tool_use_id: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "text_editor_code_execution_tool_result"` - - `input_examples: optional array of map[unknown]` + - `"text_editor_code_execution_tool_result"` - - `strict: optional boolean` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - When true, guarantees schema validation on tool names and inputs + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `name: "str_replace_based_edit_tool"` + - `error_code: ToolSearchToolResultErrorCode` - Name of the tool. + - `"invalid_tool_input"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"unavailable"` - - `"str_replace_based_edit_tool"` + - `"too_many_requests"` - - `type: "text_editor_20250429"` + - `"execution_time_exceeded"` - - `"text_editor_20250429"` + - `error_message: string or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "tool_search_tool_result_error"` - - `"direct"` + - `"tool_search_tool_result_error"` - - `"code_execution_20250825"` + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - - `"code_execution_20260120"` + - `tool_references: array of ToolReferenceBlock` - - `"code_execution_20260521"` + - `tool_name: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "tool_reference"` - Create a cache control breakpoint at this content block. + - `"tool_reference"` - - `defer_loading: optional boolean` + - `type: "tool_search_tool_search_result"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"tool_search_tool_search_result"` - - `input_examples: optional array of map[unknown]` + - `tool_use_id: string` - - `strict: optional boolean` + - `type: "tool_search_tool_result"` - When true, guarantees schema validation on tool names and inputs + - `"tool_search_tool_result"` - - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + - `ContainerUploadBlock object { file_id, type }` - - `name: "str_replace_based_edit_tool"` + Response model for a file uploaded to the container. - Name of the tool. + - `file_id: string` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "container_upload"` - - `"str_replace_based_edit_tool"` + - `"container_upload"` - - `type: "text_editor_20250728"` +### Content Block Param - - `"text_editor_20250728"` +- `ContentBlockParam = TextBlockParam or ImageBlockParam or DocumentBlockParam or 13 more` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Regular text content. - - `"direct"` + - `TextBlockParam object { text, type, cache_control, citations }` - - `"code_execution_20250825"` + - `text: string` - - `"code_execution_20260120"` + - `type: "text"` - - `"code_execution_20260521"` + - `"text"` - `cache_control: optional CacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `type: "ephemeral"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"ephemeral"` - - `input_examples: optional array of map[unknown]` + - `ttl: optional "5m" or "1h"` - - `max_characters: optional number or null` + The time-to-live for the cache control breakpoint. - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + This may be one the following values: - - `strict: optional boolean` + - `5m`: 5 minutes + - `1h`: 1 hour - When true, guarantees schema validation on tool names and inputs + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + - `"5m"` - - `name: "web_search"` + - `"1h"` - Name of the tool. + - `citations: optional array of TextCitationParam or null` - This is how the tool will be called by the model and in `tool_use` blocks. + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"web_search"` + - `cited_text: string` - - `type: "web_search_20250305"` + - `document_index: number` - - `"web_search_20250305"` + - `document_title: string or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `end_char_index: number` - - `"direct"` + - `start_char_index: number` - - `"code_execution_20250825"` + - `type: "char_location"` - - `"code_execution_20260120"` + - `"char_location"` - - `"code_execution_20260521"` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `allowed_domains: optional array of string or null` + - `cited_text: string` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `document_index: number` - - `blocked_domains: optional array of string or null` + - `document_title: string or null` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `end_page_number: number` - - `cache_control: optional CacheControlEphemeral or null` + - `start_page_number: number` - Create a cache control breakpoint at this content block. + - `type: "page_location"` - - `defer_loading: optional boolean` + - `"page_location"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `max_uses: optional number or null` + - `cited_text: string` - Maximum number of times the tool can be used in the API request. + The full text of the cited block range, concatenated. - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `document_index: number` - - `user_location: optional UserLocation or null` + - `document_title: string or null` - Parameters for the user's location. Used to provide more relevant search results. + - `end_block_index: number` - - `type: "approximate"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"approximate"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `city: optional string or null` + - `start_block_index: number` - The city of the user. + 0-based index of the first cited block in the source's `content` array. - - `country: optional string or null` + - `type: "content_block_location"` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + - `"content_block_location"` - - `region: optional string or null` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - The region of the user. + - `cited_text: string` - - `timezone: optional string or null` + - `encrypted_index: string` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `title: string or null` - - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + - `type: "web_search_result_location"` - - `name: "web_fetch"` + - `"web_search_result_location"` - Name of the tool. + - `url: string` - This is how the tool will be called by the model and in `tool_use` blocks. + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"web_fetch"` + - `cited_text: string` - - `type: "web_fetch_20250910"` + The full text of the cited block range, concatenated. - - `"web_fetch_20250910"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `end_block_index: number` - - `"direct"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"code_execution_20250825"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"code_execution_20260120"` + - `search_result_index: number` - - `"code_execution_20260521"` + 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. - - `allowed_domains: optional array of string or null` + Counted separately from `document_index`; server-side web search results are not included in this count. - List of domains to allow fetching from + - `source: string` - - `blocked_domains: optional array of string or null` + - `start_block_index: number` - List of domains to block fetching from + 0-based index of the first cited block in the source's `content` array. - - `cache_control: optional CacheControlEphemeral or null` + - `title: string or null` - Create a cache control breakpoint at this content block. + - `type: "search_result_location"` - - `citations: optional CitationsConfigParam or null` + - `"search_result_location"` - Citations configuration for fetched documents. Citations are disabled by default. + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `defer_loading: optional boolean` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `Base64ImageSource object { data, media_type, type }` - - `max_content_tokens: optional number or null` + - `data: string` - 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. + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `max_uses: optional number or null` + - `"image/jpeg"` - Maximum number of times the tool can be used in the API request. + - `"image/png"` - - `strict: optional boolean` + - `"image/gif"` - When true, guarantees schema validation on tool names and inputs + - `"image/webp"` - - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + - `type: "base64"` - - `name: "web_search"` + - `"base64"` - Name of the tool. + - `URLImageSource object { type, url }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "url"` - - `"web_search"` + - `"url"` - - `type: "web_search_20260209"` + - `url: string` - - `"web_search_20260209"` + - `FileImageSource object { file_id, type }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `file_id: string` - - `"direct"` + - `type: "file"` - - `"code_execution_20250825"` + - `"file"` - - `"code_execution_20260120"` + - `type: "image"` - - `"code_execution_20260521"` + - `"image"` - - `allowed_domains: optional array of string or null` + - `cache_control: optional CacheControlEphemeral or null` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + Create a cache control breakpoint at this content block. - - `blocked_domains: optional array of string or null` + - `transformations: optional ImageTransformationsParam or null` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `oversized_image: optional "downsize" or "error"` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `"downsize"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"error"` - - `max_uses: optional number or null` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - Maximum number of times the tool can be used in the API request. + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `strict: optional boolean` + - `Base64PDFSource object { data, media_type, type }` - When true, guarantees schema validation on tool names and inputs + - `data: string` - - `user_location: optional UserLocation or null` + - `media_type: "application/pdf"` - Parameters for the user's location. Used to provide more relevant search results. + - `"application/pdf"` - - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` + - `type: "base64"` - - `name: "web_fetch"` + - `"base64"` - Name of the tool. + - `PlainTextSource object { data, media_type, type }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `data: string` - - `"web_fetch"` + - `media_type: "text/plain"` - - `type: "web_fetch_20260209"` + - `"text/plain"` - - `"web_fetch_20260209"` + - `type: "text"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"text"` - - `"direct"` + - `ContentBlockSource object { content, type }` - - `"code_execution_20250825"` + - `content: string or array of ContentBlockSourceContent` - - `"code_execution_20260120"` + - `string` - - `"code_execution_20260521"` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `allowed_domains: optional array of string or null` + - `TextBlockParam object { text, type, cache_control, citations }` - List of domains to allow fetching from + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `blocked_domains: optional array of string or null` + - `type: "content"` - List of domains to block fetching from + - `"content"` - - `cache_control: optional CacheControlEphemeral or null` + - `URLPDFSource object { type, url }` - Create a cache control breakpoint at this content block. + - `type: "url"` - - `citations: optional CitationsConfigParam or null` + - `"url"` - Citations configuration for fetched documents. Citations are disabled by default. + - `url: string` - - `defer_loading: optional boolean` + - `FileDocumentSource object { file_id, type }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `file_id: string` - - `max_content_tokens: optional number or null` + - `type: "file"` - 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. + - `"file"` - - `max_uses: optional number or null` + - `type: "document"` - Maximum number of times the tool can be used in the API request. + - `"document"` - - `strict: optional boolean` + - `cache_control: optional CacheControlEphemeral or null` - When true, guarantees schema validation on tool names and inputs + Create a cache control breakpoint at this content block. + + - `citations: optional CitationsConfigParam or null` + + - `enabled: optional boolean` + + - `context: optional string or null` + + - `title: optional string or null` - - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + - `SearchResultBlockParam object { content, source, title, 3 more }` - Web fetch tool with use_cache parameter for bypassing cached content. + - `content: array of TextBlockParam` - - `name: "web_fetch"` + - `text: string` - Name of the tool. + - `type: "text"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `cache_control: optional CacheControlEphemeral or null` - - `"web_fetch"` + Create a cache control breakpoint at this content block. - - `type: "web_fetch_20260309"` + - `citations: optional array of TextCitationParam or null` - - `"web_fetch_20260309"` + - `source: string` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `title: string` - - `"direct"` + - `type: "search_result"` - - `"code_execution_20250825"` + - `"search_result"` - - `"code_execution_20260120"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20260521"` + Create a cache control breakpoint at this content block. - - `allowed_domains: optional array of string or null` + - `citations: optional CitationsConfigParam` - List of domains to allow fetching from + - `ThinkingBlockParam object { signature, thinking, type }` - - `blocked_domains: optional array of string or null` + - `signature: string` - List of domains to block fetching from + 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. - - `cache_control: optional CacheControlEphemeral or null` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - Create a cache control breakpoint at this content block. + - `thinking: string` - - `citations: optional CitationsConfigParam or null` + The `thinking` text of this block as returned by the API. - Citations configuration for fetched documents. Citations are disabled by default. + - `type: "thinking"` - - `defer_loading: optional boolean` + - `"thinking"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `RedactedThinkingBlockParam object { data, type }` - - `max_content_tokens: optional number or null` + - `data: string` - 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. + 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. - - `max_uses: optional number or null` + - `type: "redacted_thinking"` - Maximum number of times the tool can be used in the API request. + - `"redacted_thinking"` - - `strict: optional boolean` + - `ToolUseBlockParam object { id, input, name, 4 more }` - When true, guarantees schema validation on tool names and inputs + - `id: string` - - `use_cache: optional boolean` + - `input: map[unknown]` - 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. + - `name: string` - - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + - `type: "tool_use"` - - `name: "web_search"` + - `"tool_use"` - Name of the tool. + - `cache_control: optional CacheControlEphemeral or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Create a cache control breakpoint at this content block. - - `"web_search"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "web_search_20260318"` + Tool invocation directly from the model. - - `"web_search_20260318"` + - `DirectCaller object { type }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Tool invocation directly from the model. - - `"direct"` + - `type: "direct"` - - `"code_execution_20250825"` + - `"direct"` - - `"code_execution_20260120"` + - `ServerToolCaller object { tool_id, type }` - - `"code_execution_20260521"` + Tool invocation generated by a server-side tool. - - `allowed_domains: optional array of string or null` + - `tool_id: string` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `type: "code_execution_20250825"` - - `blocked_domains: optional array of string or null` + - `"code_execution_20250825"` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `ServerToolCaller20260120 object { tool_id, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `tool_id: string` - Create a cache control breakpoint at this content block. + - `type: "code_execution_20260120"` - - `defer_loading: optional boolean` + - `"code_execution_20260120"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `toolset_name: optional string or null` - - `max_uses: optional number or null` + For a toolset member tool_use, the toolset family this member belongs to. - Maximum number of times the tool can be used in the API request. + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `response_inclusion: optional "full" or "excluded"` + - `tool_use_id: string` - 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. + - `type: "tool_result"` - - `"full"` + - `"tool_result"` - - `"excluded"` + - `cache_control: optional CacheControlEphemeral or null` - - `strict: optional boolean` + Create a cache control breakpoint at this content block. - When true, guarantees schema validation on tool names and inputs + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `user_location: optional UserLocation or null` + - `string` - Parameters for the user's location. Used to provide more relevant search results. + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + - `TextBlockParam object { text, type, cache_control, citations }` - - `name: "web_fetch"` + - `ImageBlockParam object { source, type, cache_control, transformations }` - Name of the tool. + - `SearchResultBlockParam object { content, source, title, 3 more }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `"web_fetch"` + - `ToolReferenceBlockParam object { tool_name, type, cache_control }` - - `type: "web_fetch_20260318"` + Tool reference block that can be included in tool_result content. - - `"web_fetch_20260318"` + - `tool_name: string` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "tool_reference"` - - `"direct"` + - `"tool_reference"` - - `"code_execution_20250825"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20260120"` + Create a cache control breakpoint at this content block. - - `"code_execution_20260521"` + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `allowed_domains: optional array of string or null` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - List of domains to allow fetching from + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `blocked_domains: optional array of string or null` + - `tabs: array of BrowserStateTabEntry` - List of domains to block fetching from + 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`. - - `cache_control: optional CacheControlEphemeral or null` + - `tab_id: string` - Create a cache control breakpoint at this content block. + The caller-assigned identifier for this tab, unique within the inventory. - - `citations: optional CitationsConfigParam or null` + - `title: string` - Citations configuration for fetched documents. Citations are disabled by default. + The title of the page the tab is showing. May be empty. - - `defer_loading: optional boolean` + - `url: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + The URL of the page the tab is showing. May be empty. - - `max_content_tokens: optional number or null` + - `active: optional boolean` - 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. + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `max_uses: optional number or null` + - `type: "browser_state"` - Maximum number of times the tool can be used in the API request. + - `"browser_state"` - - `response_inclusion: optional "full" or "excluded"` + - `cache_control: optional CacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - - `"full"` + - `state_changes: optional array of BrowserStateChange or null` - - `"excluded"` + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `strict: optional boolean` + - `BrowserStateChangeTabOpened object { tab_id, type }` - When true, guarantees schema validation on tool names and inputs + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `use_cache: optional boolean` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - 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. + - `tab_id: string` - - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + The `tab_id` of the opened tab, present in `tabs`. - - `name: "tool_search_tool_bm25"` + - `type: "tab_opened"` - Name of the tool. + - `"tab_opened"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` - - `"tool_search_tool_bm25"` + A file download that started during this call. - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + - `download_id: string` - - `"tool_search_tool_bm25_20251119"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `"tool_search_tool_bm25"` + - `type: "download_started"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"download_started"` - - `"direct"` + - `url: string` - - `"code_execution_20250825"` + The final post-redirect URL the download was served from. - - `"code_execution_20260120"` + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `"code_execution_20260521"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - - `cache_control: optional CacheControlEphemeral or null` + - `download_id: string` - Create a cache control breakpoint at this content block. + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `defer_loading: optional boolean` + - `type: "download_completed"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"download_completed"` - - `strict: optional boolean` + - `url: string` - When true, guarantees schema validation on tool names and inputs + The final post-redirect URL the download was served from. - - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + - `path: optional string or null` - - `name: "tool_search_tool_regex"` + 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. - Name of the tool. + - `size_bytes: optional number or null` - This is how the tool will be called by the model and in `tool_use` blocks. + The completed download's size. - - `"tool_search_tool_regex"` + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + A file download that failed — or was cancelled — during this call. - - `"tool_search_tool_regex_20251119"` + - `download_id: string` - - `"tool_search_tool_regex"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "download_failed"` - - `"direct"` + - `"download_failed"` - - `"code_execution_20250825"` + - `url: string` - - `"code_execution_20260120"` + The final post-redirect URL the download was served from. - - `"code_execution_20260521"` + - `error: optional string or null` - - `cache_control: optional CacheControlEphemeral or null` + The failure or cancellation detail, when known. - Create a cache control breakpoint at this content block. + - `is_error: optional boolean` - - `defer_loading: optional boolean` + - `toolset_name: optional string or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + For a toolset member tool_result, the toolset family of the paired tool_use. - - `strict: optional boolean` + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - When true, guarantees schema validation on tool names and inputs + - `id: string` -### Returns + - `input: map[unknown]` -- `MessageTokensCount object { input_tokens }` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `input_tokens: number` + - `"web_search"` - The total number of tokens across the provided list of messages, system prompt, and tools. + - `"web_fetch"` -### Example + - `"code_execution"` -```http -curl https://api.anthropic.com/v1/messages/count_tokens \ - -H 'Content-Type: application/json' \ - -H 'anthropic-version: 2023-06-01' \ - -H "X-Api-Key: $ANTHROPIC_API_KEY" \ - -d '{ - "messages": [ - { - "content": "Hello, world", - "role": "user" - } - ], - "model": "claude-opus-4-6", - "system": [ - { - "text": "Today'\''s date is 2024-06-01.", - "type": "text" - } - ], - "thinking": { - "type": "adaptive" - }, - "tools": [ - { - "input_schema": { - "type": "object", - "properties": { - "location": "bar", - "unit": "bar" - }, - "required": [ - "location" - ] - }, - "name": "name" - } - ] - }' -``` + - `"bash_code_execution"` -#### Response + - `"text_editor_code_execution"` -```json -{ - "input_tokens": 2095 -} -``` + - `"tool_search_tool_regex"` -## Domain Types + - `"tool_search_tool_bm25"` -### Base64 Image Source + - `type: "server_tool_use"` -- `Base64ImageSource object { data, media_type, type }` + - `"server_tool_use"` - - `data: string` + - `cache_control: optional CacheControlEphemeral or null` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + Create a cache control breakpoint at this content block. - - `"image/jpeg"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"image/png"` + Tool invocation directly from the model. - - `"image/gif"` + - `DirectCaller object { type }` - - `"image/webp"` + Tool invocation directly from the model. - - `type: "base64"` + - `ServerToolCaller object { tool_id, type }` - - `"base64"` + Tool invocation generated by a server-side tool. -### Base64 PDF Source + - `ServerToolCaller20260120 object { tool_id, type }` -- `Base64PDFSource object { data, media_type, type }` + - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `data: string` + - `content: WebSearchToolResultBlockParamContent` - - `media_type: "application/pdf"` + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` - - `"application/pdf"` + - `encrypted_content: string` - - `type: "base64"` + - `title: string` - - `"base64"` + - `type: "web_search_result"` -### Bash Code Execution Output Block + - `"web_search_result"` -- `BashCodeExecutionOutputBlock object { file_id, type }` + - `url: string` - - `file_id: string` + - `page_age: optional string or null` - - `type: "bash_code_execution_output"` + - `WebSearchToolRequestError object { error_code, type }` - - `"bash_code_execution_output"` + - `error_code: WebSearchToolResultErrorCode` -### Bash Code Execution Output Block Param + - `"invalid_tool_input"` -- `BashCodeExecutionOutputBlockParam object { file_id, type }` + - `"unavailable"` - - `file_id: string` + - `"max_uses_exceeded"` - - `type: "bash_code_execution_output"` + - `"too_many_requests"` - - `"bash_code_execution_output"` + - `"query_too_long"` -### Bash Code Execution Result Block + - `"request_too_large"` -- `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `type: "web_search_tool_result_error"` - - `content: array of BashCodeExecutionOutputBlock` + - `"web_search_tool_result_error"` - - `file_id: string` + - `tool_use_id: string` - - `type: "bash_code_execution_output"` + - `type: "web_search_tool_result"` - - `"bash_code_execution_output"` + - `"web_search_tool_result"` - - `return_code: number` + - `cache_control: optional CacheControlEphemeral or null` - - `stderr: string` + Create a cache control breakpoint at this content block. - - `stdout: string` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "bash_code_execution_result"` + Tool invocation directly from the model. - - `"bash_code_execution_result"` + - `DirectCaller object { type }` -### Bash Code Execution Result Block Param + Tool invocation directly from the model. -- `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `ServerToolCaller object { tool_id, type }` - - `content: array of BashCodeExecutionOutputBlockParam` + Tool invocation generated by a server-side tool. - - `file_id: string` + - `ServerToolCaller20260120 object { tool_id, type }` - - `type: "bash_code_execution_output"` + - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `"bash_code_execution_output"` + - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` - - `return_code: number` + - `WebFetchToolResultErrorBlockParam object { error_code, type }` - - `stderr: string` + - `error_code: WebFetchToolResultErrorCode` - - `stdout: string` + - `"invalid_tool_input"` - - `type: "bash_code_execution_result"` + - `"url_too_long"` - - `"bash_code_execution_result"` + - `"url_not_allowed"` -### Bash Code Execution Tool Result Block + - `"url_not_in_prior_context"` -- `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"url_not_accessible"` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `"unsupported_content_type"` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `"too_many_requests"` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `"max_uses_exceeded"` - - `"invalid_tool_input"` + - `"unavailable"` - - `"unavailable"` + - `type: "web_fetch_tool_result_error"` - - `"too_many_requests"` + - `"web_fetch_tool_result_error"` - - `"execution_time_exceeded"` + - `WebFetchBlockParam object { content, type, url, retrieved_at }` - - `"output_file_too_large"` + - `content: DocumentBlockParam` - - `type: "bash_code_execution_tool_result_error"` + - `type: "web_fetch_result"` - - `"bash_code_execution_tool_result_error"` + - `"web_fetch_result"` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `url: string` - - `content: array of BashCodeExecutionOutputBlock` + Fetched content URL - - `file_id: string` + - `retrieved_at: optional string or null` - - `type: "bash_code_execution_output"` + ISO 8601 timestamp when the content was retrieved - - `"bash_code_execution_output"` + - `tool_use_id: string` - - `return_code: number` + - `type: "web_fetch_tool_result"` - - `stderr: string` + - `"web_fetch_tool_result"` - - `stdout: string` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "bash_code_execution_result"` + Create a cache control breakpoint at this content block. - - `"bash_code_execution_result"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `tool_use_id: string` + Tool invocation directly from the model. - - `type: "bash_code_execution_tool_result"` + - `DirectCaller object { type }` - - `"bash_code_execution_tool_result"` + Tool invocation directly from the model. -### Bash Code Execution Tool Result Block Param + - `ServerToolCaller object { tool_id, type }` -- `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + Tool invocation generated by a server-side tool. - - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + - `ServerToolCaller20260120 object { tool_id, type }` - - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `content: CodeExecutionToolResultBlockParamContent` - - `"invalid_tool_input"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"unavailable"` + - `CodeExecutionToolResultErrorParam object { error_code, type }` - - `"too_many_requests"` + - `error_code: CodeExecutionToolResultErrorCode` - - `"execution_time_exceeded"` + - `"invalid_tool_input"` - - `"output_file_too_large"` + - `"unavailable"` - - `type: "bash_code_execution_tool_result_error"` + - `"too_many_requests"` - - `"bash_code_execution_tool_result_error"` + - `"execution_time_exceeded"` - - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `type: "code_execution_tool_result_error"` - - `content: array of BashCodeExecutionOutputBlockParam` + - `"code_execution_tool_result_error"` - - `file_id: string` + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `type: "bash_code_execution_output"` + - `content: array of CodeExecutionOutputBlockParam` - - `"bash_code_execution_output"` + - `file_id: string` - - `return_code: number` + - `type: "code_execution_output"` - - `stderr: string` + - `"code_execution_output"` - - `stdout: string` + - `return_code: number` - - `type: "bash_code_execution_result"` + - `stderr: string` - - `"bash_code_execution_result"` + - `stdout: string` - - `tool_use_id: string` + - `type: "code_execution_result"` - - `type: "bash_code_execution_tool_result"` + - `"code_execution_result"` - - `"bash_code_execution_tool_result"` + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `cache_control: optional CacheControlEphemeral or null` + Code execution result with encrypted stdout for PFC + web_search results. - Create a cache control breakpoint at this content block. + - `content: array of CodeExecutionOutputBlockParam` - - `type: "ephemeral"` + - `file_id: string` - - `"ephemeral"` + - `type: "code_execution_output"` - - `ttl: optional "5m" or "1h"` + - `encrypted_stdout: string` - The time-to-live for the cache control breakpoint. + - `return_code: number` - This may be one the following values: + - `stderr: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "encrypted_code_execution_result"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"encrypted_code_execution_result"` - - `"5m"` + - `tool_use_id: string` - - `"1h"` + - `type: "code_execution_tool_result"` -### Bash Code Execution Tool Result Error + - `"code_execution_tool_result"` -- `BashCodeExecutionToolResultError object { error_code, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `error_code: BashCodeExecutionToolResultErrorCode` + Create a cache control breakpoint at this content block. + + - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + + - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + + - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + + - `error_code: BashCodeExecutionToolResultErrorCode` + + - `"invalid_tool_input"` + + - `"unavailable"` + + - `"too_many_requests"` + + - `"execution_time_exceeded"` + + - `"output_file_too_large"` - - `"invalid_tool_input"` + - `type: "bash_code_execution_tool_result_error"` - - `"unavailable"` + - `"bash_code_execution_tool_result_error"` - - `"too_many_requests"` + - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `"execution_time_exceeded"` + - `content: array of BashCodeExecutionOutputBlockParam` - - `"output_file_too_large"` + - `file_id: string` - - `type: "bash_code_execution_tool_result_error"` + - `type: "bash_code_execution_output"` - - `"bash_code_execution_tool_result_error"` + - `"bash_code_execution_output"` -### Bash Code Execution Tool Result Error Code + - `return_code: number` -- `BashCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `stderr: string` - - `"invalid_tool_input"` + - `stdout: string` - - `"unavailable"` + - `type: "bash_code_execution_result"` - - `"too_many_requests"` + - `"bash_code_execution_result"` - - `"execution_time_exceeded"` + - `tool_use_id: string` - - `"output_file_too_large"` + - `type: "bash_code_execution_tool_result"` -### Bash Code Execution Tool Result Error Param + - `"bash_code_execution_tool_result"` -- `BashCodeExecutionToolResultErrorParam object { error_code, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `error_code: BashCodeExecutionToolResultErrorCode` + Create a cache control breakpoint at this content block. - - `"invalid_tool_input"` + - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `"unavailable"` + - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` - - `"too_many_requests"` + - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `"execution_time_exceeded"` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `"output_file_too_large"` + - `"invalid_tool_input"` - - `type: "bash_code_execution_tool_result_error"` + - `"unavailable"` - - `"bash_code_execution_tool_result_error"` + - `"too_many_requests"` -### Cache Control Ephemeral + - `"execution_time_exceeded"` -- `CacheControlEphemeral object { type, ttl }` + - `"file_not_found"` - - `type: "ephemeral"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"ephemeral"` + - `"text_editor_code_execution_tool_result_error"` - - `ttl: optional "5m" or "1h"` + - `error_message: optional string or null` - The time-to-live for the cache control breakpoint. + - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - This may be one the following values: + - `content: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `file_type: "text" or "image" or "pdf"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"text"` - - `"5m"` + - `"image"` - - `"1h"` + - `"pdf"` -### Cache Creation + - `type: "text_editor_code_execution_view_result"` -- `CacheCreation object { ephemeral_1h_input_tokens, ephemeral_5m_input_tokens }` + - `"text_editor_code_execution_view_result"` - - `ephemeral_1h_input_tokens: number` + - `num_lines: optional number or null` - The number of input tokens used to create the 1 hour cache entry. + - `start_line: optional number or null` - - `ephemeral_5m_input_tokens: number` + - `total_lines: optional number or null` - The number of input tokens used to create the 5 minute cache entry. + - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` -### Citation Char Location + - `is_file_update: boolean` -- `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "text_editor_code_execution_create_result"` - - `cited_text: string` + - `"text_editor_code_execution_create_result"` - - `document_index: number` + - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `document_title: string or null` + - `type: "text_editor_code_execution_str_replace_result"` - - `end_char_index: number` + - `"text_editor_code_execution_str_replace_result"` - - `file_id: string or null` + - `lines: optional array of string or null` - - `start_char_index: number` + - `new_lines: optional number or null` - - `type: "char_location"` + - `new_start: optional number or null` - - `"char_location"` + - `old_lines: optional number or null` -### Citation Char Location Param + - `old_start: optional number or null` -- `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_use_id: string` - - `cited_text: string` + - `type: "text_editor_code_execution_tool_result"` - - `document_index: number` + - `"text_editor_code_execution_tool_result"` - - `document_title: string or null` + - `cache_control: optional CacheControlEphemeral or null` - - `end_char_index: number` + Create a cache control breakpoint at this content block. - - `start_char_index: number` + - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `type: "char_location"` + - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` - - `"char_location"` + - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` -### Citation Content Block Location + - `error_code: ToolSearchToolResultErrorCode` -- `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `"invalid_tool_input"` - - `cited_text: string` + - `"unavailable"` - The full text of the cited block range, concatenated. + - `"too_many_requests"` - 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. + - `"execution_time_exceeded"` - - `document_index: number` + - `type: "tool_search_tool_result_error"` - - `document_title: string or null` + - `"tool_search_tool_result_error"` - - `end_block_index: number` + - `error_message: optional string or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `tool_references: array of ToolReferenceBlockParam` - - `file_id: string or null` + - `tool_name: string` - - `start_block_index: number` + - `type: "tool_reference"` - 0-based index of the first cited block in the source's `content` array. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "content_block_location"` + Create a cache control breakpoint at this content block. - - `"content_block_location"` + - `type: "tool_search_tool_search_result"` -### Citation Content Block Location Param + - `"tool_search_tool_search_result"` -- `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_use_id: string` - - `cited_text: string` + - `type: "tool_search_tool_result"` - The full text of the cited block range, concatenated. + - `"tool_search_tool_result"` - 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. + - `cache_control: optional CacheControlEphemeral or null` - - `document_index: number` + Create a cache control breakpoint at this content block. - - `document_title: string or null` + - `ContainerUploadBlockParam object { file_id, type, cache_control }` - - `end_block_index: number` + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `file_id: string` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "container_upload"` - - `start_block_index: number` + - `"container_upload"` - 0-based index of the first cited block in the source's `content` array. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "content_block_location"` + Create a cache control breakpoint at this content block. - - `"content_block_location"` +### Content Block Source -### Citation Page Location +- `ContentBlockSource object { content, type }` -- `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `content: string or array of ContentBlockSourceContent` - - `cited_text: string` + - `string` - - `document_index: number` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `document_title: string or null` + - `TextBlockParam object { text, type, cache_control, citations }` - - `end_page_number: number` + - `text: string` - - `file_id: string or null` + - `type: "text"` - - `start_page_number: number` + - `"text"` - - `type: "page_location"` + - `cache_control: optional CacheControlEphemeral or null` - - `"page_location"` + Create a cache control breakpoint at this content block. -### Citation Page Location Param + - `type: "ephemeral"` -- `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"ephemeral"` - - `cited_text: string` + - `ttl: optional "5m" or "1h"` - - `document_index: number` + The time-to-live for the cache control breakpoint. - - `document_title: string or null` + This may be one the following values: - - `end_page_number: number` + - `5m`: 5 minutes + - `1h`: 1 hour - - `start_page_number: number` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `type: "page_location"` + - `"5m"` - - `"page_location"` + - `"1h"` -### Citation Search Result Location Param + - `citations: optional array of TextCitationParam or null` -- `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `cited_text: string` + - `cited_text: string` - The full text of the cited block range, concatenated. + - `document_index: number` - 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. + - `document_title: string or null` - - `end_block_index: number` + - `end_char_index: number` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `start_char_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "char_location"` - - `search_result_index: number` + - `"char_location"` - 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. + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `cited_text: string` - - `source: string` + - `document_index: number` - - `start_block_index: number` + - `document_title: string or null` - 0-based index of the first cited block in the source's `content` array. + - `end_page_number: number` - - `title: string or null` + - `start_page_number: number` - - `type: "search_result_location"` + - `type: "page_location"` - - `"search_result_location"` + - `"page_location"` -### Citation Web Search Result Location Param + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` -- `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `cited_text: string` - - `cited_text: string` + The full text of the cited block range, concatenated. - - `encrypted_index: string` + 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. - - `title: string or null` + - `document_index: number` - - `type: "web_search_result_location"` + - `document_title: string or null` - - `"web_search_result_location"` + - `end_block_index: number` - - `url: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. -### Citations Config + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. -- `CitationsConfig object { enabled }` + - `start_block_index: number` - - `enabled: boolean` + 0-based index of the first cited block in the source's `content` array. -### Citations Config Param + - `type: "content_block_location"` -- `CitationsConfigParam object { enabled }` + - `"content_block_location"` - - `enabled: optional boolean` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` -### Citations Delta + - `cited_text: string` -- `CitationsDelta object { citation, type }` + - `encrypted_index: string` - - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + - `title: string or null` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "web_search_result_location"` - - `cited_text: string` + - `"web_search_result_location"` - - `document_index: number` + - `url: string` - - `document_title: string or null` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `end_char_index: number` + - `cited_text: string` - - `file_id: string or null` + The full text of the cited block range, concatenated. - - `start_char_index: number` + 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. - - `type: "char_location"` + - `end_block_index: number` - - `"char_location"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `cited_text: string` + - `search_result_index: number` - - `document_index: number` + 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. - - `document_title: string or null` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `end_page_number: number` + - `source: string` - - `file_id: string or null` + - `start_block_index: number` - - `start_page_number: number` + 0-based index of the first cited block in the source's `content` array. - - `type: "page_location"` + - `title: string or null` - - `"page_location"` + - `type: "search_result_location"` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `"search_result_location"` - - `cited_text: string` + - `ImageBlockParam object { source, type, cache_control, transformations }` - The full text of the cited block range, concatenated. + - `source: Base64ImageSource or URLImageSource or FileImageSource` - 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. + - `Base64ImageSource object { data, media_type, type }` - - `document_index: number` + - `data: string` - - `document_title: string or null` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `end_block_index: number` + - `"image/jpeg"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"image/png"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"image/gif"` - - `file_id: string or null` + - `"image/webp"` - - `start_block_index: number` + - `type: "base64"` - 0-based index of the first cited block in the source's `content` array. + - `"base64"` - - `type: "content_block_location"` + - `URLImageSource object { type, url }` - - `"content_block_location"` + - `type: "url"` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"url"` - - `cited_text: string` + - `url: string` - - `encrypted_index: string` + - `FileImageSource object { file_id, type }` - - `title: string or null` + - `file_id: string` - - `type: "web_search_result_location"` + - `type: "file"` - - `"web_search_result_location"` + - `"file"` - - `url: string` + - `type: "image"` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `"image"` - - `cited_text: string` + - `cache_control: optional CacheControlEphemeral or null` - The full text of the cited block range, concatenated. + Create a cache control breakpoint at this content block. - 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. + - `transformations: optional ImageTransformationsParam or null` - - `end_block_index: number` + 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. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `oversized_image: optional "downsize" or "error"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + 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. - - `search_result_index: number` + - `"downsize"` - 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. + - `"error"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `type: "content"` - - `source: string` + - `"content"` - - `start_block_index: number` +### Content Block Source Content - 0-based index of the first cited block in the source's `content` array. +- `ContentBlockSourceContent = TextBlockParam or ImageBlockParam` - - `title: string or null` + - `TextBlockParam object { text, type, cache_control, citations }` - - `type: "search_result_location"` + - `text: string` - - `"search_result_location"` + - `type: "text"` - - `type: "citations_delta"` + - `"text"` - - `"citations_delta"` + - `cache_control: optional CacheControlEphemeral or null` -### Citations Search Result Location + Create a cache control breakpoint at this content block. -- `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "ephemeral"` - - `cited_text: string` + - `"ephemeral"` - The full text of the cited block range, concatenated. + - `ttl: optional "5m" or "1h"` - 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. + The time-to-live for the cache control breakpoint. - - `end_block_index: number` + This may be one the following values: - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `5m`: 5 minutes + - `1h`: 1 hour - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `search_result_index: number` + - `"5m"` - 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. + - `"1h"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `citations: optional array of TextCitationParam or null` - - `source: string` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `start_block_index: number` + - `cited_text: string` - 0-based index of the first cited block in the source's `content` array. + - `document_index: number` - - `title: string or null` + - `document_title: string or null` - - `type: "search_result_location"` + - `end_char_index: number` - - `"search_result_location"` + - `start_char_index: number` -### Citations Web Search Result Location + - `type: "char_location"` -- `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"char_location"` - - `cited_text: string` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `encrypted_index: string` + - `cited_text: string` - - `title: string or null` + - `document_index: number` - - `type: "web_search_result_location"` + - `document_title: string or null` - - `"web_search_result_location"` + - `end_page_number: number` - - `url: string` + - `start_page_number: number` -### Code Execution Output Block + - `type: "page_location"` -- `CodeExecutionOutputBlock object { file_id, type }` + - `"page_location"` - - `file_id: string` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `type: "code_execution_output"` + - `cited_text: string` - - `"code_execution_output"` + The full text of the cited block range, concatenated. -### Code Execution Output Block Param + 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. -- `CodeExecutionOutputBlockParam object { file_id, type }` + - `document_index: number` - - `file_id: string` + - `document_title: string or null` - - `type: "code_execution_output"` + - `end_block_index: number` - - `"code_execution_output"` + Exclusive 0-based end index of the cited block range in the source's `content` array. -### Code Execution Result Block + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. -- `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `start_block_index: number` - - `content: array of CodeExecutionOutputBlock` + 0-based index of the first cited block in the source's `content` array. - - `file_id: string` + - `type: "content_block_location"` - - `type: "code_execution_output"` + - `"content_block_location"` - - `"code_execution_output"` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `return_code: number` + - `cited_text: string` - - `stderr: string` + - `encrypted_index: string` - - `stdout: string` + - `title: string or null` - - `type: "code_execution_result"` + - `type: "web_search_result_location"` - - `"code_execution_result"` + - `"web_search_result_location"` -### Code Execution Result Block Param + - `url: string` -- `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `content: array of CodeExecutionOutputBlockParam` + - `cited_text: string` - - `file_id: string` + The full text of the cited block range, concatenated. - - `type: "code_execution_output"` + 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. - - `"code_execution_output"` + - `end_block_index: number` - - `return_code: number` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `stderr: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `stdout: string` + - `search_result_index: number` - - `type: "code_execution_result"` + 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. - - `"code_execution_result"` + Counted separately from `document_index`; server-side web search results are not included in this count. -### Code Execution Tool 20250522 + - `source: string` -- `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + - `start_block_index: number` - - `name: "code_execution"` + 0-based index of the first cited block in the source's `content` array. - Name of the tool. + - `title: string or null` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "search_result_location"` - - `"code_execution"` + - `"search_result_location"` - - `type: "code_execution_20250522"` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `"code_execution_20250522"` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `Base64ImageSource object { data, media_type, type }` - - `"direct"` + - `data: string` - - `"code_execution_20250825"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"code_execution_20260120"` + - `"image/jpeg"` - - `"code_execution_20260521"` + - `"image/png"` - - `cache_control: optional CacheControlEphemeral or null` + - `"image/gif"` - Create a cache control breakpoint at this content block. + - `"image/webp"` - - `type: "ephemeral"` + - `type: "base64"` - - `"ephemeral"` + - `"base64"` - - `ttl: optional "5m" or "1h"` + - `URLImageSource object { type, url }` - The time-to-live for the cache control breakpoint. + - `type: "url"` - This may be one the following values: + - `"url"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `url: string` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `FileImageSource object { file_id, type }` - - `"5m"` + - `file_id: string` - - `"1h"` + - `type: "file"` - - `defer_loading: optional boolean` + - `"file"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "image"` - - `strict: optional boolean` + - `"image"` - When true, guarantees schema validation on tool names and inputs + - `cache_control: optional CacheControlEphemeral or null` -### Code Execution Tool 20250825 + Create a cache control breakpoint at this content block. -- `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + - `transformations: optional ImageTransformationsParam or null` - - `name: "code_execution"` + 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. - Name of the tool. + - `oversized_image: optional "downsize" or "error"` - This is how the tool will be called by the model and in `tool_use` blocks. + 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. - - `"code_execution"` + - `"downsize"` - - `type: "code_execution_20250825"` + - `"error"` - - `"code_execution_20250825"` +### Direct Caller - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +- `DirectCaller object { type }` - - `"direct"` + Tool invocation directly from the model. - - `"code_execution_20250825"` + - `type: "direct"` - - `"code_execution_20260120"` + - `"direct"` - - `"code_execution_20260521"` +### Document Block - - `cache_control: optional CacheControlEphemeral or null` +- `DocumentBlock object { citations, source, title, type }` - Create a cache control breakpoint at this content block. + - `citations: CitationsConfig or null` - - `type: "ephemeral"` + Citation configuration for the document - - `"ephemeral"` + - `enabled: boolean` - - `ttl: optional "5m" or "1h"` + - `source: Base64PDFSource or PlainTextSource` - The time-to-live for the cache control breakpoint. + - `Base64PDFSource object { data, media_type, type }` - This may be one the following values: + - `data: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `media_type: "application/pdf"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"application/pdf"` - - `"5m"` + - `type: "base64"` - - `"1h"` + - `"base64"` - - `defer_loading: optional boolean` + - `PlainTextSource object { data, media_type, type }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `data: string` - - `strict: optional boolean` + - `media_type: "text/plain"` - When true, guarantees schema validation on tool names and inputs + - `"text/plain"` -### Code Execution Tool 20260120 + - `type: "text"` -- `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + - `"text"` - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `title: string or null` - - `name: "code_execution"` + The title of the document - Name of the tool. + - `type: "document"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"document"` - - `"code_execution"` +### Document Block Param - - `type: "code_execution_20260120"` +- `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `"code_execution_20260120"` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `Base64PDFSource object { data, media_type, type }` - - `"direct"` + - `data: string` - - `"code_execution_20250825"` + - `media_type: "application/pdf"` - - `"code_execution_20260120"` + - `"application/pdf"` - - `"code_execution_20260521"` + - `type: "base64"` - - `cache_control: optional CacheControlEphemeral or null` + - `"base64"` - Create a cache control breakpoint at this content block. + - `PlainTextSource object { data, media_type, type }` - - `type: "ephemeral"` + - `data: string` - - `"ephemeral"` + - `media_type: "text/plain"` - - `ttl: optional "5m" or "1h"` + - `"text/plain"` - The time-to-live for the cache control breakpoint. + - `type: "text"` - This may be one the following values: + - `"text"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `ContentBlockSource object { content, type }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `content: string or array of ContentBlockSourceContent` - - `"5m"` + - `string` - - `"1h"` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `defer_loading: optional boolean` + - `TextBlockParam object { text, type, cache_control, citations }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `text: string` - - `strict: optional boolean` + - `type: "text"` - When true, guarantees schema validation on tool names and inputs + - `"text"` -### Code Execution Tool 20260521 + - `cache_control: optional CacheControlEphemeral or null` -- `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + Create a cache control breakpoint at this content block. - Code execution tool with REPL state persistence. + - `type: "ephemeral"` - - `name: "code_execution"` + - `"ephemeral"` - Name of the tool. + - `ttl: optional "5m" or "1h"` - This is how the tool will be called by the model and in `tool_use` blocks. + The time-to-live for the cache control breakpoint. - - `"code_execution"` + This may be one the following values: - - `type: "code_execution_20260521"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"code_execution_20260521"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"5m"` - - `"direct"` + - `"1h"` - - `"code_execution_20250825"` + - `citations: optional array of TextCitationParam or null` - - `"code_execution_20260120"` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"code_execution_20260521"` + - `cited_text: string` - - `cache_control: optional CacheControlEphemeral or null` + - `document_index: number` - Create a cache control breakpoint at this content block. + - `document_title: string or null` - - `type: "ephemeral"` + - `end_char_index: number` - - `"ephemeral"` + - `start_char_index: number` - - `ttl: optional "5m" or "1h"` + - `type: "char_location"` - The time-to-live for the cache control breakpoint. + - `"char_location"` - This may be one the following values: + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `5m`: 5 minutes - - `1h`: 1 hour + - `cited_text: string` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `document_index: number` - - `"5m"` + - `document_title: string or null` - - `"1h"` + - `end_page_number: number` - - `defer_loading: optional boolean` + - `start_page_number: number` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "page_location"` - - `strict: optional boolean` + - `"page_location"` - When true, guarantees schema validation on tool names and inputs + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` -### Code Execution Tool Result Block + - `cited_text: string` -- `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + The full text of the cited block range, concatenated. - - `content: CodeExecutionToolResultBlockContent` + 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. - Code execution result with encrypted stdout for PFC + web_search results. + - `document_index: number` - - `CodeExecutionToolResultError object { error_code, type }` + - `document_title: string or null` - - `error_code: CodeExecutionToolResultErrorCode` + - `end_block_index: number` - - `"invalid_tool_input"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"unavailable"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"too_many_requests"` + - `start_block_index: number` - - `"execution_time_exceeded"` + 0-based index of the first cited block in the source's `content` array. - - `type: "code_execution_tool_result_error"` + - `type: "content_block_location"` - - `"code_execution_tool_result_error"` + - `"content_block_location"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `content: array of CodeExecutionOutputBlock` + - `cited_text: string` - - `file_id: string` + - `encrypted_index: string` - - `type: "code_execution_output"` + - `title: string or null` - - `"code_execution_output"` + - `type: "web_search_result_location"` - - `return_code: number` + - `"web_search_result_location"` - - `stderr: string` + - `url: string` - - `stdout: string` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `type: "code_execution_result"` + - `cited_text: string` - - `"code_execution_result"` + The full text of the cited block range, concatenated. - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + 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. - Code execution result with encrypted stdout for PFC + web_search results. + - `end_block_index: number` - - `content: array of CodeExecutionOutputBlock` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `file_id: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "code_execution_output"` + - `search_result_index: number` - - `encrypted_stdout: string` + 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. - - `return_code: number` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `stderr: string` + - `source: string` - - `type: "encrypted_code_execution_result"` + - `start_block_index: number` - - `"encrypted_code_execution_result"` + 0-based index of the first cited block in the source's `content` array. - - `tool_use_id: string` + - `title: string or null` - - `type: "code_execution_tool_result"` + - `type: "search_result_location"` - - `"code_execution_tool_result"` + - `"search_result_location"` -### Code Execution Tool Result Block Content + - `ImageBlockParam object { source, type, cache_control, transformations }` -- `CodeExecutionToolResultBlockContent = CodeExecutionToolResultError or CodeExecutionResultBlock or EncryptedCodeExecutionResultBlock` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - Code execution result with encrypted stdout for PFC + web_search results. + - `Base64ImageSource object { data, media_type, type }` - - `CodeExecutionToolResultError object { error_code, type }` + - `data: string` - - `error_code: CodeExecutionToolResultErrorCode` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"invalid_tool_input"` + - `"image/jpeg"` - - `"unavailable"` + - `"image/png"` - - `"too_many_requests"` + - `"image/gif"` - - `"execution_time_exceeded"` + - `"image/webp"` - - `type: "code_execution_tool_result_error"` + - `type: "base64"` - - `"code_execution_tool_result_error"` + - `"base64"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `URLImageSource object { type, url }` - - `content: array of CodeExecutionOutputBlock` + - `type: "url"` - - `file_id: string` + - `"url"` - - `type: "code_execution_output"` + - `url: string` - - `"code_execution_output"` + - `FileImageSource object { file_id, type }` - - `return_code: number` + - `file_id: string` - - `stderr: string` + - `type: "file"` - - `stdout: string` + - `"file"` - - `type: "code_execution_result"` + - `type: "image"` - - `"code_execution_result"` + - `"image"` - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `cache_control: optional CacheControlEphemeral or null` - Code execution result with encrypted stdout for PFC + web_search results. + Create a cache control breakpoint at this content block. - - `content: array of CodeExecutionOutputBlock` + - `transformations: optional ImageTransformationsParam or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` + - `oversized_image: optional "downsize" or "error"` - - `encrypted_stdout: string` + 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. - - `return_code: number` + - `"downsize"` - - `stderr: string` + - `"error"` - - `type: "encrypted_code_execution_result"` + - `type: "content"` - - `"encrypted_code_execution_result"` + - `"content"` -### Code Execution Tool Result Block Param + - `URLPDFSource object { type, url }` -- `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `type: "url"` - - `content: CodeExecutionToolResultBlockParamContent` + - `"url"` - Code execution result with encrypted stdout for PFC + web_search results. + - `url: string` - - `CodeExecutionToolResultErrorParam object { error_code, type }` + - `FileDocumentSource object { file_id, type }` - - `error_code: CodeExecutionToolResultErrorCode` + - `file_id: string` - - `"invalid_tool_input"` + - `type: "file"` - - `"unavailable"` + - `"file"` - - `"too_many_requests"` + - `type: "document"` - - `"execution_time_exceeded"` + - `"document"` - - `type: "code_execution_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_tool_result_error"` + Create a cache control breakpoint at this content block. - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `citations: optional CitationsConfigParam or null` - - `content: array of CodeExecutionOutputBlockParam` + - `enabled: optional boolean` - - `file_id: string` + - `context: optional string or null` - - `type: "code_execution_output"` + - `title: optional string or null` - - `"code_execution_output"` +### Encrypted Code Execution Result Block - - `return_code: number` +- `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `stderr: string` + Code execution result with encrypted stdout for PFC + web_search results. - - `stdout: string` + - `content: array of CodeExecutionOutputBlock` - - `type: "code_execution_result"` + - `file_id: string` - - `"code_execution_result"` + - `type: "code_execution_output"` - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `"code_execution_output"` - Code execution result with encrypted stdout for PFC + web_search results. + - `encrypted_stdout: string` - - `content: array of CodeExecutionOutputBlockParam` + - `return_code: number` - - `file_id: string` + - `stderr: string` - - `type: "code_execution_output"` + - `type: "encrypted_code_execution_result"` - - `encrypted_stdout: string` + - `"encrypted_code_execution_result"` - - `return_code: number` +### Encrypted Code Execution Result Block Param - - `stderr: string` +- `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `type: "encrypted_code_execution_result"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"encrypted_code_execution_result"` + - `content: array of CodeExecutionOutputBlockParam` - - `tool_use_id: string` + - `file_id: string` - - `type: "code_execution_tool_result"` + - `type: "code_execution_output"` - - `"code_execution_tool_result"` + - `"code_execution_output"` - - `cache_control: optional CacheControlEphemeral or null` + - `encrypted_stdout: string` - Create a cache control breakpoint at this content block. + - `return_code: number` - - `type: "ephemeral"` + - `stderr: string` - - `"ephemeral"` + - `type: "encrypted_code_execution_result"` - - `ttl: optional "5m" or "1h"` + - `"encrypted_code_execution_result"` - The time-to-live for the cache control breakpoint. +### File Document Source - This may be one the following values: +- `FileDocumentSource object { file_id, type }` - - `5m`: 5 minutes - - `1h`: 1 hour + - `file_id: string` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `type: "file"` - - `"5m"` + - `"file"` - - `"1h"` +### File Image Source -### Code Execution Tool Result Block Param Content +- `FileImageSource object { file_id, type }` -- `CodeExecutionToolResultBlockParamContent = CodeExecutionToolResultErrorParam or CodeExecutionResultBlockParam or EncryptedCodeExecutionResultBlockParam` + - `file_id: string` - Code execution result with encrypted stdout for PFC + web_search results. + - `type: "file"` - - `CodeExecutionToolResultErrorParam object { error_code, type }` + - `"file"` - - `error_code: CodeExecutionToolResultErrorCode` +### Image Block Param - - `"invalid_tool_input"` +- `ImageBlockParam object { source, type, cache_control, transformations }` - - `"unavailable"` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `"too_many_requests"` + - `Base64ImageSource object { data, media_type, type }` - - `"execution_time_exceeded"` + - `data: string` - - `type: "code_execution_tool_result_error"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"code_execution_tool_result_error"` + - `"image/jpeg"` - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `"image/png"` - - `content: array of CodeExecutionOutputBlockParam` + - `"image/gif"` - - `file_id: string` + - `"image/webp"` - - `type: "code_execution_output"` + - `type: "base64"` - - `"code_execution_output"` + - `"base64"` - - `return_code: number` + - `URLImageSource object { type, url }` - - `stderr: string` + - `type: "url"` - - `stdout: string` + - `"url"` - - `type: "code_execution_result"` + - `url: string` - - `"code_execution_result"` + - `FileImageSource object { file_id, type }` - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `file_id: string` - Code execution result with encrypted stdout for PFC + web_search results. + - `type: "file"` - - `content: array of CodeExecutionOutputBlockParam` + - `"file"` - - `file_id: string` + - `type: "image"` - - `type: "code_execution_output"` + - `"image"` - - `encrypted_stdout: string` + - `cache_control: optional CacheControlEphemeral or null` - - `return_code: number` + Create a cache control breakpoint at this content block. - - `stderr: string` + - `type: "ephemeral"` - - `type: "encrypted_code_execution_result"` + - `"ephemeral"` - - `"encrypted_code_execution_result"` + - `ttl: optional "5m" or "1h"` -### Code Execution Tool Result Error + The time-to-live for the cache control breakpoint. -- `CodeExecutionToolResultError object { error_code, type }` + This may be one the following values: - - `error_code: CodeExecutionToolResultErrorCode` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"invalid_tool_input"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"unavailable"` + - `"5m"` - - `"too_many_requests"` + - `"1h"` - - `"execution_time_exceeded"` + - `transformations: optional ImageTransformationsParam or null` - - `type: "code_execution_tool_result_error"` + 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. - - `"code_execution_tool_result_error"` + - `oversized_image: optional "downsize" or "error"` -### Code Execution Tool Result Error Code + 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. -- `CodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `"downsize"` - - `"invalid_tool_input"` + - `"error"` - - `"unavailable"` +### Image Transformations Param - - `"too_many_requests"` +- `ImageTransformationsParam object { oversized_image }` - - `"execution_time_exceeded"` + 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. -### Code Execution Tool Result Error Param + - `oversized_image: optional "downsize" or "error"` -- `CodeExecutionToolResultErrorParam object { error_code, type }` + 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. - - `error_code: CodeExecutionToolResultErrorCode` + - `"downsize"` - - `"invalid_tool_input"` + - `"error"` - - `"unavailable"` +### Input JSON Delta - - `"too_many_requests"` +- `InputJSONDelta object { partial_json, type }` - - `"execution_time_exceeded"` + - `partial_json: string` - - `type: "code_execution_tool_result_error"` + - `type: "input_json_delta"` - - `"code_execution_tool_result_error"` + - `"input_json_delta"` -### Container +### JSON Output Format -- `Container object { id, expires_at }` +- `JSONOutputFormat object { schema, type }` - Information about the container used in the request (for the code execution tool) + - `schema: map[unknown]` - - `id: string` + The JSON schema of the format - Identifier for the container used in this request + - `type: "json_schema"` - - `expires_at: string` + - `"json_schema"` - The time at which the container will expire. +### Memory Tool 20250818 -### Container Upload Block +- `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` -- `ContainerUploadBlock object { file_id, type }` + - `name: "memory"` - Response model for a file uploaded to the container. + Name of the tool. - - `file_id: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "container_upload"` + - `"memory"` - - `"container_upload"` + - `type: "memory_20250818"` -### Container Upload Block Param + - `"memory_20250818"` -- `ContainerUploadBlockParam object { file_id, type, cache_control }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + - `"direct"` - - `file_id: string` + - `"code_execution_20250825"` - - `type: "container_upload"` + - `"code_execution_20260120"` - - `"container_upload"` + - `"code_execution_20260521"` - `cache_control: optional CacheControlEphemeral or null` @@ -6851,9274 +13467,9343 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` -### Content Block + - `defer_loading: optional boolean` -- `ContentBlock = TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - Response model for a file uploaded to the container. + - `input_examples: optional array of map[unknown]` - - `TextBlock object { citations, text, type }` + - `strict: optional boolean` - - `citations: array of TextCitation or null` + When true, guarantees schema validation on tool names and inputs - Citations supporting the text block. +### Message - 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`. +- `Message object { id, container, content, 7 more }` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `id: string` - - `cited_text: string` + Unique object identifier. - - `document_index: number` + The format and length of IDs may change over time. - - `document_title: string or null` + - `container: Container or null` - - `end_char_index: number` + Information about the container used in the request (for the code execution tool) - - `file_id: string or null` + - `id: string` - - `start_char_index: number` + Identifier for the container used in this request - - `type: "char_location"` + - `expires_at: string` - - `"char_location"` + The time at which the container will expire. - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `skills: array of ContainerSkill or null` - - `cited_text: string` + Skills loaded in the container - - `document_index: number` + - `skill_id: string` - - `document_title: string or null` + Skill ID - - `end_page_number: number` + - `type: "anthropic" or "custom"` - - `file_id: string or null` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `start_page_number: number` + - `"anthropic"` - - `type: "page_location"` + - `"custom"` - - `"page_location"` + - `version: string` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + Skill version or 'latest' for most recent version - - `cited_text: string` + - `content: array of ContentBlock` - The full text of the cited block range, concatenated. + Content generated by the model. - 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. + This is an array of content blocks, each of which has a `type` that determines its shape. - - `document_index: number` + Example: - - `document_title: string or null` + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `end_block_index: number` + 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. - Exclusive 0-based end index of the cited block range in the source's `content` array. + For example, if the input `messages` were: - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - - `file_id: string or null` + Then the response `content` might be: - - `start_block_index: number` + ```json + [{"type": "text", "text": "B)"}] + ``` - 0-based index of the first cited block in the source's `content` array. + - `TextBlock object { citations, text, type }` - - `type: "content_block_location"` + - `citations: array of TextCitation or null` - - `"content_block_location"` + Citations supporting the text block. - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + 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`. - - `cited_text: string` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `encrypted_index: string` + - `cited_text: string` - - `title: string or null` + - `document_index: number` - - `type: "web_search_result_location"` + - `document_title: string or null` - - `"web_search_result_location"` + - `end_char_index: number` - - `url: string` + - `file_id: string or null` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `start_char_index: number` - - `cited_text: string` + - `type: "char_location"` - The full text of the cited block range, concatenated. + - `"char_location"` - 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. + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `end_block_index: number` + - `cited_text: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `document_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `document_title: string or null` - - `search_result_index: number` + - `end_page_number: number` - 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. + - `file_id: string or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `start_page_number: number` - - `source: string` + - `type: "page_location"` - - `start_block_index: number` + - `"page_location"` - 0-based index of the first cited block in the source's `content` array. + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `title: string or null` + - `cited_text: string` - - `type: "search_result_location"` + The full text of the cited block range, concatenated. - - `"search_result_location"` + 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. - - `text: string` + - `document_index: number` - - `type: "text"` + - `document_title: string or null` - - `"text"` + - `end_block_index: number` - - `ThinkingBlock object { signature, thinking, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `signature: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `file_id: string or null` - 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. + - `start_block_index: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + 0-based index of the first cited block in the source's `content` array. - - `thinking: string` + - `type: "content_block_location"` - The text of Claude's thinking process for this block. + - `"content_block_location"` - - `type: "thinking"` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `"thinking"` + - `cited_text: string` - - `RedactedThinkingBlock object { data, type }` + - `encrypted_index: string` - - `data: string` + - `title: string or null` - 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. + - `type: "web_search_result_location"` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `"web_search_result_location"` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `url: string` - - `type: "redacted_thinking"` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"redacted_thinking"` + - `cited_text: string` - - `ToolUseBlock object { id, caller, input, 2 more }` + The full text of the cited block range, concatenated. - - `id: string` + 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. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `end_block_index: number` - Tool invocation directly from the model. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `DirectCaller object { type }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Tool invocation directly from the model. + - `search_result_index: number` - - `type: "direct"` + 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. - - `"direct"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `ServerToolCaller object { tool_id, type }` + - `source: string` - Tool invocation generated by a server-side tool. + - `start_block_index: number` - - `tool_id: string` + 0-based index of the first cited block in the source's `content` array. - - `type: "code_execution_20250825"` + - `title: string or null` - - `"code_execution_20250825"` + - `type: "search_result_location"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `"search_result_location"` - - `tool_id: string` + - `text: string` + + - `type: "text"` + + - `"text"` + + - `ThinkingBlock object { signature, thinking, type }` + + - `signature: string` + + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + + 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. + + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + + - `thinking: string` + + The text of Claude's thinking process for this block. + + - `type: "thinking"` + + - `"thinking"` + + - `RedactedThinkingBlock object { data, type }` + + - `data: string` + + 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. - - `type: "code_execution_20260120"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"code_execution_20260120"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `input: map[unknown]` + - `type: "redacted_thinking"` - - `name: string` + - `"redacted_thinking"` - - `type: "tool_use"` + - `ToolUseBlock object { id, caller, input, 3 more }` - - `"tool_use"` + - `id: string` - - `ServerToolUseBlock object { id, caller, input, 2 more }` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `id: string` + Tool invocation directly from the model. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `DirectCaller object { type }` - Tool invocation directly from the model. + Tool invocation directly from the model. - - `DirectCaller object { type }` + - `type: "direct"` - Tool invocation directly from the model. + - `"direct"` - - `ServerToolCaller object { tool_id, type }` + - `ServerToolCaller object { tool_id, type }` - Tool invocation generated by a server-side tool. + Tool invocation generated by a server-side tool. - - `ServerToolCaller20260120 object { tool_id, type }` + - `tool_id: string` - - `input: map[unknown]` + - `type: "code_execution_20250825"` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `"code_execution_20250825"` - - `"web_search"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"web_fetch"` + - `tool_id: string` - - `"code_execution"` + - `type: "code_execution_20260120"` - - `"bash_code_execution"` + - `"code_execution_20260120"` - - `"text_editor_code_execution"` + - `input: map[unknown]` - - `"tool_search_tool_regex"` + - `name: string` - - `"tool_search_tool_bm25"` + - `type: "tool_use"` - - `type: "server_tool_use"` + - `"tool_use"` - - `"server_tool_use"` + - `toolset_name: optional string or null` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + For a toolset member tool_use, the toolset family. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `ServerToolUseBlock object { id, caller, input, 2 more }` - Tool invocation directly from the model. + - `id: string` - - `DirectCaller object { type }` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` Tool invocation directly from the model. - - `ServerToolCaller object { tool_id, type }` + - `DirectCaller object { type }` - Tool invocation generated by a server-side tool. + Tool invocation directly from the model. - - `ServerToolCaller20260120 object { tool_id, type }` + - `ServerToolCaller object { tool_id, type }` - - `content: WebSearchToolResultBlockContent` + Tool invocation generated by a server-side tool. - - `WebSearchToolResultError object { error_code, type }` + - `ServerToolCaller20260120 object { tool_id, type }` - - `error_code: WebSearchToolResultErrorCode` + - `input: map[unknown]` - - `"invalid_tool_input"` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `"unavailable"` + - `"web_search"` - - `"max_uses_exceeded"` + - `"web_fetch"` - - `"too_many_requests"` + - `"code_execution"` - - `"query_too_long"` + - `"bash_code_execution"` - - `"request_too_large"` + - `"text_editor_code_execution"` - - `type: "web_search_tool_result_error"` + - `"tool_search_tool_regex"` - - `"web_search_tool_result_error"` + - `"tool_search_tool_bm25"` - - `array of WebSearchResultBlock` + - `type: "server_tool_use"` - - `encrypted_content: string` + - `"server_tool_use"` - - `page_age: string or null` + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `title: string` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "web_search_result"` + Tool invocation directly from the model. - - `"web_search_result"` + - `DirectCaller object { type }` - - `url: string` + Tool invocation directly from the model. - - `tool_use_id: string` + - `ServerToolCaller object { tool_id, type }` - - `type: "web_search_tool_result"` + Tool invocation generated by a server-side tool. - - `"web_search_tool_result"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `content: WebSearchToolResultBlockContent` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `WebSearchToolResultError object { error_code, type }` - Tool invocation directly from the model. + - `error_code: WebSearchToolResultErrorCode` - - `DirectCaller object { type }` + - `"invalid_tool_input"` - Tool invocation directly from the model. + - `"unavailable"` - - `ServerToolCaller object { tool_id, type }` + - `"max_uses_exceeded"` - Tool invocation generated by a server-side tool. + - `"too_many_requests"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `"query_too_long"` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + - `"request_too_large"` - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `type: "web_search_tool_result_error"` - - `error_code: WebFetchToolResultErrorCode` + - `"web_search_tool_result_error"` - - `"invalid_tool_input"` + - `array of WebSearchResultBlock` - - `"url_too_long"` + - `encrypted_content: string` - - `"url_not_allowed"` + - `page_age: string or null` - - `"url_not_in_prior_context"` + - `title: string` - - `"url_not_accessible"` + - `type: "web_search_result"` - - `"unsupported_content_type"` + - `"web_search_result"` - - `"too_many_requests"` + - `url: string` - - `"max_uses_exceeded"` + - `tool_use_id: string` - - `"unavailable"` + - `type: "web_search_tool_result"` - - `type: "web_fetch_tool_result_error"` + - `"web_search_tool_result"` - - `"web_fetch_tool_result_error"` + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `WebFetchBlock object { content, retrieved_at, type, url }` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `content: DocumentBlock` + Tool invocation directly from the model. - - `citations: CitationsConfig or null` + - `DirectCaller object { type }` - Citation configuration for the document + Tool invocation directly from the model. - - `enabled: boolean` + - `ServerToolCaller object { tool_id, type }` - - `source: Base64PDFSource or PlainTextSource` + Tool invocation generated by a server-side tool. - - `Base64PDFSource object { data, media_type, type }` + - `ServerToolCaller20260120 object { tool_id, type }` - - `data: string` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - - `media_type: "application/pdf"` + - `WebFetchToolResultErrorBlock object { error_code, type }` - - `"application/pdf"` + - `error_code: WebFetchToolResultErrorCode` - - `type: "base64"` + - `"invalid_tool_input"` - - `"base64"` + - `"url_too_long"` - - `PlainTextSource object { data, media_type, type }` + - `"url_not_allowed"` - - `data: string` + - `"url_not_in_prior_context"` - - `media_type: "text/plain"` + - `"url_not_accessible"` - - `"text/plain"` + - `"unsupported_content_type"` - - `type: "text"` + - `"too_many_requests"` - - `"text"` + - `"max_uses_exceeded"` - - `title: string or null` + - `"unavailable"` - The title of the document + - `type: "web_fetch_tool_result_error"` - - `type: "document"` + - `"web_fetch_tool_result_error"` - - `"document"` + - `WebFetchBlock object { content, retrieved_at, type, url }` - - `retrieved_at: string or null` + - `content: DocumentBlock` - ISO 8601 timestamp when the content was retrieved + - `citations: CitationsConfig or null` - - `type: "web_fetch_result"` + Citation configuration for the document - - `"web_fetch_result"` + - `enabled: boolean` - - `url: string` + - `source: Base64PDFSource or PlainTextSource` - Fetched content URL + - `Base64PDFSource object { data, media_type, type }` - - `tool_use_id: string` + - `data: string` - - `type: "web_fetch_tool_result"` + - `media_type: "application/pdf"` - - `"web_fetch_tool_result"` + - `"application/pdf"` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `type: "base64"` - - `content: CodeExecutionToolResultBlockContent` + - `"base64"` - Code execution result with encrypted stdout for PFC + web_search results. + - `PlainTextSource object { data, media_type, type }` - - `CodeExecutionToolResultError object { error_code, type }` + - `data: string` - - `error_code: CodeExecutionToolResultErrorCode` + - `media_type: "text/plain"` - - `"invalid_tool_input"` + - `"text/plain"` - - `"unavailable"` + - `type: "text"` - - `"too_many_requests"` + - `"text"` - - `"execution_time_exceeded"` + - `title: string or null` - - `type: "code_execution_tool_result_error"` + The title of the document - - `"code_execution_tool_result_error"` + - `type: "document"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"document"` - - `content: array of CodeExecutionOutputBlock` + - `retrieved_at: string or null` - - `file_id: string` + ISO 8601 timestamp when the content was retrieved - - `type: "code_execution_output"` + - `type: "web_fetch_result"` - - `"code_execution_output"` + - `"web_fetch_result"` - - `return_code: number` + - `url: string` - - `stderr: string` + Fetched content URL - - `stdout: string` + - `tool_use_id: string` - - `type: "code_execution_result"` + - `type: "web_fetch_tool_result"` - - `"code_execution_result"` + - `"web_fetch_tool_result"` - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + + - `content: CodeExecutionToolResultBlockContent` Code execution result with encrypted stdout for PFC + web_search results. - - `content: array of CodeExecutionOutputBlock` + - `CodeExecutionToolResultError object { error_code, type }` - - `file_id: string` + - `error_code: CodeExecutionToolResultErrorCode` - - `type: "code_execution_output"` + - `"invalid_tool_input"` - - `encrypted_stdout: string` + - `"unavailable"` - - `return_code: number` + - `"too_many_requests"` - - `stderr: string` + - `"execution_time_exceeded"` - - `type: "encrypted_code_execution_result"` + - `type: "code_execution_tool_result_error"` - - `"encrypted_code_execution_result"` + - `"code_execution_tool_result_error"` - - `tool_use_id: string` + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `type: "code_execution_tool_result"` + - `content: array of CodeExecutionOutputBlock` - - `"code_execution_tool_result"` + - `file_id: string` - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `type: "code_execution_output"` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `"code_execution_output"` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `return_code: number` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `stderr: string` - - `"invalid_tool_input"` + - `stdout: string` - - `"unavailable"` + - `type: "code_execution_result"` - - `"too_many_requests"` + - `"code_execution_result"` - - `"execution_time_exceeded"` + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `"output_file_too_large"` + Code execution result with encrypted stdout for PFC + web_search results. - - `type: "bash_code_execution_tool_result_error"` + - `content: array of CodeExecutionOutputBlock` - - `"bash_code_execution_tool_result_error"` + - `file_id: string` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `type: "code_execution_output"` - - `content: array of BashCodeExecutionOutputBlock` + - `encrypted_stdout: string` - - `file_id: string` + - `return_code: number` - - `type: "bash_code_execution_output"` + - `stderr: string` - - `"bash_code_execution_output"` + - `type: "encrypted_code_execution_result"` - - `return_code: number` + - `"encrypted_code_execution_result"` - - `stderr: string` + - `tool_use_id: string` - - `stdout: string` + - `type: "code_execution_tool_result"` - - `type: "bash_code_execution_result"` + - `"code_execution_tool_result"` - - `"bash_code_execution_result"` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `tool_use_id: string` + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` - - `type: "bash_code_execution_tool_result"` + - `BashCodeExecutionToolResultError object { error_code, type }` - - `"bash_code_execution_tool_result"` + - `error_code: BashCodeExecutionToolResultErrorCode` - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"invalid_tool_input"` - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + - `"unavailable"` - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"too_many_requests"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `"execution_time_exceeded"` - - `"invalid_tool_input"` + - `"output_file_too_large"` - - `"unavailable"` + - `type: "bash_code_execution_tool_result_error"` - - `"too_many_requests"` + - `"bash_code_execution_tool_result_error"` - - `"execution_time_exceeded"` + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"file_not_found"` + - `content: array of BashCodeExecutionOutputBlock` - - `error_message: string or null` + - `file_id: string` - - `type: "text_editor_code_execution_tool_result_error"` + - `type: "bash_code_execution_output"` - - `"text_editor_code_execution_tool_result_error"` + - `"bash_code_execution_output"` - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `return_code: number` - - `content: string` + - `stderr: string` - - `file_type: "text" or "image" or "pdf"` + - `stdout: string` - - `"text"` + - `type: "bash_code_execution_result"` - - `"image"` + - `"bash_code_execution_result"` - - `"pdf"` + - `tool_use_id: string` - - `num_lines: number or null` + - `type: "bash_code_execution_tool_result"` - - `start_line: number or null` + - `"bash_code_execution_tool_result"` - - `total_lines: number or null` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `type: "text_editor_code_execution_view_result"` + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `"text_editor_code_execution_view_result"` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `is_file_update: boolean` + - `"invalid_tool_input"` - - `type: "text_editor_code_execution_create_result"` + - `"unavailable"` - - `"text_editor_code_execution_create_result"` + - `"too_many_requests"` - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `"execution_time_exceeded"` - - `lines: array of string or null` + - `"file_not_found"` - - `new_lines: number or null` + - `error_message: string or null` - - `new_start: number or null` + - `type: "text_editor_code_execution_tool_result_error"` - - `old_lines: number or null` + - `"text_editor_code_execution_tool_result_error"` - - `old_start: number or null` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `type: "text_editor_code_execution_str_replace_result"` + - `content: string` - - `"text_editor_code_execution_str_replace_result"` + - `file_type: "text" or "image" or "pdf"` - - `tool_use_id: string` + - `"text"` - - `type: "text_editor_code_execution_tool_result"` + - `"image"` - - `"text_editor_code_execution_tool_result"` + - `"pdf"` - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + - `num_lines: number or null` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `start_line: number or null` - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `total_lines: number or null` - - `error_code: ToolSearchToolResultErrorCode` + - `type: "text_editor_code_execution_view_result"` - - `"invalid_tool_input"` + - `"text_editor_code_execution_view_result"` - - `"unavailable"` + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `"too_many_requests"` + - `is_file_update: boolean` - - `"execution_time_exceeded"` + - `type: "text_editor_code_execution_create_result"` - - `error_message: string or null` + - `"text_editor_code_execution_create_result"` - - `type: "tool_search_tool_result_error"` + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `"tool_search_tool_result_error"` + - `lines: array of string or null` - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `new_lines: number or null` - - `tool_references: array of ToolReferenceBlock` + - `new_start: number or null` - - `tool_name: string` + - `old_lines: number or null` - - `type: "tool_reference"` + - `old_start: number or null` - - `"tool_reference"` + - `type: "text_editor_code_execution_str_replace_result"` - - `type: "tool_search_tool_search_result"` + - `"text_editor_code_execution_str_replace_result"` - - `"tool_search_tool_search_result"` + - `tool_use_id: string` - - `tool_use_id: string` + - `type: "text_editor_code_execution_tool_result"` - - `type: "tool_search_tool_result"` + - `"text_editor_code_execution_tool_result"` - - `"tool_search_tool_result"` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - - `ContainerUploadBlock object { file_id, type }` + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - Response model for a file uploaded to the container. + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `file_id: string` + - `error_code: ToolSearchToolResultErrorCode` - - `type: "container_upload"` + - `"invalid_tool_input"` - - `"container_upload"` + - `"unavailable"` -### Content Block Param + - `"too_many_requests"` -- `ContentBlockParam = TextBlockParam or ImageBlockParam or DocumentBlockParam or 14 more` + - `"execution_time_exceeded"` - Regular text content. + - `error_message: string or null` - - `TextBlockParam object { text, type, cache_control, citations }` + - `type: "tool_search_tool_result_error"` - - `text: string` + - `"tool_search_tool_result_error"` - - `type: "text"` + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - - `"text"` + - `tool_references: array of ToolReferenceBlock` - - `cache_control: optional CacheControlEphemeral or null` + - `tool_name: string` - Create a cache control breakpoint at this content block. + - `type: "tool_reference"` - - `type: "ephemeral"` + - `"tool_reference"` - - `"ephemeral"` + - `type: "tool_search_tool_search_result"` - - `ttl: optional "5m" or "1h"` + - `"tool_search_tool_search_result"` - The time-to-live for the cache control breakpoint. + - `tool_use_id: string` - This may be one the following values: + - `type: "tool_search_tool_result"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"tool_search_tool_result"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `ContainerUploadBlock object { file_id, type }` - - `"5m"` + Response model for a file uploaded to the container. - - `"1h"` + - `file_id: string` - - `citations: optional array of TextCitationParam or null` + - `type: "container_upload"` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"container_upload"` - - `cited_text: string` + - `model: Model` - - `document_index: number` + The model that will complete your prompt. - - `document_title: string or null` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `end_char_index: number` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `start_char_index: number` + The model that will complete your prompt. - - `type: "char_location"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `"char_location"` + - `"claude-sonnet-5"` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + High-performance model for coding and agents - - `cited_text: string` + - `"claude-fable-5"` - - `document_index: number` + Next generation of intelligence for the hardest knowledge work and coding problems - - `document_title: string or null` + - `"claude-mythos-5"` - - `end_page_number: number` + Most capable model for cybersecurity and biology research - - `start_page_number: number` + - `"claude-opus-5"` - - `type: "page_location"` + Powerful intelligence for long-running agents and coding - - `"page_location"` + - `"claude-opus-4-8"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + Powerful intelligence for long-running agents and coding - - `cited_text: string` + - `"claude-opus-4-7"` - The full text of the cited block range, concatenated. + Powerful intelligence for long-running agents and coding - 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. + - `"claude-mythos-preview"` - - `document_index: number` + New class of intelligence, strongest in coding and cybersecurity - - `document_title: string or null` + - `"claude-opus-4-6"` - - `end_block_index: number` + Powerful intelligence for long-running agents and coding - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"claude-sonnet-4-6"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Best combination of speed and intelligence - - `start_block_index: number` + - `"claude-haiku-4-5"` - 0-based index of the first cited block in the source's `content` array. + Fastest model with near-frontier intelligence - - `type: "content_block_location"` + - `"claude-haiku-4-5-20251001"` - - `"content_block_location"` + Fastest model with near-frontier intelligence - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"claude-opus-4-5"` - - `cited_text: string` + Powerful intelligence for long-running agents and coding - - `encrypted_index: string` + - `"claude-opus-4-5-20251101"` - - `title: string or null` + Powerful intelligence for long-running agents and coding - - `type: "web_search_result_location"` + - `"claude-sonnet-4-5"` - - `"web_search_result_location"` + High-performance model for agents and coding - - `url: string` + - `"claude-sonnet-4-5-20250929"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + High-performance model for agents and coding - - `cited_text: string` + - `string` - The full text of the cited block range, concatenated. + - `role: "assistant"` - 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. + Conversational role of the generated message. - - `end_block_index: number` + This will always be `"assistant"`. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"assistant"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `stop_details: RefusalStopDetails or null` - - `search_result_index: number` + Structured information about a refusal. - 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. + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + The policy category that triggered a refusal. - - `source: string` + - `"cyber"` - - `start_block_index: number` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - 0-based index of the first cited block in the source's `content` array. + - `"bio"` - - `title: string or null` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `type: "search_result_location"` + - `"frontier_llm"` - - `"search_result_location"` + 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. - - `ImageBlockParam object { source, type, cache_control }` + - `"reasoning_extraction"` - - `source: Base64ImageSource or URLImageSource` + 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). - - `Base64ImageSource object { data, media_type, type }` + - `"general_harms"` - - `data: string` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `explanation: string or null` - - `"image/jpeg"` + Human-readable explanation of the refusal. - - `"image/png"` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - - `"image/gif"` + - `type: "refusal"` - - `"image/webp"` + - `"refusal"` - - `type: "base64"` + - `stop_reason: StopReason or null` - - `"base64"` + The reason that we stopped. - - `URLImageSource object { type, url }` + This may be one the following values: - - `type: "url"` + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window - - `"url"` + 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. - - `url: string` + - `"end_turn"` - - `type: "image"` + - `"max_tokens"` - - `"image"` + - `"stop_sequence"` - - `cache_control: optional CacheControlEphemeral or null` + - `"tool_use"` - Create a cache control breakpoint at this content block. + - `"pause_turn"` - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `"refusal"` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `"model_context_window_exceeded"` - - `Base64PDFSource object { data, media_type, type }` + - `stop_sequence: string or null` - - `data: string` + Which custom stop sequence was generated, if any. - - `media_type: "application/pdf"` + This value will be a non-null string if one of your custom stop sequences was generated. - - `"application/pdf"` + - `type: "message"` - - `type: "base64"` + Object type. - - `"base64"` + For Messages, this is always `"message"`. - - `PlainTextSource object { data, media_type, type }` + - `"message"` - - `data: string` + - `usage: Usage` - - `media_type: "text/plain"` + Billing and rate-limit usage. - - `"text/plain"` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - - `type: "text"` + 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. - - `"text"` + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `ContentBlockSource object { content, type }` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - - `content: string or array of ContentBlockSourceContent` + - `cache_creation: CacheCreation or null` - - `string` + Breakdown of cached tokens by TTL - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + - `ephemeral_1h_input_tokens: number` - - `TextBlockParam object { text, type, cache_control, citations }` + The number of input tokens used to create the 1 hour cache entry. - - `ImageBlockParam object { source, type, cache_control }` + - `ephemeral_5m_input_tokens: number` - - `type: "content"` + The number of input tokens used to create the 5 minute cache entry. - - `"content"` + - `cache_creation_input_tokens: number or null` - - `URLPDFSource object { type, url }` + The number of input tokens used to create the cache entry. - - `type: "url"` + - `cache_read_input_tokens: number or null` - - `"url"` + The number of input tokens read from the cache. - - `url: string` + - `inference_geo: string or null` - - `type: "document"` + The geographic region where inference was performed for this request. - - `"document"` + - `input_tokens: number` - - `cache_control: optional CacheControlEphemeral or null` + The number of input tokens which were used. - Create a cache control breakpoint at this content block. + - `output_tokens: number` - - `citations: optional CitationsConfigParam or null` + The number of output tokens which were used. - - `enabled: optional boolean` + - `output_tokens_details: OutputTokensDetails or null` - - `context: optional string or null` + Breakdown of output tokens by category. - - `title: optional string or null` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `thinking_tokens: number` - - `content: array of TextBlockParam` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `text: string` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `type: "text"` + - `server_tool_use: ServerToolUsage or null` - - `cache_control: optional CacheControlEphemeral or null` + The number of server tool requests. - Create a cache control breakpoint at this content block. + - `web_fetch_requests: number` - - `citations: optional array of TextCitationParam or null` + The number of web fetch tool requests. - - `source: string` + - `web_search_requests: number` - - `title: string` + The number of web search tool requests. - - `type: "search_result"` + - `service_tier: "standard" or "priority" or "batch" or null` - - `"search_result"` + If the request used the priority, standard, or batch tier. - - `cache_control: optional CacheControlEphemeral or null` + - `"standard"` - Create a cache control breakpoint at this content block. + - `"priority"` - - `citations: optional CitationsConfigParam` + - `"batch"` - - `ThinkingBlockParam object { signature, thinking, type }` +### Message Count Tokens Tool - - `signature: string` +- `MessageCountTokensTool = Tool or ToolBash20250124 or CodeExecutionTool20250522 or 18 more` - 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. + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `Tool object { input_schema, name, allowed_callers, 7 more }` - - `thinking: string` + - `input_schema: object { type, properties, required }` - The `thinking` text of this block as returned by the API. + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. - - `type: "thinking"` + This defines the shape of the `input` that your tool accepts and that the model will produce. - - `"thinking"` + - `type: "object"` - - `RedactedThinkingBlockParam object { data, type }` + - `"object"` - - `data: string` + - `properties: optional map[unknown] or null` - 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. + - `required: optional array of string or null` - - `type: "redacted_thinking"` + - `name: string` - - `"redacted_thinking"` + Name of the tool. - - `ToolUseBlockParam object { id, input, name, 3 more }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `id: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `input: map[unknown]` + - `"direct"` - - `name: string` + - `"code_execution_20250825"` - - `type: "tool_use"` + - `"code_execution_20260120"` - - `"tool_use"` + - `"code_execution_20260521"` - `cache_control: optional CacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `type: "ephemeral"` - Tool invocation directly from the model. + - `"ephemeral"` - - `DirectCaller object { type }` + - `ttl: optional "5m" or "1h"` - Tool invocation directly from the model. + The time-to-live for the cache control breakpoint. - - `type: "direct"` + This may be one the following values: - - `"direct"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `ServerToolCaller object { tool_id, type }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Tool invocation generated by a server-side tool. + - `"5m"` - - `tool_id: string` + - `"1h"` - - `type: "code_execution_20250825"` + - `defer_loading: optional boolean` - - `"code_execution_20250825"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ServerToolCaller20260120 object { tool_id, type }` + - `description: optional string` - - `tool_id: string` + Description of what this tool does. - - `type: "code_execution_20260120"` + 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. - - `"code_execution_20260120"` + - `eager_input_streaming: optional boolean or null` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + 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. - - `tool_use_id: string` + - `input_examples: optional array of map[unknown]` - - `type: "tool_result"` + - `strict: optional boolean` - - `"tool_result"` + When true, guarantees schema validation on tool names and inputs - - `cache_control: optional CacheControlEphemeral or null` + - `type: optional "custom" or null` - Create a cache control breakpoint at this content block. + - `"custom"` - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` - - `string` + - `name: "bash"` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + Name of the tool. - - `TextBlockParam object { text, type, cache_control, citations }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `ImageBlockParam object { source, type, cache_control }` + - `"bash"` - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `type: "bash_20250124"` - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `"bash_20250124"` - - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - Tool reference block that can be included in tool_result content. + - `"direct"` - - `tool_name: string` + - `"code_execution_20250825"` - - `type: "tool_reference"` + - `"code_execution_20260120"` - - `"tool_reference"` + - `"code_execution_20260521"` - - `cache_control: optional CacheControlEphemeral or null` + - `cache_control: optional CacheControlEphemeral or null` - Create a cache control breakpoint at this content block. + Create a cache control breakpoint at this content block. - - `is_error: optional boolean` + - `defer_loading: optional boolean` - - `ServerToolUseBlockParam object { id, input, name, 3 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `id: string` + - `input_examples: optional array of map[unknown]` - - `input: map[unknown]` + - `strict: optional boolean` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + When true, guarantees schema validation on tool names and inputs - - `"web_search"` + - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - `"web_fetch"` + - `name: "code_execution"` + + Name of the tool. + + This is how the tool will be called by the model and in `tool_use` blocks. - `"code_execution"` - - `"bash_code_execution"` + - `type: "code_execution_20250522"` - - `"text_editor_code_execution"` + - `"code_execution_20250522"` - - `"tool_search_tool_regex"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"tool_search_tool_bm25"` + - `"direct"` - - `type: "server_tool_use"` + - `"code_execution_20250825"` - - `"server_tool_use"` + - `"code_execution_20260120"` + + - `"code_execution_20260521"` - `cache_control: optional CacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - Tool invocation directly from the model. - - - `DirectCaller object { type }` + - `defer_loading: optional boolean` - Tool invocation directly from the model. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ServerToolCaller object { tool_id, type }` + - `strict: optional boolean` - Tool invocation generated by a server-side tool. + When true, guarantees schema validation on tool names and inputs - - `ServerToolCaller20260120 object { tool_id, type }` + - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `name: "code_execution"` - - `content: WebSearchToolResultBlockParamContent` + Name of the tool. - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + This is how the tool will be called by the model and in `tool_use` blocks. - - `encrypted_content: string` + - `"code_execution"` - - `title: string` + - `type: "code_execution_20250825"` - - `type: "web_search_result"` + - `"code_execution_20250825"` - - `"web_search_result"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `url: string` + - `"direct"` - - `page_age: optional string or null` + - `"code_execution_20250825"` - - `WebSearchToolRequestError object { error_code, type }` + - `"code_execution_20260120"` - - `error_code: WebSearchToolResultErrorCode` + - `"code_execution_20260521"` - - `"invalid_tool_input"` + - `cache_control: optional CacheControlEphemeral or null` - - `"unavailable"` + Create a cache control breakpoint at this content block. - - `"max_uses_exceeded"` + - `defer_loading: optional boolean` - - `"too_many_requests"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"query_too_long"` + - `strict: optional boolean` - - `"request_too_large"` + When true, guarantees schema validation on tool names and inputs - - `type: "web_search_tool_result_error"` + - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - `"web_search_tool_result_error"` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - `tool_use_id: string` + - `name: "code_execution"` - - `type: "web_search_tool_result"` + Name of the tool. - - `"web_search_tool_result"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `cache_control: optional CacheControlEphemeral or null` + - `"code_execution"` - Create a cache control breakpoint at this content block. + - `type: "code_execution_20260120"` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"code_execution_20260120"` - Tool invocation directly from the model. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `DirectCaller object { type }` + - `"direct"` - Tool invocation directly from the model. + - `"code_execution_20250825"` - - `ServerToolCaller object { tool_id, type }` + - `"code_execution_20260120"` - Tool invocation generated by a server-side tool. + - `"code_execution_20260521"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + Create a cache control breakpoint at this content block. - - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + - `defer_loading: optional boolean` - - `WebFetchToolResultErrorBlockParam object { error_code, type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `error_code: WebFetchToolResultErrorCode` + - `strict: optional boolean` - - `"invalid_tool_input"` + When true, guarantees schema validation on tool names and inputs - - `"url_too_long"` + - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - - `"url_not_allowed"` + Code execution tool with REPL state persistence. - - `"url_not_in_prior_context"` + - `name: "code_execution"` - - `"url_not_accessible"` + Name of the tool. - - `"unsupported_content_type"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"too_many_requests"` + - `"code_execution"` - - `"max_uses_exceeded"` + - `type: "code_execution_20260521"` - - `"unavailable"` + - `"code_execution_20260521"` - - `type: "web_fetch_tool_result_error"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"web_fetch_tool_result_error"` + - `"direct"` - - `WebFetchBlockParam object { content, type, url, retrieved_at }` + - `"code_execution_20250825"` - - `content: DocumentBlockParam` + - `"code_execution_20260120"` - - `type: "web_fetch_result"` + - `"code_execution_20260521"` - - `"web_fetch_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `url: string` + Create a cache control breakpoint at this content block. - Fetched content URL + - `defer_loading: optional boolean` - - `retrieved_at: optional string or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - ISO 8601 timestamp when the content was retrieved + - `strict: optional boolean` - - `tool_use_id: string` + When true, guarantees schema validation on tool names and inputs - - `type: "web_fetch_tool_result"` + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"web_fetch_tool_result"` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - - `cache_control: optional CacheControlEphemeral or null` + - `type: "browser_toolset_20260801"` - Create a cache control breakpoint at this content block. + - `"browser_toolset_20260801"` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - Tool invocation directly from the model. + - `"direct"` - - `DirectCaller object { type }` + - `"code_execution_20250825"` - Tool invocation directly from the model. + - `"code_execution_20260120"` - - `ServerToolCaller object { tool_id, type }` + - `"code_execution_20260521"` - Tool invocation generated by a server-side tool. + - `cache_control: optional CacheControlEphemeral or null` - - `ServerToolCaller20260120 object { tool_id, type }` + Create a cache control breakpoint at this content block. - - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `configs: optional BrowserToolsetConfigs or null` - - `content: CodeExecutionToolResultBlockParamContent` + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - Code execution result with encrypted stdout for PFC + web_search results. + - `close_tab: optional BrowserCloseTabConfig or null` - - `CodeExecutionToolResultErrorParam object { error_code, type }` + `close_tab`'s config overrides. - - `error_code: CodeExecutionToolResultErrorCode` + - `defer_loading: optional boolean or null` - - `"invalid_tool_input"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"unavailable"` + - `enabled: optional boolean or null` - - `"too_many_requests"` + 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. - - `"execution_time_exceeded"` + - `double_click: optional BrowserDoubleClickConfig or null` - - `type: "code_execution_tool_result_error"` + `double_click`'s config overrides. - - `"code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of CodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "code_execution_output"` + - `file_upload: optional BrowserFileUploadConfig or null` - - `"code_execution_output"` + `file_upload`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stdout: string` + - `enabled: optional boolean or null` - - `type: "code_execution_result"` + 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. - - `"code_execution_result"` + - `find: optional BrowserFindConfig or null` - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + `find`'s config overrides. - Code execution result with encrypted stdout for PFC + web_search results. + - `defer_loading: optional boolean or null` - - `content: array of CodeExecutionOutputBlockParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `file_id: string` + - `enabled: optional boolean or null` - - `type: "code_execution_output"` + 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. - - `encrypted_stdout: string` + - `form_input: optional BrowserFormInputConfig or null` - - `return_code: number` + `form_input`'s config overrides. - - `stderr: string` + - `defer_loading: optional boolean or null` - - `type: "encrypted_code_execution_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"encrypted_code_execution_result"` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "code_execution_tool_result"` + - `get_page_text: optional BrowserGetPageTextConfig or null` - - `"code_execution_tool_result"` + `get_page_text`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `enabled: optional boolean or null` - - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + 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. - - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + - `hold_key: optional BrowserHoldKeyConfig or null` - - `error_code: BashCodeExecutionToolResultErrorCode` + `hold_key`'s config overrides. - - `"invalid_tool_input"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"execution_time_exceeded"` + 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. - - `"output_file_too_large"` + - `hover: optional BrowserHoverConfig or null` - - `type: "bash_code_execution_tool_result_error"` + `hover`'s config overrides. - - `"bash_code_execution_tool_result_error"` + - `defer_loading: optional boolean or null` - - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `content: array of BashCodeExecutionOutputBlockParam` + - `enabled: optional boolean or null` - - `file_id: string` + 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. - - `type: "bash_code_execution_output"` + - `javascript_exec: optional BrowserJavascriptExecConfig or null` - - `"bash_code_execution_output"` + `javascript_exec`'s config overrides. - - `return_code: number` + - `defer_loading: optional boolean or null` - - `stderr: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stdout: string` + - `enabled: optional boolean or null` - - `type: "bash_code_execution_result"` + 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. - - `"bash_code_execution_result"` + - `key: optional BrowserKeyConfig or null` - - `tool_use_id: string` + `key`'s config overrides. - - `type: "bash_code_execution_tool_result"` + - `defer_loading: optional boolean or null` - - `"bash_code_execution_tool_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `left_click: optional BrowserLeftClickConfig or null` - - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + `left_click`'s config overrides. - - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `defer_loading: optional boolean or null` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"invalid_tool_input"` + - `enabled: optional boolean or null` - - `"unavailable"` + 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. - - `"too_many_requests"` + - `left_click_drag: optional BrowserLeftClickDragConfig or null` - - `"execution_time_exceeded"` + `left_click_drag`'s config overrides. - - `"file_not_found"` + - `defer_loading: optional boolean or null` - - `type: "text_editor_code_execution_tool_result_error"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"text_editor_code_execution_tool_result_error"` + - `enabled: optional boolean or null` - - `error_message: optional string or null` + 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. - - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` - - `content: string` + `left_mouse_down`'s config overrides. - - `file_type: "text" or "image" or "pdf"` + - `defer_loading: optional boolean or null` - - `"text"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"image"` + - `enabled: optional boolean or null` - - `"pdf"` + 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. - - `type: "text_editor_code_execution_view_result"` + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` - - `"text_editor_code_execution_view_result"` + `left_mouse_up`'s config overrides. - - `num_lines: optional number or null` + - `defer_loading: optional boolean or null` - - `start_line: optional number or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `total_lines: optional number or null` + - `enabled: optional boolean or null` - - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + 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. - - `is_file_update: boolean` + - `list_tabs: optional BrowserListTabsConfig or null` - - `type: "text_editor_code_execution_create_result"` + `list_tabs`'s config overrides. - - `"text_editor_code_execution_create_result"` + - `defer_loading: optional boolean or null` - - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "text_editor_code_execution_str_replace_result"` + - `enabled: optional boolean or null` - - `"text_editor_code_execution_str_replace_result"` + 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. - - `lines: optional array of string or null` + - `middle_click: optional BrowserMiddleClickConfig or null` - - `new_lines: optional number or null` + `middle_click`'s config overrides. - - `new_start: optional number or null` + - `defer_loading: optional boolean or null` - - `old_lines: optional number or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `old_start: optional number or null` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "text_editor_code_execution_tool_result"` + - `mouse_move: optional BrowserMouseMoveConfig or null` - - `"text_editor_code_execution_tool_result"` + `mouse_move`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `enabled: optional boolean or null` - - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + 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. - - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `navigate: optional BrowserNavigateConfig or null` - - `error_code: ToolSearchToolResultErrorCode` + `navigate`'s config overrides. - - `"invalid_tool_input"` + - `defer_loading: optional boolean or null` - - `"unavailable"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"too_many_requests"` + - `enabled: optional boolean or null` - - `"execution_time_exceeded"` + 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. - - `type: "tool_search_tool_result_error"` + - `new_tab: optional BrowserNewTabConfig or null` - - `"tool_search_tool_result_error"` + `new_tab`'s config overrides. - - `error_message: optional string or null` + - `defer_loading: optional boolean or null` - - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_references: array of ToolReferenceBlockParam` + - `enabled: optional boolean or null` - - `tool_name: string` + 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. - - `type: "tool_reference"` + - `read_console: optional BrowserReadConsoleConfig or null` - - `cache_control: optional CacheControlEphemeral or null` + `read_console`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "tool_search_tool_search_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool_search_tool_search_result"` + - `enabled: optional boolean or null` - - `tool_use_id: string` + 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. - - `type: "tool_search_tool_result"` + - `read_network: optional BrowserReadNetworkConfig or null` - - `"tool_search_tool_result"` + `read_network`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ContainerUploadBlockParam object { file_id, type, cache_control }` + - `enabled: optional boolean or null` - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + 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. - - `file_id: string` + - `read_page: optional BrowserReadPageConfig or null` - - `type: "container_upload"` + `read_page`'s config overrides. - - `"container_upload"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `MidConversationSystemBlockParam object { content, type, cache_control }` + 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. - System instructions that appear mid-conversation. + - `right_click: optional BrowserRightClickConfig or null` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + `right_click`'s config overrides. - - `content: array of TextBlockParam` + - `defer_loading: optional boolean or null` - System instruction text blocks. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `text: string` + - `enabled: optional boolean or null` - - `type: "text"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `screenshot: optional BrowserScreenshotConfig or null` - Create a cache control breakpoint at this content block. + `screenshot`'s config overrides. - - `citations: optional array of TextCitationParam or null` + - `defer_loading: optional boolean or null` - - `type: "mid_conv_system"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"mid_conv_system"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `scroll: optional BrowserScrollConfig or null` -### Content Block Source + `scroll`'s config overrides. -- `ContentBlockSource object { content, type }` + - `defer_loading: optional boolean or null` - - `content: string or array of ContentBlockSourceContent` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `string` + - `enabled: optional boolean or null` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + 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. - - `TextBlockParam object { text, type, cache_control, citations }` + - `scroll_to: optional BrowserScrollToConfig or null` - - `text: string` + `scroll_to`'s config overrides. - - `type: "text"` + - `defer_loading: optional boolean or null` - - `"text"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `type: "ephemeral"` + - `switch_tab: optional BrowserSwitchTabConfig or null` - - `"ephemeral"` + `switch_tab`'s config overrides. - - `ttl: optional "5m" or "1h"` + - `defer_loading: optional boolean or null` - The time-to-live for the cache control breakpoint. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - This may be one the following values: + - `enabled: optional boolean or null` - - `5m`: 5 minutes - - `1h`: 1 hour + 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. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `triple_click: optional BrowserTripleClickConfig or null` - - `"5m"` + `triple_click`'s config overrides. - - `"1h"` + - `defer_loading: optional boolean or null` - - `citations: optional array of TextCitationParam or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `enabled: optional boolean or null` - - `cited_text: string` + 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. - - `document_index: number` + - `type: optional BrowserTypeConfig or null` - - `document_title: string or null` + `type`'s config overrides. - - `end_char_index: number` + - `defer_loading: optional boolean or null` - - `start_char_index: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "char_location"` + - `enabled: optional boolean or null` - - `"char_location"` + 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. - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `wait: optional BrowserWaitConfig or null` - - `cited_text: string` + `wait`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_page_number: number` + - `enabled: optional boolean or null` - - `start_page_number: number` + 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. - - `type: "page_location"` + - `zoom: optional BrowserZoomConfig or null` - - `"page_location"` + `zoom`'s config overrides. - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The full text of the cited block range, concatenated. + - `enabled: optional boolean or null` - 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. + 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. - - `document_index: number` + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - `document_title: string or null` + - `name: "memory"` - - `end_block_index: number` + Name of the tool. - Exclusive 0-based end index of the cited block range in the source's `content` array. + This is how the tool will be called by the model and in `tool_use` blocks. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"memory"` - - `start_block_index: number` + - `type: "memory_20250818"` - 0-based index of the first cited block in the source's `content` array. + - `"memory_20250818"` - - `type: "content_block_location"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"content_block_location"` + - `"direct"` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"code_execution_20250825"` - - `cited_text: string` + - `"code_execution_20260120"` - - `encrypted_index: string` + - `"code_execution_20260521"` - - `title: string or null` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "web_search_result_location"` + Create a cache control breakpoint at this content block. - - `"web_search_result_location"` + - `defer_loading: optional boolean` - - `url: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `input_examples: optional array of map[unknown]` - - `cited_text: string` + - `strict: optional boolean` - The full text of the cited block range, concatenated. + When true, guarantees schema validation on tool names and inputs - 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. + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `end_block_index: number` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "computer_toolset_20260801"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"computer_toolset_20260801"` - - `search_result_index: number` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - 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. + - `"direct"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"code_execution_20250825"` - - `source: string` + - `"code_execution_20260120"` - - `start_block_index: number` + - `"code_execution_20260521"` - 0-based index of the first cited block in the source's `content` array. + - `cache_control: optional CacheControlEphemeral or null` - - `title: string or null` + Create a cache control breakpoint at this content block. - - `type: "search_result_location"` + - `configs: optional ComputerToolsetConfigs or null` - - `"search_result_location"` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `ImageBlockParam object { source, type, cache_control }` + - `cursor_position: optional ComputerCursorPositionConfig or null` - - `source: Base64ImageSource or URLImageSource` + `cursor_position`'s config overrides. - - `Base64ImageSource object { data, media_type, type }` + - `defer_loading: optional boolean or null` - - `data: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `enabled: optional boolean or null` - - `"image/jpeg"` + 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. - - `"image/png"` + - `double_click: optional ComputerDoubleClickConfig or null` - - `"image/gif"` + `double_click`'s config overrides. - - `"image/webp"` + - `defer_loading: optional boolean or null` - - `type: "base64"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"base64"` + - `enabled: optional boolean or null` - - `URLImageSource object { type, url }` + 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. - - `type: "url"` + - `hold_key: optional ComputerHoldKeyConfig or null` - - `"url"` + `hold_key`'s config overrides. - - `url: string` + - `defer_loading: optional boolean or null` - - `type: "image"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"image"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `key: optional ComputerKeyConfig or null` - - `type: "content"` + `key`'s config overrides. - - `"content"` + - `defer_loading: optional boolean or null` -### Content Block Source Content + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `ContentBlockSourceContent = TextBlockParam or ImageBlockParam` + - `enabled: optional boolean or null` - - `TextBlockParam object { text, type, cache_control, citations }` + 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. - - `text: string` + - `left_click: optional ComputerLeftClickConfig or null` - - `type: "text"` + `left_click`'s config overrides. - - `"text"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - - `ttl: optional "5m" or "1h"` + `left_click_drag`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - - `"1h"` + `left_mouse_down`'s config overrides. - - `citations: optional array of TextCitationParam or null` + - `defer_loading: optional boolean or null` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cited_text: string` + - `enabled: optional boolean or null` - - `document_index: number` + 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. - - `document_title: string or null` + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - - `end_char_index: number` + `left_mouse_up`'s config overrides. - - `start_char_index: number` + - `defer_loading: optional boolean or null` - - `type: "char_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"char_location"` + - `enabled: optional boolean or null` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + 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. - - `cited_text: string` + - `middle_click: optional ComputerMiddleClickConfig or null` - - `document_index: number` + `middle_click`'s config overrides. - - `document_title: string or null` + - `defer_loading: optional boolean or null` - - `end_page_number: number` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_page_number: number` + - `enabled: optional boolean or null` - - `type: "page_location"` + 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. - - `"page_location"` + - `mouse_move: optional ComputerMouseMoveConfig or null` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + `mouse_move`'s config overrides. - - `cited_text: string` + - `defer_loading: optional boolean or null` - The full text of the cited block range, concatenated. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - 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. + - `enabled: optional boolean or null` - - `document_index: number` + 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. - - `document_title: string or null` + - `right_click: optional ComputerRightClickConfig or null` - - `end_block_index: number` + `right_click`'s config overrides. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `defer_loading: optional boolean or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `start_block_index: number` + - `enabled: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `type: "content_block_location"` + - `screenshot: optional ComputerScreenshotConfig or null` - - `"content_block_location"` + `screenshot`'s config overrides. - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `encrypted_index: string` + - `enabled: optional boolean or null` - - `title: string or null` + 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. - - `type: "web_search_result_location"` + - `scroll: optional ComputerScrollConfig or null` - - `"web_search_result_location"` + `scroll`'s config overrides. - - `url: string` + - `defer_loading: optional boolean or null` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cited_text: string` + - `enabled: optional boolean or null` - The full text of the cited block range, concatenated. + 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. - 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. + - `triple_click: optional ComputerTripleClickConfig or null` - - `end_block_index: number` + `triple_click`'s config overrides. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `defer_loading: optional boolean or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `search_result_index: number` + - `enabled: optional boolean or null` - 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. + 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. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `type: optional ComputerTypeConfig or null` - - `source: string` + `type`'s config overrides. - - `start_block_index: number` + - `defer_loading: optional boolean or null` - 0-based index of the first cited block in the source's `content` array. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `title: string or null` + - `enabled: optional boolean or null` - - `type: "search_result_location"` + 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. - - `"search_result_location"` + - `wait: optional ComputerWaitConfig or null` - - `ImageBlockParam object { source, type, cache_control }` + `wait`'s config overrides. - - `source: Base64ImageSource or URLImageSource` + - `defer_loading: optional boolean or null` - - `Base64ImageSource object { data, media_type, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `data: string` + - `enabled: optional boolean or null` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + 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. - - `"image/jpeg"` + - `zoom: optional ComputerZoomConfig or null` - - `"image/png"` + `zoom`'s config overrides. - - `"image/gif"` + - `defer_loading: optional boolean or null` - - `"image/webp"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "base64"` + - `enabled: optional boolean or null` - - `"base64"` + 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. - - `URLImageSource object { type, url }` + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - - `type: "url"` + - `name: "str_replace_editor"` - - `"url"` + Name of the tool. - - `url: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "image"` + - `"str_replace_editor"` - - `"image"` + - `type: "text_editor_20250124"` - - `cache_control: optional CacheControlEphemeral or null` + - `"text_editor_20250124"` - Create a cache control breakpoint at this content block. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -### Direct Caller + - `"direct"` -- `DirectCaller object { type }` + - `"code_execution_20250825"` - Tool invocation directly from the model. + - `"code_execution_20260120"` - - `type: "direct"` + - `"code_execution_20260521"` - - `"direct"` + - `cache_control: optional CacheControlEphemeral or null` -### Document Block + Create a cache control breakpoint at this content block. -- `DocumentBlock object { citations, source, title, type }` + - `defer_loading: optional boolean` - - `citations: CitationsConfig or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - Citation configuration for the document + - `input_examples: optional array of map[unknown]` - - `enabled: boolean` + - `strict: optional boolean` - - `source: Base64PDFSource or PlainTextSource` + When true, guarantees schema validation on tool names and inputs - - `Base64PDFSource object { data, media_type, type }` + - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` - - `data: string` + - `name: "str_replace_based_edit_tool"` - - `media_type: "application/pdf"` + Name of the tool. - - `"application/pdf"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "base64"` + - `"str_replace_based_edit_tool"` - - `"base64"` + - `type: "text_editor_20250429"` - - `PlainTextSource object { data, media_type, type }` + - `"text_editor_20250429"` - - `data: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `media_type: "text/plain"` + - `"direct"` - - `"text/plain"` + - `"code_execution_20250825"` - - `type: "text"` + - `"code_execution_20260120"` - - `"text"` + - `"code_execution_20260521"` - - `title: string or null` + - `cache_control: optional CacheControlEphemeral or null` - The title of the document + Create a cache control breakpoint at this content block. - - `type: "document"` + - `defer_loading: optional boolean` - - `"document"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. -### Document Block Param + - `input_examples: optional array of map[unknown]` -- `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `strict: optional boolean` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + When true, guarantees schema validation on tool names and inputs - - `Base64PDFSource object { data, media_type, type }` + - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` - - `data: string` + - `name: "str_replace_based_edit_tool"` - - `media_type: "application/pdf"` + Name of the tool. - - `"application/pdf"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "base64"` + - `"str_replace_based_edit_tool"` - - `"base64"` + - `type: "text_editor_20250728"` - - `PlainTextSource object { data, media_type, type }` + - `"text_editor_20250728"` - - `data: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `media_type: "text/plain"` + - `"direct"` - - `"text/plain"` + - `"code_execution_20250825"` - - `type: "text"` + - `"code_execution_20260120"` - - `"text"` + - `"code_execution_20260521"` - - `ContentBlockSource object { content, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `content: string or array of ContentBlockSourceContent` + Create a cache control breakpoint at this content block. - - `string` + - `defer_loading: optional boolean` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `TextBlockParam object { text, type, cache_control, citations }` + - `input_examples: optional array of map[unknown]` - - `text: string` + - `max_characters: optional number or null` - - `type: "text"` + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. - - `"text"` + - `strict: optional boolean` - - `cache_control: optional CacheControlEphemeral or null` + When true, guarantees schema validation on tool names and inputs - Create a cache control breakpoint at this content block. + - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` - - `type: "ephemeral"` + - `name: "web_search"` - - `"ephemeral"` + Name of the tool. - - `ttl: optional "5m" or "1h"` + This is how the tool will be called by the model and in `tool_use` blocks. - The time-to-live for the cache control breakpoint. + - `"web_search"` - This may be one the following values: + - `type: "web_search_20250305"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"web_search_20250305"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"5m"` + - `"direct"` - - `"1h"` + - `"code_execution_20250825"` - - `citations: optional array of TextCitationParam or null` + - `"code_execution_20260120"` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"code_execution_20260521"` - - `cited_text: string` + - `allowed_domains: optional array of string or null` - - `document_index: number` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `document_title: string or null` + - `blocked_domains: optional array of string or null` - - `end_char_index: number` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `start_char_index: number` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "char_location"` + Create a cache control breakpoint at this content block. - - `"char_location"` + - `defer_loading: optional boolean` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `cited_text: string` + - `max_uses: optional number or null` - - `document_index: number` + Maximum number of times the tool can be used in the API request. - - `document_title: string or null` + - `strict: optional boolean` - - `end_page_number: number` + When true, guarantees schema validation on tool names and inputs - - `start_page_number: number` + - `user_location: optional UserLocation or null` - - `type: "page_location"` + Parameters for the user's location. Used to provide more relevant search results. - - `"page_location"` + - `type: "approximate"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"approximate"` - - `cited_text: string` + - `city: optional string or null` - The full text of the cited block range, concatenated. + The city of the user. - 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. + - `country: optional string or null` - - `document_index: number` + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. - - `document_title: string or null` + - `region: optional string or null` - - `end_block_index: number` + The region of the user. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `timezone: optional string or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + The [IANA timezone](https://nodatime.org/TimeZones) of the user. - - `start_block_index: number` + - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` - 0-based index of the first cited block in the source's `content` array. + - `name: "web_fetch"` - - `type: "content_block_location"` + Name of the tool. - - `"content_block_location"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"web_fetch"` - - `cited_text: string` + - `type: "web_fetch_20250910"` - - `encrypted_index: string` + - `"web_fetch_20250910"` - - `title: string or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "web_search_result_location"` + - `"direct"` - - `"web_search_result_location"` + - `"code_execution_20250825"` - - `url: string` + - `"code_execution_20260120"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `"code_execution_20260521"` - - `cited_text: string` + - `allowed_domains: optional array of string or null` - The full text of the cited block range, concatenated. + List of domains to allow fetching from - 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. + - `blocked_domains: optional array of string or null` - - `end_block_index: number` + List of domains to block fetching from - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `cache_control: optional CacheControlEphemeral or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Create a cache control breakpoint at this content block. - - `search_result_index: number` + - `citations: optional CitationsConfigParam or null` - 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. + Citations configuration for fetched documents. Citations are disabled by default. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `enabled: optional boolean` - - `source: string` + - `defer_loading: optional boolean` - - `start_block_index: number` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - 0-based index of the first cited block in the source's `content` array. + - `max_content_tokens: optional number or null` - - `title: string or null` + 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. - - `type: "search_result_location"` + - `max_uses: optional number or null` - - `"search_result_location"` + Maximum number of times the tool can be used in the API request. - - `ImageBlockParam object { source, type, cache_control }` + - `strict: optional boolean` - - `source: Base64ImageSource or URLImageSource` + When true, guarantees schema validation on tool names and inputs - - `Base64ImageSource object { data, media_type, type }` + - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` - - `data: string` + - `name: "web_search"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + Name of the tool. - - `"image/jpeg"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"image/png"` + - `"web_search"` - - `"image/gif"` + - `type: "web_search_20260209"` - - `"image/webp"` + - `"web_search_20260209"` - - `type: "base64"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"base64"` + - `"direct"` - - `URLImageSource object { type, url }` + - `"code_execution_20250825"` - - `type: "url"` + - `"code_execution_20260120"` - - `"url"` + - `"code_execution_20260521"` - - `url: string` + - `allowed_domains: optional array of string or null` - - `type: "image"` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `"image"` + - `blocked_domains: optional array of string or null` - - `cache_control: optional CacheControlEphemeral or null` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - Create a cache control breakpoint at this content block. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "content"` + Create a cache control breakpoint at this content block. - - `"content"` + - `defer_loading: optional boolean` - - `URLPDFSource object { type, url }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "url"` + - `max_uses: optional number or null` - - `"url"` + Maximum number of times the tool can be used in the API request. - - `url: string` + - `strict: optional boolean` - - `type: "document"` + When true, guarantees schema validation on tool names and inputs - - `"document"` + - `user_location: optional UserLocation or null` - - `cache_control: optional CacheControlEphemeral or null` + Parameters for the user's location. Used to provide more relevant search results. - Create a cache control breakpoint at this content block. + - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` - - `citations: optional CitationsConfigParam or null` + - `name: "web_fetch"` - - `enabled: optional boolean` + Name of the tool. - - `context: optional string or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `title: optional string or null` + - `"web_fetch"` -### Encrypted Code Execution Result Block + - `type: "web_fetch_20260209"` -- `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"web_fetch_20260209"` - Code execution result with encrypted stdout for PFC + web_search results. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `content: array of CodeExecutionOutputBlock` + - `"direct"` - - `file_id: string` + - `"code_execution_20250825"` - - `type: "code_execution_output"` + - `"code_execution_20260120"` - - `"code_execution_output"` + - `"code_execution_20260521"` - - `encrypted_stdout: string` + - `allowed_domains: optional array of string or null` - - `return_code: number` + List of domains to allow fetching from - - `stderr: string` + - `blocked_domains: optional array of string or null` - - `type: "encrypted_code_execution_result"` + List of domains to block fetching from - - `"encrypted_code_execution_result"` + - `cache_control: optional CacheControlEphemeral or null` -### Encrypted Code Execution Result Block Param + Create a cache control breakpoint at this content block. -- `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `citations: optional CitationsConfigParam or null` - Code execution result with encrypted stdout for PFC + web_search results. + Citations configuration for fetched documents. Citations are disabled by default. - - `content: array of CodeExecutionOutputBlockParam` + - `defer_loading: optional boolean` - - `file_id: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "code_execution_output"` + - `max_content_tokens: optional number or null` - - `"code_execution_output"` + 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. - - `encrypted_stdout: string` + - `max_uses: optional number or null` - - `return_code: number` + Maximum number of times the tool can be used in the API request. - - `stderr: string` + - `strict: optional boolean` - - `type: "encrypted_code_execution_result"` + When true, guarantees schema validation on tool names and inputs - - `"encrypted_code_execution_result"` + - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` -### Image Block Param + Web fetch tool with use_cache parameter for bypassing cached content. -- `ImageBlockParam object { source, type, cache_control }` + - `name: "web_fetch"` - - `source: Base64ImageSource or URLImageSource` + Name of the tool. - - `Base64ImageSource object { data, media_type, type }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `data: string` + - `"web_fetch"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `type: "web_fetch_20260309"` - - `"image/jpeg"` + - `"web_fetch_20260309"` - - `"image/png"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"image/gif"` + - `"direct"` - - `"image/webp"` + - `"code_execution_20250825"` - - `type: "base64"` + - `"code_execution_20260120"` - - `"base64"` + - `"code_execution_20260521"` - - `URLImageSource object { type, url }` + - `allowed_domains: optional array of string or null` - - `type: "url"` + List of domains to allow fetching from - - `"url"` + - `blocked_domains: optional array of string or null` - - `url: string` + List of domains to block fetching from - - `type: "image"` + - `cache_control: optional CacheControlEphemeral or null` - - `"image"` + Create a cache control breakpoint at this content block. - - `cache_control: optional CacheControlEphemeral or null` + - `citations: optional CitationsConfigParam or null` - Create a cache control breakpoint at this content block. + Citations configuration for fetched documents. Citations are disabled by default. - - `type: "ephemeral"` + - `defer_loading: optional boolean` - - `"ephemeral"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ttl: optional "5m" or "1h"` + - `max_content_tokens: optional number or null` - The time-to-live for the cache control breakpoint. + 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. - This may be one the following values: + - `max_uses: optional number or null` - - `5m`: 5 minutes - - `1h`: 1 hour + Maximum number of times the tool can be used in the API request. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `strict: optional boolean` - - `"5m"` + When true, guarantees schema validation on tool names and inputs - - `"1h"` + - `use_cache: optional boolean` -### Input JSON Delta + 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. -- `InputJSONDelta object { partial_json, type }` + - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` - - `partial_json: string` + - `name: "web_search"` - - `type: "input_json_delta"` + Name of the tool. - - `"input_json_delta"` + This is how the tool will be called by the model and in `tool_use` blocks. -### JSON Output Format + - `"web_search"` -- `JSONOutputFormat object { schema, type }` + - `type: "web_search_20260318"` - - `schema: map[unknown]` + - `"web_search_20260318"` - The JSON schema of the format + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "json_schema"` + - `"direct"` - - `"json_schema"` + - `"code_execution_20250825"` -### Memory Tool 20250818 + - `"code_execution_20260120"` -- `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `"code_execution_20260521"` - - `name: "memory"` + - `allowed_domains: optional array of string or null` - Name of the tool. + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - This is how the tool will be called by the model and in `tool_use` blocks. + - `blocked_domains: optional array of string or null` - - `"memory"` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `type: "memory_20250818"` + - `cache_control: optional CacheControlEphemeral or null` - - `"memory_20250818"` + Create a cache control breakpoint at this content block. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean` - - `"direct"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"code_execution_20250825"` + - `max_uses: optional number or null` - - `"code_execution_20260120"` + Maximum number of times the tool can be used in the API request. - - `"code_execution_20260521"` + - `response_inclusion: optional "full" or "excluded"` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `"full"` - - `type: "ephemeral"` + - `"excluded"` - - `"ephemeral"` + - `strict: optional boolean` - - `ttl: optional "5m" or "1h"` + When true, guarantees schema validation on tool names and inputs - The time-to-live for the cache control breakpoint. + - `user_location: optional UserLocation or null` - This may be one the following values: + Parameters for the user's location. Used to provide more relevant search results. - - `5m`: 5 minutes - - `1h`: 1 hour + - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `name: "web_fetch"` - - `"5m"` + Name of the tool. - - `"1h"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `defer_loading: optional boolean` + - `"web_fetch"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "web_fetch_20260318"` - - `input_examples: optional array of map[unknown]` + - `"web_fetch_20260318"` - - `strict: optional boolean` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - When true, guarantees schema validation on tool names and inputs + - `"direct"` -### Message + - `"code_execution_20250825"` -- `Message object { id, container, content, 7 more }` + - `"code_execution_20260120"` - - `id: string` + - `"code_execution_20260521"` - Unique object identifier. + - `allowed_domains: optional array of string or null` - The format and length of IDs may change over time. + List of domains to allow fetching from - - `container: Container or null` + - `blocked_domains: optional array of string or null` - Information about the container used in the request (for the code execution tool) + List of domains to block fetching from - - `id: string` + - `cache_control: optional CacheControlEphemeral or null` - Identifier for the container used in this request + Create a cache control breakpoint at this content block. - - `expires_at: string` + - `citations: optional CitationsConfigParam or null` - The time at which the container will expire. + Citations configuration for fetched documents. Citations are disabled by default. - - `content: array of ContentBlock` + - `defer_loading: optional boolean` - Content generated by the model. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - This is an array of content blocks, each of which has a `type` that determines its shape. + - `max_content_tokens: optional number or null` - Example: + 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. - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `max_uses: optional number or null` - 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. + Maximum number of times the tool can be used in the API request. - For example, if the input `messages` were: + - `response_inclusion: optional "full" or "excluded"` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + 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. - Then the response `content` might be: + - `"full"` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `"excluded"` - - `TextBlock object { citations, text, type }` + - `strict: optional boolean` - - `citations: array of TextCitation or null` + When true, guarantees schema validation on tool names and inputs - Citations supporting the text block. + - `use_cache: optional boolean` - 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`. + 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. - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` - - `cited_text: string` + - `name: "tool_search_tool_bm25"` - - `document_index: number` + Name of the tool. - - `document_title: string or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `end_char_index: number` + - `"tool_search_tool_bm25"` - - `file_id: string or null` + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` - - `start_char_index: number` + - `"tool_search_tool_bm25_20251119"` - - `type: "char_location"` + - `"tool_search_tool_bm25"` - - `"char_location"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"direct"` - - `cited_text: string` + - `"code_execution_20250825"` - - `document_index: number` + - `"code_execution_20260120"` - - `document_title: string or null` + - `"code_execution_20260521"` - - `end_page_number: number` + - `cache_control: optional CacheControlEphemeral or null` - - `file_id: string or null` + Create a cache control breakpoint at this content block. - - `start_page_number: number` + - `defer_loading: optional boolean` - - `type: "page_location"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"page_location"` + - `strict: optional boolean` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + When true, guarantees schema validation on tool names and inputs - - `cited_text: string` + - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` - The full text of the cited block range, concatenated. + - `name: "tool_search_tool_regex"` - 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. + Name of the tool. - - `document_index: number` + This is how the tool will be called by the model and in `tool_use` blocks. - - `document_title: string or null` + - `"tool_search_tool_regex"` - - `end_block_index: number` + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"tool_search_tool_regex_20251119"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"tool_search_tool_regex"` - - `file_id: string or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `start_block_index: number` + - `"direct"` - 0-based index of the first cited block in the source's `content` array. + - `"code_execution_20250825"` - - `type: "content_block_location"` + - `"code_execution_20260120"` - - `"content_block_location"` + - `"code_execution_20260521"` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `cache_control: optional CacheControlEphemeral or null` - - `cited_text: string` + Create a cache control breakpoint at this content block. - - `encrypted_index: string` + - `defer_loading: optional boolean` - - `title: string or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "web_search_result_location"` + - `strict: optional boolean` - - `"web_search_result_location"` + When true, guarantees schema validation on tool names and inputs - - `url: string` +### Message Create Params Container - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` +- `MessageCreateParamsContainer = ContainerParams or string` - - `cited_text: string` + Container identifier for reuse across requests. - The full text of the cited block range, concatenated. + - `ContainerParams object { id, skills }` - 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. + Container parameters with skills to be loaded. - - `end_block_index: number` + - `id: optional string or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Container id - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `skills: optional array of SkillParams or null` - - `search_result_index: number` + List of skills to load in the container - 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. + - `skill_id: string` - Counted separately from `document_index`; server-side web search results are not included in this count. + Skill ID - - `source: string` + - `type: "anthropic" or "custom"` - - `start_block_index: number` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - 0-based index of the first cited block in the source's `content` array. + - `"anthropic"` - - `title: string or null` + - `"custom"` - - `type: "search_result_location"` + - `version: optional string` - - `"search_result_location"` + Skill version or 'latest' for most recent version - - `text: string` + - `string` - - `type: "text"` +### Message Delta Usage - - `"text"` +- `MessageDeltaUsage object { cache_creation_input_tokens, cache_read_input_tokens, input_tokens, 3 more }` - - `ThinkingBlock object { signature, thinking, type }` + - `cache_creation_input_tokens: number or null` - - `signature: string` + The cumulative number of input tokens used to create the cache entry. - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `cache_read_input_tokens: number or null` - 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. + The cumulative number of input tokens read from the cache. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `input_tokens: number or null` - - `thinking: string` + The cumulative number of input tokens which were used. - The text of Claude's thinking process for this block. + - `output_tokens: number` - - `type: "thinking"` + The cumulative number of output tokens which were used. - - `"thinking"` + - `output_tokens_details: OutputTokensDetails or null` - - `RedactedThinkingBlock object { data, type }` + Breakdown of output tokens by category. - - `data: string` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - 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. + - `thinking_tokens: number` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `type: "redacted_thinking"` + - `server_tool_use: ServerToolUsage or null` - - `"redacted_thinking"` + The number of server tool requests. - - `ToolUseBlock object { id, caller, input, 2 more }` + - `web_fetch_requests: number` - - `id: string` + The number of web fetch tool requests. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `web_search_requests: number` - Tool invocation directly from the model. + The number of web search tool requests. - - `DirectCaller object { type }` +### Message Param - Tool invocation directly from the model. +- `MessageParam object { content, role }` - - `type: "direct"` + - `content: string or array of ContentBlockParam` - - `"direct"` + - `string` - - `ServerToolCaller object { tool_id, type }` + - `array of ContentBlockParam` - Tool invocation generated by a server-side tool. + - `TextBlockParam object { text, type, cache_control, citations }` - - `tool_id: string` + - `text: string` - - `type: "code_execution_20250825"` + - `type: "text"` - - `"code_execution_20250825"` + - `"text"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `tool_id: string` + Create a cache control breakpoint at this content block. - - `type: "code_execution_20260120"` + - `type: "ephemeral"` - - `"code_execution_20260120"` + - `"ephemeral"` - - `input: map[unknown]` + - `ttl: optional "5m" or "1h"` - - `name: string` + The time-to-live for the cache control breakpoint. - - `type: "tool_use"` + This may be one the following values: - - `"tool_use"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `ServerToolUseBlock object { id, caller, input, 2 more }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `id: string` + - `"5m"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"1h"` - Tool invocation directly from the model. + - `citations: optional array of TextCitationParam or null` - - `DirectCaller object { type }` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - Tool invocation directly from the model. + - `cited_text: string` - - `ServerToolCaller object { tool_id, type }` + - `document_index: number` - Tool invocation generated by a server-side tool. + - `document_title: string or null` - - `ServerToolCaller20260120 object { tool_id, type }` + - `end_char_index: number` - - `input: map[unknown]` + - `start_char_index: number` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `type: "char_location"` - - `"web_search"` + - `"char_location"` - - `"web_fetch"` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"code_execution"` + - `cited_text: string` - - `"bash_code_execution"` + - `document_index: number` - - `"text_editor_code_execution"` + - `document_title: string or null` - - `"tool_search_tool_regex"` + - `end_page_number: number` - - `"tool_search_tool_bm25"` + - `start_page_number: number` - - `type: "server_tool_use"` + - `type: "page_location"` - - `"server_tool_use"` + - `"page_location"` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `cited_text: string` - Tool invocation directly from the model. + The full text of the cited block range, concatenated. - - `DirectCaller object { type }` + 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. - Tool invocation directly from the model. + - `document_index: number` - - `ServerToolCaller object { tool_id, type }` + - `document_title: string or null` - Tool invocation generated by a server-side tool. + - `end_block_index: number` - - `ServerToolCaller20260120 object { tool_id, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `content: WebSearchToolResultBlockContent` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `WebSearchToolResultError object { error_code, type }` + - `start_block_index: number` - - `error_code: WebSearchToolResultErrorCode` + 0-based index of the first cited block in the source's `content` array. - - `"invalid_tool_input"` + - `type: "content_block_location"` - - `"unavailable"` + - `"content_block_location"` - - `"max_uses_exceeded"` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `"too_many_requests"` + - `cited_text: string` - - `"query_too_long"` + - `encrypted_index: string` - - `"request_too_large"` + - `title: string or null` - - `type: "web_search_tool_result_error"` + - `type: "web_search_result_location"` - - `"web_search_tool_result_error"` + - `"web_search_result_location"` - - `array of WebSearchResultBlock` + - `url: string` - - `encrypted_content: string` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `page_age: string or null` + - `cited_text: string` - - `title: string` + The full text of the cited block range, concatenated. - - `type: "web_search_result"` + 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. - - `"web_search_result"` + - `end_block_index: number` - - `url: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `tool_use_id: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "web_search_tool_result"` + - `search_result_index: number` - - `"web_search_tool_result"` + 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. - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `source: string` - Tool invocation directly from the model. + - `start_block_index: number` - - `DirectCaller object { type }` + 0-based index of the first cited block in the source's `content` array. - Tool invocation directly from the model. + - `title: string or null` - - `ServerToolCaller object { tool_id, type }` + - `type: "search_result_location"` - Tool invocation generated by a server-side tool. + - `"search_result_location"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `Base64ImageSource object { data, media_type, type }` - - `error_code: WebFetchToolResultErrorCode` + - `data: string` - - `"invalid_tool_input"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"url_too_long"` + - `"image/jpeg"` - - `"url_not_allowed"` + - `"image/png"` - - `"url_not_in_prior_context"` + - `"image/gif"` - - `"url_not_accessible"` + - `"image/webp"` - - `"unsupported_content_type"` + - `type: "base64"` - - `"too_many_requests"` + - `"base64"` - - `"max_uses_exceeded"` + - `URLImageSource object { type, url }` - - `"unavailable"` + - `type: "url"` - - `type: "web_fetch_tool_result_error"` + - `"url"` - - `"web_fetch_tool_result_error"` + - `url: string` - - `WebFetchBlock object { content, retrieved_at, type, url }` + - `FileImageSource object { file_id, type }` - - `content: DocumentBlock` + - `file_id: string` - - `citations: CitationsConfig or null` + - `type: "file"` - Citation configuration for the document + - `"file"` - - `enabled: boolean` + - `type: "image"` - - `source: Base64PDFSource or PlainTextSource` + - `"image"` - - `Base64PDFSource object { data, media_type, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `data: string` + Create a cache control breakpoint at this content block. - - `media_type: "application/pdf"` + - `transformations: optional ImageTransformationsParam or null` - - `"application/pdf"` + 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. - - `type: "base64"` + - `oversized_image: optional "downsize" or "error"` - - `"base64"` + 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. - - `PlainTextSource object { data, media_type, type }` + - `"downsize"` - - `data: string` + - `"error"` - - `media_type: "text/plain"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `"text/plain"` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `type: "text"` + - `Base64PDFSource object { data, media_type, type }` - - `"text"` + - `data: string` - - `title: string or null` + - `media_type: "application/pdf"` - The title of the document + - `"application/pdf"` - - `type: "document"` + - `type: "base64"` - - `"document"` + - `"base64"` - - `retrieved_at: string or null` + - `PlainTextSource object { data, media_type, type }` - ISO 8601 timestamp when the content was retrieved + - `data: string` - - `type: "web_fetch_result"` + - `media_type: "text/plain"` - - `"web_fetch_result"` + - `"text/plain"` - - `url: string` + - `type: "text"` - Fetched content URL + - `"text"` - - `tool_use_id: string` + - `ContentBlockSource object { content, type }` - - `type: "web_fetch_tool_result"` + - `content: string or array of ContentBlockSourceContent` - - `"web_fetch_tool_result"` + - `string` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `content: CodeExecutionToolResultBlockContent` + - `TextBlockParam object { text, type, cache_control, citations }` - Code execution result with encrypted stdout for PFC + web_search results. + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `CodeExecutionToolResultError object { error_code, type }` + - `type: "content"` - - `error_code: CodeExecutionToolResultErrorCode` + - `"content"` - - `"invalid_tool_input"` + - `URLPDFSource object { type, url }` - - `"unavailable"` + - `type: "url"` - - `"too_many_requests"` + - `"url"` - - `"execution_time_exceeded"` + - `url: string` - - `type: "code_execution_tool_result_error"` + - `FileDocumentSource object { file_id, type }` - - `"code_execution_tool_result_error"` + - `file_id: string` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `type: "file"` - - `content: array of CodeExecutionOutputBlock` + - `"file"` - - `file_id: string` + - `type: "document"` - - `type: "code_execution_output"` + - `"document"` - - `"code_execution_output"` + - `cache_control: optional CacheControlEphemeral or null` - - `return_code: number` + Create a cache control breakpoint at this content block. - - `stderr: string` + - `citations: optional CitationsConfigParam or null` - - `stdout: string` + - `enabled: optional boolean` - - `type: "code_execution_result"` + - `context: optional string or null` - - `"code_execution_result"` + - `title: optional string or null` - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `SearchResultBlockParam object { content, source, title, 3 more }` - Code execution result with encrypted stdout for PFC + web_search results. + - `content: array of TextBlockParam` - - `content: array of CodeExecutionOutputBlock` + - `text: string` - - `file_id: string` + - `type: "text"` - - `type: "code_execution_output"` + - `cache_control: optional CacheControlEphemeral or null` - - `encrypted_stdout: string` + Create a cache control breakpoint at this content block. - - `return_code: number` + - `citations: optional array of TextCitationParam or null` - - `stderr: string` + - `source: string` - - `type: "encrypted_code_execution_result"` + - `title: string` - - `"encrypted_code_execution_result"` + - `type: "search_result"` - - `tool_use_id: string` + - `"search_result"` - - `type: "code_execution_tool_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_tool_result"` + Create a cache control breakpoint at this content block. - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `citations: optional CitationsConfigParam` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `ThinkingBlockParam object { signature, thinking, type }` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `signature: string` - - `error_code: BashCodeExecutionToolResultErrorCode` + 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. - - `"invalid_tool_input"` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - - `"unavailable"` + - `thinking: string` - - `"too_many_requests"` + The `thinking` text of this block as returned by the API. - - `"execution_time_exceeded"` + - `type: "thinking"` - - `"output_file_too_large"` + - `"thinking"` - - `type: "bash_code_execution_tool_result_error"` + - `RedactedThinkingBlockParam object { data, type }` - - `"bash_code_execution_tool_result_error"` + - `data: string` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + 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. - - `content: array of BashCodeExecutionOutputBlock` + - `type: "redacted_thinking"` - - `file_id: string` + - `"redacted_thinking"` - - `type: "bash_code_execution_output"` + - `ToolUseBlockParam object { id, input, name, 4 more }` - - `"bash_code_execution_output"` + - `id: string` - - `return_code: number` + - `input: map[unknown]` - - `stderr: string` + - `name: string` - - `stdout: string` + - `type: "tool_use"` - - `type: "bash_code_execution_result"` + - `"tool_use"` - - `"bash_code_execution_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `tool_use_id: string` + Create a cache control breakpoint at this content block. - - `type: "bash_code_execution_tool_result"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"bash_code_execution_tool_result"` + Tool invocation directly from the model. - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `DirectCaller object { type }` - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + Tool invocation directly from the model. - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `type: "direct"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `"direct"` - - `"invalid_tool_input"` + - `ServerToolCaller object { tool_id, type }` - - `"unavailable"` + Tool invocation generated by a server-side tool. - - `"too_many_requests"` + - `tool_id: string` - - `"execution_time_exceeded"` + - `type: "code_execution_20250825"` - - `"file_not_found"` + - `"code_execution_20250825"` - - `error_message: string or null` + - `ServerToolCaller20260120 object { tool_id, type }` - - `type: "text_editor_code_execution_tool_result_error"` + - `tool_id: string` - - `"text_editor_code_execution_tool_result_error"` + - `type: "code_execution_20260120"` - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `"code_execution_20260120"` - - `content: string` + - `toolset_name: optional string or null` - - `file_type: "text" or "image" or "pdf"` + For a toolset member tool_use, the toolset family this member belongs to. - - `"text"` + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `"image"` + - `tool_use_id: string` - - `"pdf"` + - `type: "tool_result"` - - `num_lines: number or null` + - `"tool_result"` - - `start_line: number or null` + - `cache_control: optional CacheControlEphemeral or null` - - `total_lines: number or null` + Create a cache control breakpoint at this content block. - - `type: "text_editor_code_execution_view_result"` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `"text_editor_code_execution_view_result"` + - `string` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `is_file_update: boolean` + - `TextBlockParam object { text, type, cache_control, citations }` - - `type: "text_editor_code_execution_create_result"` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `"text_editor_code_execution_create_result"` + - `SearchResultBlockParam object { content, source, title, 3 more }` - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `lines: array of string or null` + - `ToolReferenceBlockParam object { tool_name, type, cache_control }` - - `new_lines: number or null` + Tool reference block that can be included in tool_result content. - - `new_start: number or null` + - `tool_name: string` - - `old_lines: number or null` + - `type: "tool_reference"` - - `old_start: number or null` + - `"tool_reference"` - - `type: "text_editor_code_execution_str_replace_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `"text_editor_code_execution_str_replace_result"` + Create a cache control breakpoint at this content block. - - `tool_use_id: string` + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `type: "text_editor_code_execution_tool_result"` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - - `"text_editor_code_execution_tool_result"` + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + - `tabs: array of BrowserStateTabEntry` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + 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`. - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `tab_id: string` - - `error_code: ToolSearchToolResultErrorCode` + The caller-assigned identifier for this tab, unique within the inventory. - - `"invalid_tool_input"` + - `title: string` - - `"unavailable"` + The title of the page the tab is showing. May be empty. - - `"too_many_requests"` + - `url: string` - - `"execution_time_exceeded"` + The URL of the page the tab is showing. May be empty. - - `error_message: string or null` + - `active: optional boolean` - - `type: "tool_search_tool_result_error"` + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `"tool_search_tool_result_error"` + - `type: "browser_state"` - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `"browser_state"` - - `tool_references: array of ToolReferenceBlock` + - `cache_control: optional CacheControlEphemeral or null` - - `tool_name: string` + Create a cache control breakpoint at this content block. - - `type: "tool_reference"` + - `state_changes: optional array of BrowserStateChange or null` - - `"tool_reference"` + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `type: "tool_search_tool_search_result"` + - `BrowserStateChangeTabOpened object { tab_id, type }` - - `"tool_search_tool_search_result"` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `tool_use_id: string` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `type: "tool_search_tool_result"` + - `tab_id: string` - - `"tool_search_tool_result"` + The `tab_id` of the opened tab, present in `tabs`. - - `ContainerUploadBlock object { file_id, type }` + - `type: "tab_opened"` - Response model for a file uploaded to the container. + - `"tab_opened"` - - `file_id: string` + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` - - `type: "container_upload"` + A file download that started during this call. - - `"container_upload"` + - `download_id: string` - - `model: Model` + The caller-assigned identifier for this download, stable across the state changes reporting it. - The model that will complete your prompt. + - `type: "download_started"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"download_started"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `url: string` - The model that will complete your prompt. + The final post-redirect URL the download was served from. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `"claude-sonnet-5"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - High-performance model for coding and agents + - `download_id: string` - - `"claude-fable-5"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Next generation of intelligence for the hardest knowledge work and coding problems + - `type: "download_completed"` - - `"claude-mythos-5"` + - `"download_completed"` - Most capable model for cybersecurity and biology research + - `url: string` - - `"claude-opus-5"` + The final post-redirect URL the download was served from. - Powerful intelligence for long-running agents and coding + - `path: optional string or null` - - `"claude-opus-4-8"` + 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. - Powerful intelligence for long-running agents and coding + - `size_bytes: optional number or null` - - `"claude-opus-4-7"` + The completed download's size. - Powerful intelligence for long-running agents and coding + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `"claude-mythos-preview"` + A file download that failed — or was cancelled — during this call. - New class of intelligence, strongest in coding and cybersecurity + - `download_id: string` - - `"claude-opus-4-6"` + The caller-assigned identifier for this download, stable across the state changes reporting it. - Powerful intelligence for long-running agents and coding + - `type: "download_failed"` - - `"claude-sonnet-4-6"` + - `"download_failed"` - Best combination of speed and intelligence + - `url: string` - - `"claude-haiku-4-5"` + The final post-redirect URL the download was served from. - Fastest model with near-frontier intelligence + - `error: optional string or null` - - `"claude-haiku-4-5-20251001"` + The failure or cancellation detail, when known. - Fastest model with near-frontier intelligence + - `is_error: optional boolean` - - `"claude-opus-4-5"` + - `toolset_name: optional string or null` - Powerful intelligence for long-running agents and coding + For a toolset member tool_result, the toolset family of the paired tool_use. - - `"claude-opus-4-5-20251101"` + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - Powerful intelligence for long-running agents and coding + - `id: string` - - `"claude-sonnet-4-5"` + - `input: map[unknown]` - High-performance model for agents and coding + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `"claude-sonnet-4-5-20250929"` + - `"web_search"` - High-performance model for agents and coding + - `"web_fetch"` - - `string` + - `"code_execution"` - - `role: "assistant"` + - `"bash_code_execution"` - Conversational role of the generated message. + - `"text_editor_code_execution"` - This will always be `"assistant"`. + - `"tool_search_tool_regex"` - - `"assistant"` + - `"tool_search_tool_bm25"` - - `stop_details: RefusalStopDetails or null` + - `type: "server_tool_use"` - Structured information about a refusal. + - `"server_tool_use"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `cache_control: optional CacheControlEphemeral or null` - The policy category that triggered a refusal. + Create a cache control breakpoint at this content block. - - `"cyber"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + Tool invocation directly from the model. - - `"bio"` + - `DirectCaller object { type }` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + Tool invocation directly from the model. - - `"frontier_llm"` + - `ServerToolCaller object { tool_id, type }` - 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. + Tool invocation generated by a server-side tool. - - `"reasoning_extraction"` + - `ServerToolCaller20260120 object { tool_id, type }` - 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). + - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `"general_harms"` + - `content: WebSearchToolResultBlockParamContent` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` - - `explanation: string or null` + - `encrypted_content: string` - Human-readable explanation of the refusal. + - `title: string` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `type: "web_search_result"` - - `type: "refusal"` + - `"web_search_result"` - - `"refusal"` + - `url: string` - - `stop_reason: StopReason or null` + - `page_age: optional string or null` - The reason that we stopped. + - `WebSearchToolRequestError object { error_code, type }` - This may be one the following values: + - `error_code: WebSearchToolResultErrorCode` - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `"invalid_tool_input"` - 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. + - `"unavailable"` - - `"end_turn"` + - `"max_uses_exceeded"` - - `"max_tokens"` + - `"too_many_requests"` - - `"stop_sequence"` + - `"query_too_long"` - - `"tool_use"` + - `"request_too_large"` - - `"pause_turn"` + - `type: "web_search_tool_result_error"` - - `"refusal"` + - `"web_search_tool_result_error"` - - `"model_context_window_exceeded"` + - `tool_use_id: string` - - `stop_sequence: string or null` + - `type: "web_search_tool_result"` - Which custom stop sequence was generated, if any. + - `"web_search_tool_result"` - This value will be a non-null string if one of your custom stop sequences was generated. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "message"` + Create a cache control breakpoint at this content block. - Object type. + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - For Messages, this is always `"message"`. + Tool invocation directly from the model. - - `"message"` + - `DirectCaller object { type }` - - `usage: Usage` + Tool invocation directly from the model. - Billing and rate-limit usage. + - `ServerToolCaller object { tool_id, type }` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + Tool invocation generated by a server-side tool. - 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. + - `ServerToolCaller20260120 object { tool_id, type }` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` - - `cache_creation: CacheCreation or null` + - `WebFetchToolResultErrorBlockParam object { error_code, type }` - Breakdown of cached tokens by TTL + - `error_code: WebFetchToolResultErrorCode` - - `ephemeral_1h_input_tokens: number` + - `"invalid_tool_input"` - The number of input tokens used to create the 1 hour cache entry. + - `"url_too_long"` - - `ephemeral_5m_input_tokens: number` + - `"url_not_allowed"` - The number of input tokens used to create the 5 minute cache entry. + - `"url_not_in_prior_context"` - - `cache_creation_input_tokens: number or null` + - `"url_not_accessible"` - The number of input tokens used to create the cache entry. + - `"unsupported_content_type"` - - `cache_read_input_tokens: number or null` + - `"too_many_requests"` - The number of input tokens read from the cache. + - `"max_uses_exceeded"` - - `inference_geo: string or null` + - `"unavailable"` - The geographic region where inference was performed for this request. + - `type: "web_fetch_tool_result_error"` - - `input_tokens: number` + - `"web_fetch_tool_result_error"` - The number of input tokens which were used. + - `WebFetchBlockParam object { content, type, url, retrieved_at }` - - `output_tokens: number` + - `content: DocumentBlockParam` - The number of output tokens which were used. + - `type: "web_fetch_result"` - - `output_tokens_details: OutputTokensDetails or null` + - `"web_fetch_result"` - Breakdown of output tokens by category. + - `url: string` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + Fetched content URL - - `thinking_tokens: number` + - `retrieved_at: optional string or null` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + ISO 8601 timestamp when the content was retrieved - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `tool_use_id: string` - - `server_tool_use: ServerToolUsage or null` + - `type: "web_fetch_tool_result"` - The number of server tool requests. + - `"web_fetch_tool_result"` - - `web_fetch_requests: number` + - `cache_control: optional CacheControlEphemeral or null` - The number of web fetch tool requests. + Create a cache control breakpoint at this content block. - - `web_search_requests: number` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - The number of web search tool requests. + Tool invocation directly from the model. - - `service_tier: "standard" or "priority" or "batch" or null` + - `DirectCaller object { type }` - If the request used the priority, standard, or batch tier. + Tool invocation directly from the model. - - `"standard"` + - `ServerToolCaller object { tool_id, type }` - - `"priority"` + Tool invocation generated by a server-side tool. - - `"batch"` + - `ServerToolCaller20260120 object { tool_id, type }` -### Message Count Tokens Tool + - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` -- `MessageCountTokensTool = Tool or ToolBash20250124 or CodeExecutionTool20250522 or 16 more` + - `content: CodeExecutionToolResultBlockParamContent` - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + Code execution result with encrypted stdout for PFC + web_search results. - - `Tool object { input_schema, name, allowed_callers, 7 more }` + - `CodeExecutionToolResultErrorParam object { error_code, type }` - - `input_schema: object { type, properties, required }` + - `error_code: CodeExecutionToolResultErrorCode` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + - `"invalid_tool_input"` - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `"unavailable"` - - `type: "object"` + - `"too_many_requests"` - - `"object"` + - `"execution_time_exceeded"` - - `properties: optional map[unknown] or null` + - `type: "code_execution_tool_result_error"` - - `required: optional array of string or null` + - `"code_execution_tool_result_error"` - - `name: string` + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - Name of the tool. + - `content: array of CodeExecutionOutputBlockParam` - This is how the tool will be called by the model and in `tool_use` blocks. + - `file_id: string` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "code_execution_output"` - - `"direct"` + - `"code_execution_output"` - - `"code_execution_20250825"` + - `return_code: number` - - `"code_execution_20260120"` + - `stderr: string` - - `"code_execution_20260521"` + - `stdout: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "code_execution_result"` - Create a cache control breakpoint at this content block. + - `"code_execution_result"` - - `type: "ephemeral"` + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - - `"ephemeral"` + Code execution result with encrypted stdout for PFC + web_search results. - - `ttl: optional "5m" or "1h"` + - `content: array of CodeExecutionOutputBlockParam` - The time-to-live for the cache control breakpoint. + - `file_id: string` - This may be one the following values: + - `type: "code_execution_output"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `encrypted_stdout: string` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `return_code: number` - - `"5m"` + - `stderr: string` - - `"1h"` + - `type: "encrypted_code_execution_result"` - - `defer_loading: optional boolean` + - `"encrypted_code_execution_result"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `tool_use_id: string` - - `description: optional string` + - `type: "code_execution_tool_result"` - Description of what this tool does. + - `"code_execution_tool_result"` - 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. + - `cache_control: optional CacheControlEphemeral or null` - - `eager_input_streaming: optional boolean or null` + Create a cache control breakpoint at this content block. - 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. + - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `input_examples: optional array of map[unknown]` + - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` - - `strict: optional boolean` + - `BashCodeExecutionToolResultErrorParam object { error_code, type }` - When true, guarantees schema validation on tool names and inputs + - `error_code: BashCodeExecutionToolResultErrorCode` - - `type: optional "custom" or null` + - `"invalid_tool_input"` - - `"custom"` + - `"unavailable"` - - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` + - `"too_many_requests"` - - `name: "bash"` + - `"execution_time_exceeded"` - Name of the tool. + - `"output_file_too_large"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "bash_code_execution_tool_result_error"` - - `"bash"` + - `"bash_code_execution_tool_result_error"` - - `type: "bash_20250124"` + - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - - `"bash_20250124"` + - `content: array of BashCodeExecutionOutputBlockParam` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `file_id: string` - - `"direct"` + - `type: "bash_code_execution_output"` - - `"code_execution_20250825"` + - `"bash_code_execution_output"` - - `"code_execution_20260120"` + - `return_code: number` - - `"code_execution_20260521"` + - `stderr: string` - - `cache_control: optional CacheControlEphemeral or null` + - `stdout: string` - Create a cache control breakpoint at this content block. + - `type: "bash_code_execution_result"` - - `defer_loading: optional boolean` + - `"bash_code_execution_result"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `tool_use_id: string` - - `input_examples: optional array of map[unknown]` + - `type: "bash_code_execution_tool_result"` - - `strict: optional boolean` + - `"bash_code_execution_tool_result"` - When true, guarantees schema validation on tool names and inputs + - `cache_control: optional CacheControlEphemeral or null` - - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + Create a cache control breakpoint at this content block. - - `name: "code_execution"` + - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - Name of the tool. + - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` - This is how the tool will be called by the model and in `tool_use` blocks. + - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `"code_execution"` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `type: "code_execution_20250522"` + - `"invalid_tool_input"` - - `"code_execution_20250522"` + - `"unavailable"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"too_many_requests"` - - `"direct"` + - `"execution_time_exceeded"` - - `"code_execution_20250825"` + - `"file_not_found"` - - `"code_execution_20260120"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"code_execution_20260521"` + - `"text_editor_code_execution_tool_result_error"` - - `cache_control: optional CacheControlEphemeral or null` + - `error_message: optional string or null` - Create a cache control breakpoint at this content block. + - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `defer_loading: optional boolean` + - `content: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `file_type: "text" or "image" or "pdf"` - - `strict: optional boolean` + - `"text"` - When true, guarantees schema validation on tool names and inputs + - `"image"` - - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + - `"pdf"` - - `name: "code_execution"` + - `type: "text_editor_code_execution_view_result"` - Name of the tool. + - `"text_editor_code_execution_view_result"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `num_lines: optional number or null` - - `"code_execution"` + - `start_line: optional number or null` - - `type: "code_execution_20250825"` + - `total_lines: optional number or null` - - `"code_execution_20250825"` + - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `is_file_update: boolean` - - `"direct"` + - `type: "text_editor_code_execution_create_result"` - - `"code_execution_20250825"` + - `"text_editor_code_execution_create_result"` - - `"code_execution_20260120"` + - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `"code_execution_20260521"` + - `type: "text_editor_code_execution_str_replace_result"` - - `cache_control: optional CacheControlEphemeral or null` + - `"text_editor_code_execution_str_replace_result"` - Create a cache control breakpoint at this content block. + - `lines: optional array of string or null` - - `defer_loading: optional boolean` + - `new_lines: optional number or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `new_start: optional number or null` - - `strict: optional boolean` + - `old_lines: optional number or null` - When true, guarantees schema validation on tool names and inputs + - `old_start: optional number or null` - - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + - `tool_use_id: string` - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `type: "text_editor_code_execution_tool_result"` - - `name: "code_execution"` + - `"text_editor_code_execution_tool_result"` - Name of the tool. + - `cache_control: optional CacheControlEphemeral or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Create a cache control breakpoint at this content block. - - `"code_execution"` + - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `type: "code_execution_20260120"` + - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` - - `"code_execution_20260120"` + - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `error_code: ToolSearchToolResultErrorCode` - - `"direct"` + - `"invalid_tool_input"` - - `"code_execution_20250825"` + - `"unavailable"` - - `"code_execution_20260120"` + - `"too_many_requests"` - - `"code_execution_20260521"` + - `"execution_time_exceeded"` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "tool_search_tool_result_error"` - Create a cache control breakpoint at this content block. + - `"tool_search_tool_result_error"` - - `defer_loading: optional boolean` + - `error_message: optional string or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` - - `strict: optional boolean` + - `tool_references: array of ToolReferenceBlockParam` - When true, guarantees schema validation on tool names and inputs + - `tool_name: string` - - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + - `type: "tool_reference"` - Code execution tool with REPL state persistence. + - `cache_control: optional CacheControlEphemeral or null` - - `name: "code_execution"` + Create a cache control breakpoint at this content block. - Name of the tool. + - `type: "tool_search_tool_search_result"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"tool_search_tool_search_result"` - - `"code_execution"` + - `tool_use_id: string` - - `type: "code_execution_20260521"` + - `type: "tool_search_tool_result"` - - `"code_execution_20260521"` + - `"tool_search_tool_result"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `cache_control: optional CacheControlEphemeral or null` - - `"direct"` + Create a cache control breakpoint at this content block. - - `"code_execution_20250825"` + - `ContainerUploadBlockParam object { file_id, type, cache_control }` - - `"code_execution_20260120"` + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - - `"code_execution_20260521"` + - `file_id: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "container_upload"` - Create a cache control breakpoint at this content block. + - `"container_upload"` - - `defer_loading: optional boolean` + - `cache_control: optional CacheControlEphemeral or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Create a cache control breakpoint at this content block. - - `strict: optional boolean` + - `role: "user" or "assistant" or "system"` - When true, guarantees schema validation on tool names and inputs + - `"user"` - - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + - `"assistant"` - - `name: "memory"` + - `"system"` - Name of the tool. +### Message Tokens Count - This is how the tool will be called by the model and in `tool_use` blocks. +- `MessageTokensCount object { input_tokens }` - - `"memory"` + - `input_tokens: number` - - `type: "memory_20250818"` + The total number of tokens across the provided list of messages, system prompt, and tools. - - `"memory_20250818"` +### Metadata - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +- `Metadata object { user_id }` - - `"direct"` + - `user_id: optional string or null` - - `"code_execution_20250825"` + An external identifier for the user who is associated with the request. - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` +### Model - - `cache_control: optional CacheControlEphemeral or null` +- `Model = "claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more or string` - Create a cache control breakpoint at this content block. + The model that will complete your prompt. - - `defer_loading: optional boolean` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `input_examples: optional array of map[unknown]` + The model that will complete your prompt. - - `strict: optional boolean` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - When true, guarantees schema validation on tool names and inputs + - `"claude-sonnet-5"` - - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + High-performance model for coding and agents - - `name: "str_replace_editor"` + - `"claude-fable-5"` - Name of the tool. + Next generation of intelligence for the hardest knowledge work and coding problems - This is how the tool will be called by the model and in `tool_use` blocks. + - `"claude-mythos-5"` - - `"str_replace_editor"` + Most capable model for cybersecurity and biology research - - `type: "text_editor_20250124"` + - `"claude-opus-5"` - - `"text_editor_20250124"` + Powerful intelligence for long-running agents and coding - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"claude-opus-4-8"` - - `"direct"` + Powerful intelligence for long-running agents and coding - - `"code_execution_20250825"` + - `"claude-opus-4-7"` - - `"code_execution_20260120"` + Powerful intelligence for long-running agents and coding - - `"code_execution_20260521"` + - `"claude-mythos-preview"` - - `cache_control: optional CacheControlEphemeral or null` + New class of intelligence, strongest in coding and cybersecurity - Create a cache control breakpoint at this content block. + - `"claude-opus-4-6"` - - `defer_loading: optional boolean` + Powerful intelligence for long-running agents and coding - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"claude-sonnet-4-6"` - - `input_examples: optional array of map[unknown]` + Best combination of speed and intelligence - - `strict: optional boolean` + - `"claude-haiku-4-5"` - When true, guarantees schema validation on tool names and inputs + Fastest model with near-frontier intelligence - - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + - `"claude-haiku-4-5-20251001"` - - `name: "str_replace_based_edit_tool"` + Fastest model with near-frontier intelligence - Name of the tool. + - `"claude-opus-4-5"` - This is how the tool will be called by the model and in `tool_use` blocks. + Powerful intelligence for long-running agents and coding - - `"str_replace_based_edit_tool"` + - `"claude-opus-4-5-20251101"` - - `type: "text_editor_20250429"` + Powerful intelligence for long-running agents and coding - - `"text_editor_20250429"` + - `"claude-sonnet-4-5"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + High-performance model for agents and coding - - `"direct"` + - `"claude-sonnet-4-5-20250929"` - - `"code_execution_20250825"` + High-performance model for agents and coding - - `"code_execution_20260120"` + - `string` - - `"code_execution_20260521"` +### Output Config - - `cache_control: optional CacheControlEphemeral or null` +- `OutputConfig object { effort, format }` - Create a cache control breakpoint at this content block. + - `effort: optional "low" or "medium" or "high" or 2 more or null` - - `defer_loading: optional boolean` + All possible effort levels. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"low"` - - `input_examples: optional array of map[unknown]` + - `"medium"` - - `strict: optional boolean` + - `"high"` - When true, guarantees schema validation on tool names and inputs + - `"xhigh"` - - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + - `"max"` - - `name: "str_replace_based_edit_tool"` + - `format: optional JSONOutputFormat or null` - Name of the tool. + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) - This is how the tool will be called by the model and in `tool_use` blocks. + - `schema: map[unknown]` - - `"str_replace_based_edit_tool"` + The JSON schema of the format - - `type: "text_editor_20250728"` + - `type: "json_schema"` - - `"text_editor_20250728"` + - `"json_schema"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +### Output Tokens Details - - `"direct"` +- `OutputTokensDetails object { thinking_tokens }` - - `"code_execution_20250825"` + - `thinking_tokens: number` - - `"code_execution_20260120"` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `"code_execution_20260521"` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `cache_control: optional CacheControlEphemeral or null` +### Plain Text Source - Create a cache control breakpoint at this content block. +- `PlainTextSource object { data, media_type, type }` - - `defer_loading: optional boolean` + - `data: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `media_type: "text/plain"` - - `input_examples: optional array of map[unknown]` + - `"text/plain"` - - `max_characters: optional number or null` + - `type: "text"` - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + - `"text"` - - `strict: optional boolean` +### Raw Content Block Delta - When true, guarantees schema validation on tool names and inputs +- `RawContentBlockDelta = TextDelta or InputJSONDelta or CitationsDelta or 2 more` - - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + - `TextDelta object { text, type }` - - `name: "web_search"` + - `text: string` - Name of the tool. + - `type: "text_delta"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"text_delta"` - - `"web_search"` + - `InputJSONDelta object { partial_json, type }` - - `type: "web_search_20250305"` + - `partial_json: string` - - `"web_search_20250305"` + - `type: "input_json_delta"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"input_json_delta"` - - `"direct"` + - `CitationsDelta object { citation, type }` - - `"code_execution_20250825"` + - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` - - `"code_execution_20260120"` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `"code_execution_20260521"` + - `cited_text: string` - - `allowed_domains: optional array of string or null` + - `document_index: number` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `document_title: string or null` - - `blocked_domains: optional array of string or null` + - `end_char_index: number` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `file_id: string or null` - - `cache_control: optional CacheControlEphemeral or null` + - `start_char_index: number` - Create a cache control breakpoint at this content block. + - `type: "char_location"` - - `defer_loading: optional boolean` + - `"char_location"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `max_uses: optional number or null` + - `cited_text: string` - Maximum number of times the tool can be used in the API request. + - `document_index: number` - - `strict: optional boolean` + - `document_title: string or null` - When true, guarantees schema validation on tool names and inputs + - `end_page_number: number` - - `user_location: optional UserLocation or null` + - `file_id: string or null` - Parameters for the user's location. Used to provide more relevant search results. + - `start_page_number: number` - - `type: "approximate"` + - `type: "page_location"` - - `"approximate"` + - `"page_location"` - - `city: optional string or null` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - The city of the user. + - `cited_text: string` - - `country: optional string or null` + The full text of the cited block range, concatenated. - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + 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. - - `region: optional string or null` + - `document_index: number` - The region of the user. + - `document_title: string or null` - - `timezone: optional string or null` + - `end_block_index: number` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `name: "web_fetch"` + - `file_id: string or null` - Name of the tool. + - `start_block_index: number` - This is how the tool will be called by the model and in `tool_use` blocks. + 0-based index of the first cited block in the source's `content` array. - - `"web_fetch"` + - `type: "content_block_location"` - - `type: "web_fetch_20250910"` + - `"content_block_location"` - - `"web_fetch_20250910"` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `cited_text: string` - - `"direct"` + - `encrypted_index: string` - - `"code_execution_20250825"` + - `title: string or null` - - `"code_execution_20260120"` + - `type: "web_search_result_location"` - - `"code_execution_20260521"` + - `"web_search_result_location"` - - `allowed_domains: optional array of string or null` + - `url: string` - List of domains to allow fetching from + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `blocked_domains: optional array of string or null` + - `cited_text: string` - List of domains to block fetching from + The full text of the cited block range, concatenated. - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `end_block_index: number` - - `citations: optional CitationsConfigParam or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Citations configuration for fetched documents. Citations are disabled by default. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `enabled: optional boolean` + - `search_result_index: number` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Counted separately from `document_index`; server-side web search results are not included in this count. - - `max_content_tokens: optional number or null` + - `source: string` - 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. + - `start_block_index: number` - - `max_uses: optional number or null` + 0-based index of the first cited block in the source's `content` array. - Maximum number of times the tool can be used in the API request. + - `title: string or null` - - `strict: optional boolean` + - `type: "search_result_location"` - When true, guarantees schema validation on tool names and inputs + - `"search_result_location"` - - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + - `type: "citations_delta"` - - `name: "web_search"` + - `"citations_delta"` - Name of the tool. + - `ThinkingDelta object { thinking, type }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `thinking: string` - - `"web_search"` + 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. - - `type: "web_search_20260209"` + - `type: "thinking_delta"` - - `"web_search_20260209"` + - `"thinking_delta"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `SignatureDelta object { signature, type }` - - `"direct"` + - `signature: string` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `type: "signature_delta"` - - `"code_execution_20260521"` + - `"signature_delta"` - - `allowed_domains: optional array of string or null` +### Raw Content Block Delta Event - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. +- `RawContentBlockDeltaEvent object { delta, index, type }` - - `blocked_domains: optional array of string or null` + - `delta: RawContentBlockDelta` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `TextDelta object { text, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `text: string` - Create a cache control breakpoint at this content block. + - `type: "text_delta"` - - `defer_loading: optional boolean` + - `"text_delta"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `InputJSONDelta object { partial_json, type }` - - `max_uses: optional number or null` + - `partial_json: string` - Maximum number of times the tool can be used in the API request. + - `type: "input_json_delta"` - - `strict: optional boolean` + - `"input_json_delta"` - When true, guarantees schema validation on tool names and inputs + - `CitationsDelta object { citation, type }` - - `user_location: optional UserLocation or null` + - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` - Parameters for the user's location. Used to provide more relevant search results. + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` + - `cited_text: string` - - `name: "web_fetch"` + - `document_index: number` - Name of the tool. + - `document_title: string or null` - This is how the tool will be called by the model and in `tool_use` blocks. + - `end_char_index: number` - - `"web_fetch"` + - `file_id: string or null` - - `type: "web_fetch_20260209"` + - `start_char_index: number` - - `"web_fetch_20260209"` + - `type: "char_location"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"char_location"` - - `"direct"` + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"code_execution_20250825"` + - `cited_text: string` - - `"code_execution_20260120"` + - `document_index: number` - - `"code_execution_20260521"` + - `document_title: string or null` - - `allowed_domains: optional array of string or null` + - `end_page_number: number` - List of domains to allow fetching from + - `file_id: string or null` - - `blocked_domains: optional array of string or null` + - `start_page_number: number` - List of domains to block fetching from + - `type: "page_location"` - - `cache_control: optional CacheControlEphemeral or null` + - `"page_location"` - Create a cache control breakpoint at this content block. + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `citations: optional CitationsConfigParam or null` + - `cited_text: string` - Citations configuration for fetched documents. Citations are disabled by default. + The full text of the cited block range, concatenated. - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `document_index: number` - - `max_content_tokens: optional number or null` + - `document_title: string or null` - 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. + - `end_block_index: number` - - `max_uses: optional number or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Maximum number of times the tool can be used in the API request. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `strict: optional boolean` + - `file_id: string or null` - When true, guarantees schema validation on tool names and inputs + - `start_block_index: number` - - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + 0-based index of the first cited block in the source's `content` array. - Web fetch tool with use_cache parameter for bypassing cached content. + - `type: "content_block_location"` - - `name: "web_fetch"` + - `"content_block_location"` - Name of the tool. + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `cited_text: string` - - `"web_fetch"` + - `encrypted_index: string` - - `type: "web_fetch_20260309"` + - `title: string or null` - - `"web_fetch_20260309"` + - `type: "web_search_result_location"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"web_search_result_location"` - - `"direct"` + - `url: string` - - `"code_execution_20250825"` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"code_execution_20260120"` + - `cited_text: string` - - `"code_execution_20260521"` + The full text of the cited block range, concatenated. - - `allowed_domains: optional array of string or null` + 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. - List of domains to allow fetching from + - `end_block_index: number` - - `blocked_domains: optional array of string or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - List of domains to block fetching from + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `cache_control: optional CacheControlEphemeral or null` + - `search_result_index: number` - Create a cache control breakpoint at this content block. + 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. - - `citations: optional CitationsConfigParam or null` + Counted separately from `document_index`; server-side web search results are not included in this count. - Citations configuration for fetched documents. Citations are disabled by default. + - `source: string` - - `defer_loading: optional boolean` + - `start_block_index: number` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 0-based index of the first cited block in the source's `content` array. - - `max_content_tokens: optional number or null` + - `title: string or null` - 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. + - `type: "search_result_location"` - - `max_uses: optional number or null` + - `"search_result_location"` - Maximum number of times the tool can be used in the API request. + - `type: "citations_delta"` - - `strict: optional boolean` + - `"citations_delta"` - When true, guarantees schema validation on tool names and inputs + - `ThinkingDelta object { thinking, type }` - - `use_cache: optional boolean` + - `thinking: string` - 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. + 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. - - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + - `type: "thinking_delta"` - - `name: "web_search"` + - `"thinking_delta"` - Name of the tool. + - `SignatureDelta object { signature, type }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `signature: string` - - `"web_search"` + 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. - - `type: "web_search_20260318"` + - `type: "signature_delta"` - - `"web_search_20260318"` + - `"signature_delta"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `index: number` - - `"direct"` + - `type: "content_block_delta"` - - `"code_execution_20250825"` + - `"content_block_delta"` - - `"code_execution_20260120"` +### Raw Content Block Start Event - - `"code_execution_20260521"` +- `RawContentBlockStartEvent object { content_block, index, type }` - - `allowed_domains: optional array of string or null` + - `content_block: TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + Response model for a file uploaded to the container. - - `blocked_domains: optional array of string or null` + - `TextBlock object { citations, text, type }` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `citations: array of TextCitation or null` - - `cache_control: optional CacheControlEphemeral or null` + Citations supporting the text block. - Create a cache control breakpoint at this content block. + 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`. - - `defer_loading: optional boolean` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `cited_text: string` - - `max_uses: optional number or null` + - `document_index: number` - Maximum number of times the tool can be used in the API request. + - `document_title: string or null` - - `response_inclusion: optional "full" or "excluded"` + - `end_char_index: number` - 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. + - `file_id: string or null` - - `"full"` + - `start_char_index: number` - - `"excluded"` + - `type: "char_location"` - - `strict: optional boolean` + - `"char_location"` - When true, guarantees schema validation on tool names and inputs + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `user_location: optional UserLocation or null` + - `cited_text: string` - Parameters for the user's location. Used to provide more relevant search results. + - `document_index: number` - - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + - `document_title: string or null` - - `name: "web_fetch"` + - `end_page_number: number` - Name of the tool. + - `file_id: string or null` - This is how the tool will be called by the model and in `tool_use` blocks. + - `start_page_number: number` - - `"web_fetch"` + - `type: "page_location"` - - `type: "web_fetch_20260318"` + - `"page_location"` - - `"web_fetch_20260318"` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `cited_text: string` - - `"direct"` + The full text of the cited block range, concatenated. - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `document_index: number` - - `"code_execution_20260521"` + - `document_title: string or null` - - `allowed_domains: optional array of string or null` + - `end_block_index: number` - List of domains to allow fetching from + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `blocked_domains: optional array of string or null` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - List of domains to block fetching from + - `file_id: string or null` - - `cache_control: optional CacheControlEphemeral or null` + - `start_block_index: number` - Create a cache control breakpoint at this content block. + 0-based index of the first cited block in the source's `content` array. - - `citations: optional CitationsConfigParam or null` + - `type: "content_block_location"` - Citations configuration for fetched documents. Citations are disabled by default. + - `"content_block_location"` - - `defer_loading: optional boolean` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `cited_text: string` - - `max_content_tokens: optional number or null` + - `encrypted_index: string` - 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. + - `title: string or null` - - `max_uses: optional number or null` + - `type: "web_search_result_location"` - Maximum number of times the tool can be used in the API request. + - `"web_search_result_location"` - - `response_inclusion: optional "full" or "excluded"` + - `url: string` - 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. + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"full"` + - `cited_text: string` - - `"excluded"` + The full text of the cited block range, concatenated. - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `end_block_index: number` - - `use_cache: optional boolean` + Exclusive 0-based end index of the cited block range in the source's `content` array. - 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. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + - `search_result_index: number` - - `name: "tool_search_tool_bm25"` + 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. - Name of the tool. + Counted separately from `document_index`; server-side web search results are not included in this count. - This is how the tool will be called by the model and in `tool_use` blocks. + - `source: string` - - `"tool_search_tool_bm25"` + - `start_block_index: number` - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + 0-based index of the first cited block in the source's `content` array. - - `"tool_search_tool_bm25_20251119"` + - `title: string or null` - - `"tool_search_tool_bm25"` + - `type: "search_result_location"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"search_result_location"` - - `"direct"` + - `text: string` - - `"code_execution_20250825"` + - `type: "text"` - - `"code_execution_20260120"` + - `"text"` - - `"code_execution_20260521"` + - `ThinkingBlock object { signature, thinking, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `signature: string` - Create a cache control breakpoint at this content block. + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `strict: optional boolean` + - `thinking: string` - When true, guarantees schema validation on tool names and inputs + The text of Claude's thinking process for this block. - - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + - `type: "thinking"` - - `name: "tool_search_tool_regex"` + - `"thinking"` - Name of the tool. + - `RedactedThinkingBlock object { data, type }` - This is how the tool will be called by the model and in `tool_use` blocks. + - `data: string` - - `"tool_search_tool_regex"` + 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. - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"tool_search_tool_regex_20251119"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `"tool_search_tool_regex"` + - `type: "redacted_thinking"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"redacted_thinking"` - - `"direct"` + - `ToolUseBlock object { id, caller, input, 3 more }` - - `"code_execution_20250825"` + - `id: string` - - `"code_execution_20260120"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"code_execution_20260521"` + Tool invocation directly from the model. - - `cache_control: optional CacheControlEphemeral or null` + - `DirectCaller object { type }` - Create a cache control breakpoint at this content block. + Tool invocation directly from the model. - - `defer_loading: optional boolean` + - `type: "direct"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"direct"` - - `strict: optional boolean` + - `ServerToolCaller object { tool_id, type }` - When true, guarantees schema validation on tool names and inputs + Tool invocation generated by a server-side tool. -### Message Delta Usage + - `tool_id: string` -- `MessageDeltaUsage object { cache_creation_input_tokens, cache_read_input_tokens, input_tokens, 3 more }` + - `type: "code_execution_20250825"` - - `cache_creation_input_tokens: number or null` + - `"code_execution_20250825"` - The cumulative number of input tokens used to create the cache entry. + - `ServerToolCaller20260120 object { tool_id, type }` - - `cache_read_input_tokens: number or null` + - `tool_id: string` - The cumulative number of input tokens read from the cache. + - `type: "code_execution_20260120"` - - `input_tokens: number or null` + - `"code_execution_20260120"` - The cumulative number of input tokens which were used. + - `input: map[unknown]` - - `output_tokens: number` + - `name: string` - The cumulative number of output tokens which were used. + - `type: "tool_use"` - - `output_tokens_details: OutputTokensDetails or null` + - `"tool_use"` - Breakdown of output tokens by category. + - `toolset_name: optional string or null` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + For a toolset member tool_use, the toolset family. - - `thinking_tokens: number` + - `ServerToolUseBlock object { id, caller, input, 2 more }` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `id: string` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `server_tool_use: ServerToolUsage or null` + Tool invocation directly from the model. - The number of server tool requests. + - `DirectCaller object { type }` - - `web_fetch_requests: number` + Tool invocation directly from the model. - The number of web fetch tool requests. + - `ServerToolCaller object { tool_id, type }` - - `web_search_requests: number` + Tool invocation generated by a server-side tool. - The number of web search tool requests. + - `ServerToolCaller20260120 object { tool_id, type }` -### Message Param + - `input: map[unknown]` -- `MessageParam object { content, role }` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `content: string or array of ContentBlockParam` + - `"web_search"` - - `string` + - `"web_fetch"` - - `array of ContentBlockParam` + - `"code_execution"` - - `TextBlockParam object { text, type, cache_control, citations }` + - `"bash_code_execution"` - - `text: string` + - `"text_editor_code_execution"` - - `type: "text"` + - `"tool_search_tool_regex"` - - `"text"` + - `"tool_search_tool_bm25"` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "server_tool_use"` - Create a cache control breakpoint at this content block. + - `"server_tool_use"` - - `type: "ephemeral"` + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `"ephemeral"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `ttl: optional "5m" or "1h"` + Tool invocation directly from the model. - The time-to-live for the cache control breakpoint. + - `DirectCaller object { type }` - This may be one the following values: + Tool invocation directly from the model. - - `5m`: 5 minutes - - `1h`: 1 hour + - `ServerToolCaller object { tool_id, type }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Tool invocation generated by a server-side tool. - - `"5m"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"1h"` + - `content: WebSearchToolResultBlockContent` - - `citations: optional array of TextCitationParam or null` + - `WebSearchToolResultError object { error_code, type }` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `error_code: WebSearchToolResultErrorCode` - - `cited_text: string` + - `"invalid_tool_input"` - - `document_index: number` + - `"unavailable"` - - `document_title: string or null` + - `"max_uses_exceeded"` - - `end_char_index: number` + - `"too_many_requests"` - - `start_char_index: number` + - `"query_too_long"` - - `type: "char_location"` + - `"request_too_large"` - - `"char_location"` + - `type: "web_search_tool_result_error"` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"web_search_tool_result_error"` - - `cited_text: string` + - `array of WebSearchResultBlock` - - `document_index: number` + - `encrypted_content: string` - - `document_title: string or null` + - `page_age: string or null` - - `end_page_number: number` + - `title: string` - - `start_page_number: number` + - `type: "web_search_result"` - - `type: "page_location"` + - `"web_search_result"` - - `"page_location"` + - `url: string` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_use_id: string` - - `cited_text: string` + - `type: "web_search_tool_result"` - The full text of the cited block range, concatenated. + - `"web_search_tool_result"` - 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. + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `document_index: number` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `document_title: string or null` + Tool invocation directly from the model. - - `end_block_index: number` + - `DirectCaller object { type }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Tool invocation directly from the model. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `ServerToolCaller object { tool_id, type }` - - `start_block_index: number` + Tool invocation generated by a server-side tool. - 0-based index of the first cited block in the source's `content` array. + - `ServerToolCaller20260120 object { tool_id, type }` - - `type: "content_block_location"` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - - `"content_block_location"` + - `WebFetchToolResultErrorBlock object { error_code, type }` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `error_code: WebFetchToolResultErrorCode` - - `cited_text: string` + - `"invalid_tool_input"` - - `encrypted_index: string` + - `"url_too_long"` - - `title: string or null` + - `"url_not_allowed"` - - `type: "web_search_result_location"` + - `"url_not_in_prior_context"` - - `"web_search_result_location"` + - `"url_not_accessible"` - - `url: string` + - `"unsupported_content_type"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `"too_many_requests"` - - `cited_text: string` + - `"max_uses_exceeded"` - The full text of the cited block range, concatenated. + - `"unavailable"` - 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. + - `type: "web_fetch_tool_result_error"` - - `end_block_index: number` + - `"web_fetch_tool_result_error"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `WebFetchBlock object { content, retrieved_at, type, url }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `content: DocumentBlock` - - `search_result_index: number` + - `citations: CitationsConfig or null` - 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. + Citation configuration for the document - Counted separately from `document_index`; server-side web search results are not included in this count. + - `enabled: boolean` - - `source: string` + - `source: Base64PDFSource or PlainTextSource` - - `start_block_index: number` + - `Base64PDFSource object { data, media_type, type }` - 0-based index of the first cited block in the source's `content` array. + - `data: string` - - `title: string or null` + - `media_type: "application/pdf"` - - `type: "search_result_location"` + - `"application/pdf"` - - `"search_result_location"` + - `type: "base64"` - - `ImageBlockParam object { source, type, cache_control }` + - `"base64"` - - `source: Base64ImageSource or URLImageSource` + - `PlainTextSource object { data, media_type, type }` - - `Base64ImageSource object { data, media_type, type }` + - `data: string` - - `data: string` + - `media_type: "text/plain"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `"text/plain"` - - `"image/jpeg"` + - `type: "text"` - - `"image/png"` + - `"text"` - - `"image/gif"` + - `title: string or null` - - `"image/webp"` + The title of the document - - `type: "base64"` + - `type: "document"` - - `"base64"` + - `"document"` - - `URLImageSource object { type, url }` + - `retrieved_at: string or null` - - `type: "url"` + ISO 8601 timestamp when the content was retrieved - - `"url"` + - `type: "web_fetch_result"` - - `url: string` + - `"web_fetch_result"` - - `type: "image"` + - `url: string` - - `"image"` + Fetched content URL - - `cache_control: optional CacheControlEphemeral or null` + - `tool_use_id: string` - Create a cache control breakpoint at this content block. + - `type: "web_fetch_tool_result"` - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `"web_fetch_tool_result"` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `Base64PDFSource object { data, media_type, type }` + - `content: CodeExecutionToolResultBlockContent` - - `data: string` + Code execution result with encrypted stdout for PFC + web_search results. - - `media_type: "application/pdf"` + - `CodeExecutionToolResultError object { error_code, type }` - - `"application/pdf"` + - `error_code: CodeExecutionToolResultErrorCode` - - `type: "base64"` + - `"invalid_tool_input"` - - `"base64"` + - `"unavailable"` - - `PlainTextSource object { data, media_type, type }` + - `"too_many_requests"` - - `data: string` + - `"execution_time_exceeded"` - - `media_type: "text/plain"` + - `type: "code_execution_tool_result_error"` - - `"text/plain"` + - `"code_execution_tool_result_error"` - - `type: "text"` + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"text"` + - `content: array of CodeExecutionOutputBlock` - - `ContentBlockSource object { content, type }` + - `file_id: string` - - `content: string or array of ContentBlockSourceContent` + - `type: "code_execution_output"` - - `string` + - `"code_execution_output"` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + - `return_code: number` - - `TextBlockParam object { text, type, cache_control, citations }` + - `stderr: string` - - `ImageBlockParam object { source, type, cache_control }` + - `stdout: string` - - `type: "content"` + - `type: "code_execution_result"` - - `"content"` + - `"code_execution_result"` - - `URLPDFSource object { type, url }` + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `type: "url"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"url"` + - `content: array of CodeExecutionOutputBlock` - - `url: string` + - `file_id: string` - - `type: "document"` + - `type: "code_execution_output"` - - `"document"` + - `encrypted_stdout: string` - - `cache_control: optional CacheControlEphemeral or null` + - `return_code: number` - Create a cache control breakpoint at this content block. + - `stderr: string` - - `citations: optional CitationsConfigParam or null` + - `type: "encrypted_code_execution_result"` - - `enabled: optional boolean` + - `"encrypted_code_execution_result"` - - `context: optional string or null` + - `tool_use_id: string` - - `title: optional string or null` + - `type: "code_execution_tool_result"` - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `"code_execution_tool_result"` - - `content: array of TextBlockParam` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `text: string` + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` - - `type: "text"` + - `BashCodeExecutionToolResultError object { error_code, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `error_code: BashCodeExecutionToolResultErrorCode` - Create a cache control breakpoint at this content block. + - `"invalid_tool_input"` - - `citations: optional array of TextCitationParam or null` + - `"unavailable"` - - `source: string` + - `"too_many_requests"` - - `title: string` + - `"execution_time_exceeded"` - - `type: "search_result"` + - `"output_file_too_large"` - - `"search_result"` + - `type: "bash_code_execution_tool_result_error"` - - `cache_control: optional CacheControlEphemeral or null` + - `"bash_code_execution_tool_result_error"` - Create a cache control breakpoint at this content block. + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `citations: optional CitationsConfigParam` + - `content: array of BashCodeExecutionOutputBlock` - - `ThinkingBlockParam object { signature, thinking, type }` + - `file_id: string` - - `signature: string` + - `type: "bash_code_execution_output"` - 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. + - `"bash_code_execution_output"` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `return_code: number` - - `thinking: string` + - `stderr: string` - The `thinking` text of this block as returned by the API. + - `stdout: string` - - `type: "thinking"` + - `type: "bash_code_execution_result"` - - `"thinking"` + - `"bash_code_execution_result"` - - `RedactedThinkingBlockParam object { data, type }` + - `tool_use_id: string` - - `data: string` + - `type: "bash_code_execution_tool_result"` - 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. + - `"bash_code_execution_tool_result"` - - `type: "redacted_thinking"` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"redacted_thinking"` + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `id: string` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `input: map[unknown]` + - `"invalid_tool_input"` - - `name: string` + - `"unavailable"` - - `type: "tool_use"` + - `"too_many_requests"` - - `"tool_use"` + - `"execution_time_exceeded"` - - `cache_control: optional CacheControlEphemeral or null` + - `"file_not_found"` - Create a cache control breakpoint at this content block. + - `error_message: string or null` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `type: "text_editor_code_execution_tool_result_error"` - Tool invocation directly from the model. + - `"text_editor_code_execution_tool_result_error"` - - `DirectCaller object { type }` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - Tool invocation directly from the model. + - `content: string` - - `type: "direct"` + - `file_type: "text" or "image" or "pdf"` - - `"direct"` + - `"text"` - - `ServerToolCaller object { tool_id, type }` + - `"image"` - Tool invocation generated by a server-side tool. + - `"pdf"` - - `tool_id: string` + - `num_lines: number or null` - - `type: "code_execution_20250825"` + - `start_line: number or null` - - `"code_execution_20250825"` + - `total_lines: number or null` - - `ServerToolCaller20260120 object { tool_id, type }` + - `type: "text_editor_code_execution_view_result"` - - `tool_id: string` + - `"text_editor_code_execution_view_result"` - - `type: "code_execution_20260120"` + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `"code_execution_20260120"` + - `is_file_update: boolean` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `type: "text_editor_code_execution_create_result"` - - `tool_use_id: string` + - `"text_editor_code_execution_create_result"` - - `type: "tool_result"` + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `"tool_result"` + - `lines: array of string or null` - - `cache_control: optional CacheControlEphemeral or null` + - `new_lines: number or null` - Create a cache control breakpoint at this content block. + - `new_start: number or null` - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `old_lines: number or null` - - `string` + - `old_start: number or null` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `type: "text_editor_code_execution_str_replace_result"` - - `TextBlockParam object { text, type, cache_control, citations }` + - `"text_editor_code_execution_str_replace_result"` - - `ImageBlockParam object { source, type, cache_control }` + - `tool_use_id: string` - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `type: "text_editor_code_execution_tool_result"` - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `"text_editor_code_execution_tool_result"` - - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - Tool reference block that can be included in tool_result content. + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - - `tool_name: string` + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `type: "tool_reference"` + - `error_code: ToolSearchToolResultErrorCode` - - `"tool_reference"` + - `"invalid_tool_input"` - - `cache_control: optional CacheControlEphemeral or null` + - `"unavailable"` - Create a cache control breakpoint at this content block. + - `"too_many_requests"` - - `is_error: optional boolean` + - `"execution_time_exceeded"` - - `ServerToolUseBlockParam object { id, input, name, 3 more }` + - `error_message: string or null` - - `id: string` + - `type: "tool_search_tool_result_error"` - - `input: map[unknown]` + - `"tool_search_tool_result_error"` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - - `"web_search"` + - `tool_references: array of ToolReferenceBlock` - - `"web_fetch"` + - `tool_name: string` - - `"code_execution"` + - `type: "tool_reference"` - - `"bash_code_execution"` + - `"tool_reference"` - - `"text_editor_code_execution"` + - `type: "tool_search_tool_search_result"` - - `"tool_search_tool_regex"` + - `"tool_search_tool_search_result"` - - `"tool_search_tool_bm25"` + - `tool_use_id: string` - - `type: "server_tool_use"` + - `type: "tool_search_tool_result"` - - `"server_tool_use"` + - `"tool_search_tool_result"` - - `cache_control: optional CacheControlEphemeral or null` + - `ContainerUploadBlock object { file_id, type }` - Create a cache control breakpoint at this content block. + Response model for a file uploaded to the container. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `file_id: string` - Tool invocation directly from the model. + - `type: "container_upload"` - - `DirectCaller object { type }` + - `"container_upload"` - Tool invocation directly from the model. + - `index: number` - - `ServerToolCaller object { tool_id, type }` + - `type: "content_block_start"` - Tool invocation generated by a server-side tool. + - `"content_block_start"` - - `ServerToolCaller20260120 object { tool_id, type }` +### Raw Content Block Stop Event - - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` +- `RawContentBlockStopEvent object { index, type }` - - `content: WebSearchToolResultBlockParamContent` + - `index: number` - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + - `type: "content_block_stop"` - - `encrypted_content: string` + - `"content_block_stop"` - - `title: string` +### Raw Message Delta Event - - `type: "web_search_result"` +- `RawMessageDeltaEvent object { delta, type, usage }` - - `"web_search_result"` + - `delta: object { container, stop_details, stop_reason, stop_sequence }` - - `url: string` + - `container: Container or null` - - `page_age: optional string or null` + Information about the container used in the request (for the code execution tool) - - `WebSearchToolRequestError object { error_code, type }` + - `id: string` - - `error_code: WebSearchToolResultErrorCode` + Identifier for the container used in this request - - `"invalid_tool_input"` + - `expires_at: string` - - `"unavailable"` + The time at which the container will expire. - - `"max_uses_exceeded"` + - `skills: array of ContainerSkill or null` - - `"too_many_requests"` + Skills loaded in the container - - `"query_too_long"` + - `skill_id: string` - - `"request_too_large"` + Skill ID - - `type: "web_search_tool_result_error"` + - `type: "anthropic" or "custom"` - - `"web_search_tool_result_error"` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `tool_use_id: string` + - `"anthropic"` - - `type: "web_search_tool_result"` + - `"custom"` - - `"web_search_tool_result"` + - `version: string` - - `cache_control: optional CacheControlEphemeral or null` + Skill version or 'latest' for most recent version - Create a cache control breakpoint at this content block. + - `stop_details: RefusalStopDetails or null` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + Structured information about a refusal. - Tool invocation directly from the model. + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `DirectCaller object { type }` + The policy category that triggered a refusal. - Tool invocation directly from the model. + - `"cyber"` - - `ServerToolCaller object { tool_id, type }` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - Tool invocation generated by a server-side tool. + - `"bio"` - - `ServerToolCaller20260120 object { tool_id, type }` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `"frontier_llm"` - - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + 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. - - `WebFetchToolResultErrorBlockParam object { error_code, type }` + - `"reasoning_extraction"` - - `error_code: WebFetchToolResultErrorCode` + 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). - - `"invalid_tool_input"` + - `"general_harms"` - - `"url_too_long"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `"url_not_allowed"` + - `explanation: string or null` - - `"url_not_in_prior_context"` + Human-readable explanation of the refusal. - - `"url_not_accessible"` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - - `"unsupported_content_type"` + - `type: "refusal"` - - `"too_many_requests"` + - `"refusal"` - - `"max_uses_exceeded"` + - `stop_reason: StopReason or null` - - `"unavailable"` + - `"end_turn"` - - `type: "web_fetch_tool_result_error"` + - `"max_tokens"` - - `"web_fetch_tool_result_error"` + - `"stop_sequence"` - - `WebFetchBlockParam object { content, type, url, retrieved_at }` + - `"tool_use"` - - `content: DocumentBlockParam` + - `"pause_turn"` - - `type: "web_fetch_result"` + - `"refusal"` - - `"web_fetch_result"` + - `"model_context_window_exceeded"` - - `url: string` + - `stop_sequence: string or null` - Fetched content URL + - `type: "message_delta"` - - `retrieved_at: optional string or null` + - `"message_delta"` - ISO 8601 timestamp when the content was retrieved + - `usage: MessageDeltaUsage` - - `tool_use_id: string` + Billing and rate-limit usage. - - `type: "web_fetch_tool_result"` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - - `"web_fetch_tool_result"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - Create a cache control breakpoint at this content block. + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `cache_creation_input_tokens: number or null` - Tool invocation directly from the model. + The cumulative number of input tokens used to create the cache entry. - - `DirectCaller object { type }` + - `cache_read_input_tokens: number or null` - Tool invocation directly from the model. + The cumulative number of input tokens read from the cache. - - `ServerToolCaller object { tool_id, type }` + - `input_tokens: number or null` - Tool invocation generated by a server-side tool. + The cumulative number of input tokens which were used. - - `ServerToolCaller20260120 object { tool_id, type }` + - `output_tokens: number` - - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + The cumulative number of output tokens which were used. - - `content: CodeExecutionToolResultBlockParamContent` + - `output_tokens_details: OutputTokensDetails or null` - Code execution result with encrypted stdout for PFC + web_search results. + Breakdown of output tokens by category. - - `CodeExecutionToolResultErrorParam object { error_code, type }` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `error_code: CodeExecutionToolResultErrorCode` + - `thinking_tokens: number` - - `"invalid_tool_input"` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `"unavailable"` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `"too_many_requests"` + - `server_tool_use: ServerToolUsage or null` - - `"execution_time_exceeded"` + The number of server tool requests. - - `type: "code_execution_tool_result_error"` + - `web_fetch_requests: number` - - `"code_execution_tool_result_error"` + The number of web fetch tool requests. - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `web_search_requests: number` - - `content: array of CodeExecutionOutputBlockParam` + The number of web search tool requests. - - `file_id: string` +### Raw Message Start Event - - `type: "code_execution_output"` +- `RawMessageStartEvent object { message, type }` - - `"code_execution_output"` + - `message: Message` - - `return_code: number` + - `id: string` - - `stderr: string` + Unique object identifier. - - `stdout: string` + The format and length of IDs may change over time. - - `type: "code_execution_result"` + - `container: Container or null` - - `"code_execution_result"` + Information about the container used in the request (for the code execution tool) - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `id: string` - Code execution result with encrypted stdout for PFC + web_search results. + Identifier for the container used in this request - - `content: array of CodeExecutionOutputBlockParam` + - `expires_at: string` - - `file_id: string` + The time at which the container will expire. - - `type: "code_execution_output"` + - `skills: array of ContainerSkill or null` - - `encrypted_stdout: string` + Skills loaded in the container - - `return_code: number` + - `skill_id: string` - - `stderr: string` + Skill ID - - `type: "encrypted_code_execution_result"` + - `type: "anthropic" or "custom"` - - `"encrypted_code_execution_result"` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `tool_use_id: string` + - `"anthropic"` - - `type: "code_execution_tool_result"` + - `"custom"` - - `"code_execution_tool_result"` + - `version: string` - - `cache_control: optional CacheControlEphemeral or null` + Skill version or 'latest' for most recent version - Create a cache control breakpoint at this content block. + - `content: array of ContentBlock` - - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + Content generated by the model. - - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + This is an array of content blocks, each of which has a `type` that determines its shape. - - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + Example: - - `error_code: BashCodeExecutionToolResultErrorCode` + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `"invalid_tool_input"` + 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. - - `"unavailable"` + For example, if the input `messages` were: - - `"too_many_requests"` + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - - `"execution_time_exceeded"` + Then the response `content` might be: - - `"output_file_too_large"` + ```json + [{"type": "text", "text": "B)"}] + ``` - - `type: "bash_code_execution_tool_result_error"` + - `TextBlock object { citations, text, type }` - - `"bash_code_execution_tool_result_error"` + - `citations: array of TextCitation or null` - - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + Citations supporting the text block. - - `content: array of BashCodeExecutionOutputBlockParam` + 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`. - - `file_id: string` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `type: "bash_code_execution_output"` + - `cited_text: string` - - `"bash_code_execution_output"` + - `document_index: number` - - `return_code: number` + - `document_title: string or null` - - `stderr: string` + - `end_char_index: number` - - `stdout: string` + - `file_id: string or null` - - `type: "bash_code_execution_result"` + - `start_char_index: number` - - `"bash_code_execution_result"` + - `type: "char_location"` - - `tool_use_id: string` + - `"char_location"` - - `type: "bash_code_execution_tool_result"` + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `"bash_code_execution_tool_result"` + - `cited_text: string` - - `cache_control: optional CacheControlEphemeral or null` + - `document_index: number` - Create a cache control breakpoint at this content block. + - `document_title: string or null` - - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `end_page_number: number` - - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + - `file_id: string or null` - - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `start_page_number: number` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `type: "page_location"` - - `"invalid_tool_input"` + - `"page_location"` - - `"unavailable"` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `"too_many_requests"` + - `cited_text: string` - - `"execution_time_exceeded"` + The full text of the cited block range, concatenated. - - `"file_not_found"` + 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. - - `type: "text_editor_code_execution_tool_result_error"` + - `document_index: number` - - `"text_editor_code_execution_tool_result_error"` + - `document_title: string or null` - - `error_message: optional string or null` + - `end_block_index: number` - - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `content: string` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `file_type: "text" or "image" or "pdf"` + - `file_id: string or null` - - `"text"` + - `start_block_index: number` - - `"image"` + 0-based index of the first cited block in the source's `content` array. - - `"pdf"` + - `type: "content_block_location"` - - `type: "text_editor_code_execution_view_result"` + - `"content_block_location"` - - `"text_editor_code_execution_view_result"` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `num_lines: optional number or null` + - `cited_text: string` - - `start_line: optional number or null` + - `encrypted_index: string` - - `total_lines: optional number or null` + - `title: string or null` - - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `type: "web_search_result_location"` - - `is_file_update: boolean` + - `"web_search_result_location"` - - `type: "text_editor_code_execution_create_result"` + - `url: string` - - `"text_editor_code_execution_create_result"` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `cited_text: string` - - `type: "text_editor_code_execution_str_replace_result"` + The full text of the cited block range, concatenated. - - `"text_editor_code_execution_str_replace_result"` + 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. - - `lines: optional array of string or null` + - `end_block_index: number` - - `new_lines: optional number or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `new_start: optional number or null` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `old_lines: optional number or null` + - `search_result_index: number` - - `old_start: optional number or null` + 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. - - `tool_use_id: string` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `type: "text_editor_code_execution_tool_result"` + - `source: string` - - `"text_editor_code_execution_tool_result"` + - `start_block_index: number` - - `cache_control: optional CacheControlEphemeral or null` + 0-based index of the first cited block in the source's `content` array. - Create a cache control breakpoint at this content block. + - `title: string or null` - - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `type: "search_result_location"` - - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + - `"search_result_location"` - - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `text: string` - - `error_code: ToolSearchToolResultErrorCode` + - `type: "text"` - - `"invalid_tool_input"` + - `"text"` - - `"unavailable"` + - `ThinkingBlock object { signature, thinking, type }` - - `"too_many_requests"` + - `signature: string` - - `"execution_time_exceeded"` + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `type: "tool_search_tool_result_error"` + 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. - - `"tool_search_tool_result_error"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `error_message: optional string or null` + - `thinking: string` - - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + The text of Claude's thinking process for this block. - - `tool_references: array of ToolReferenceBlockParam` + - `type: "thinking"` - - `tool_name: string` + - `"thinking"` - - `type: "tool_reference"` + - `RedactedThinkingBlock object { data, type }` - - `cache_control: optional CacheControlEphemeral or null` + - `data: string` - Create a cache control breakpoint at this content block. + 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. - - `type: "tool_search_tool_search_result"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"tool_search_tool_search_result"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `tool_use_id: string` + - `type: "redacted_thinking"` - - `type: "tool_search_tool_result"` + - `"redacted_thinking"` - - `"tool_search_tool_result"` + - `ToolUseBlock object { id, caller, input, 3 more }` - - `cache_control: optional CacheControlEphemeral or null` + - `id: string` - Create a cache control breakpoint at this content block. + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `ContainerUploadBlockParam object { file_id, type, cache_control }` + Tool invocation directly from the model. - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + - `DirectCaller object { type }` - - `file_id: string` + Tool invocation directly from the model. - - `type: "container_upload"` + - `type: "direct"` - - `"container_upload"` + - `"direct"` - - `cache_control: optional CacheControlEphemeral or null` + - `ServerToolCaller object { tool_id, type }` - Create a cache control breakpoint at this content block. + Tool invocation generated by a server-side tool. - - `MidConversationSystemBlockParam object { content, type, cache_control }` + - `tool_id: string` - System instructions that appear mid-conversation. + - `type: "code_execution_20250825"` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + - `"code_execution_20250825"` - - `content: array of TextBlockParam` + - `ServerToolCaller20260120 object { tool_id, type }` - System instruction text blocks. + - `tool_id: string` - - `text: string` + - `type: "code_execution_20260120"` - - `type: "text"` + - `"code_execution_20260120"` - - `cache_control: optional CacheControlEphemeral or null` + - `input: map[unknown]` - Create a cache control breakpoint at this content block. + - `name: string` - - `citations: optional array of TextCitationParam or null` + - `type: "tool_use"` - - `type: "mid_conv_system"` + - `"tool_use"` - - `"mid_conv_system"` + - `toolset_name: optional string or null` - - `cache_control: optional CacheControlEphemeral or null` + For a toolset member tool_use, the toolset family. - Create a cache control breakpoint at this content block. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - - `role: "user" or "assistant" or "system"` + - `id: string` - - `"user"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"assistant"` + Tool invocation directly from the model. - - `"system"` + - `DirectCaller object { type }` -### Message Tokens Count + Tool invocation directly from the model. -- `MessageTokensCount object { input_tokens }` + - `ServerToolCaller object { tool_id, type }` - - `input_tokens: number` + Tool invocation generated by a server-side tool. - The total number of tokens across the provided list of messages, system prompt, and tools. + - `ServerToolCaller20260120 object { tool_id, type }` -### Metadata + - `input: map[unknown]` -- `Metadata object { user_id }` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `user_id: optional string or null` + - `"web_search"` - An external identifier for the user who is associated with the request. + - `"web_fetch"` - 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. + - `"code_execution"` -### Mid Conversation System Block Param + - `"bash_code_execution"` -- `MidConversationSystemBlockParam object { content, type, cache_control }` + - `"text_editor_code_execution"` - System instructions that appear mid-conversation. + - `"tool_search_tool_regex"` - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + - `"tool_search_tool_bm25"` - - `content: array of TextBlockParam` + - `type: "server_tool_use"` - System instruction text blocks. + - `"server_tool_use"` - - `text: string` + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `type: "text"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"text"` + Tool invocation directly from the model. - - `cache_control: optional CacheControlEphemeral or null` + - `DirectCaller object { type }` - Create a cache control breakpoint at this content block. + Tool invocation directly from the model. - - `type: "ephemeral"` + - `ServerToolCaller object { tool_id, type }` - - `"ephemeral"` + Tool invocation generated by a server-side tool. - - `ttl: optional "5m" or "1h"` + - `ServerToolCaller20260120 object { tool_id, type }` - The time-to-live for the cache control breakpoint. + - `content: WebSearchToolResultBlockContent` - This may be one the following values: + - `WebSearchToolResultError object { error_code, type }` - - `5m`: 5 minutes - - `1h`: 1 hour + - `error_code: WebSearchToolResultErrorCode` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"invalid_tool_input"` - - `"5m"` + - `"unavailable"` - - `"1h"` + - `"max_uses_exceeded"` - - `citations: optional array of TextCitationParam or null` + - `"too_many_requests"` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"query_too_long"` - - `cited_text: string` + - `"request_too_large"` - - `document_index: number` + - `type: "web_search_tool_result_error"` - - `document_title: string or null` + - `"web_search_tool_result_error"` - - `end_char_index: number` + - `array of WebSearchResultBlock` - - `start_char_index: number` + - `encrypted_content: string` - - `type: "char_location"` + - `page_age: string or null` - - `"char_location"` + - `title: string` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `type: "web_search_result"` - - `cited_text: string` + - `"web_search_result"` - - `document_index: number` + - `url: string` - - `document_title: string or null` + - `tool_use_id: string` - - `end_page_number: number` + - `type: "web_search_tool_result"` - - `start_page_number: number` + - `"web_search_tool_result"` - - `type: "page_location"` + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `"page_location"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + Tool invocation directly from the model. - - `cited_text: string` + - `DirectCaller object { type }` - The full text of the cited block range, concatenated. + Tool invocation directly from the model. - 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. + - `ServerToolCaller object { tool_id, type }` - - `document_index: number` + Tool invocation generated by a server-side tool. - - `document_title: string or null` + - `ServerToolCaller20260120 object { tool_id, type }` - - `end_block_index: number` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `WebFetchToolResultErrorBlock object { error_code, type }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `error_code: WebFetchToolResultErrorCode` - - `start_block_index: number` + - `"invalid_tool_input"` - 0-based index of the first cited block in the source's `content` array. + - `"url_too_long"` - - `type: "content_block_location"` + - `"url_not_allowed"` - - `"content_block_location"` + - `"url_not_in_prior_context"` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"url_not_accessible"` - - `cited_text: string` + - `"unsupported_content_type"` - - `encrypted_index: string` + - `"too_many_requests"` - - `title: string or null` + - `"max_uses_exceeded"` - - `type: "web_search_result_location"` + - `"unavailable"` - - `"web_search_result_location"` + - `type: "web_fetch_tool_result_error"` - - `url: string` + - `"web_fetch_tool_result_error"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `WebFetchBlock object { content, retrieved_at, type, url }` - - `cited_text: string` + - `content: DocumentBlock` - The full text of the cited block range, concatenated. + - `citations: CitationsConfig or null` - 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. + Citation configuration for the document - - `end_block_index: number` + - `enabled: boolean` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `source: Base64PDFSource or PlainTextSource` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `Base64PDFSource object { data, media_type, type }` - - `search_result_index: number` + - `data: string` - 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. + - `media_type: "application/pdf"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"application/pdf"` - - `source: string` + - `type: "base64"` - - `start_block_index: number` + - `"base64"` - 0-based index of the first cited block in the source's `content` array. + - `PlainTextSource object { data, media_type, type }` - - `title: string or null` + - `data: string` - - `type: "search_result_location"` + - `media_type: "text/plain"` - - `"search_result_location"` + - `"text/plain"` - - `type: "mid_conv_system"` + - `type: "text"` - - `"mid_conv_system"` + - `"text"` - - `cache_control: optional CacheControlEphemeral or null` + - `title: string or null` - Create a cache control breakpoint at this content block. + The title of the document -### Model + - `type: "document"` -- `Model = "claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more or string` + - `"document"` - The model that will complete your prompt. + - `retrieved_at: string or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + ISO 8601 timestamp when the content was retrieved - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `type: "web_fetch_result"` - The model that will complete your prompt. + - `"web_fetch_result"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `url: string` - - `"claude-sonnet-5"` + Fetched content URL - High-performance model for coding and agents + - `tool_use_id: string` - - `"claude-fable-5"` + - `type: "web_fetch_tool_result"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `"web_fetch_tool_result"` - - `"claude-mythos-5"` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` - Most capable model for cybersecurity and biology research + - `content: CodeExecutionToolResultBlockContent` - - `"claude-opus-5"` + Code execution result with encrypted stdout for PFC + web_search results. - Powerful intelligence for long-running agents and coding + - `CodeExecutionToolResultError object { error_code, type }` - - `"claude-opus-4-8"` + - `error_code: CodeExecutionToolResultErrorCode` - Powerful intelligence for long-running agents and coding + - `"invalid_tool_input"` - - `"claude-opus-4-7"` + - `"unavailable"` - Powerful intelligence for long-running agents and coding + - `"too_many_requests"` - - `"claude-mythos-preview"` + - `"execution_time_exceeded"` - New class of intelligence, strongest in coding and cybersecurity + - `type: "code_execution_tool_result_error"` - - `"claude-opus-4-6"` + - `"code_execution_tool_result_error"` - Powerful intelligence for long-running agents and coding + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"claude-sonnet-4-6"` + - `content: array of CodeExecutionOutputBlock` - Best combination of speed and intelligence + - `file_id: string` - - `"claude-haiku-4-5"` + - `type: "code_execution_output"` - Fastest model with near-frontier intelligence + - `"code_execution_output"` - - `"claude-haiku-4-5-20251001"` + - `return_code: number` - Fastest model with near-frontier intelligence + - `stderr: string` - - `"claude-opus-4-5"` + - `stdout: string` - Powerful intelligence for long-running agents and coding + - `type: "code_execution_result"` - - `"claude-opus-4-5-20251101"` + - `"code_execution_result"` - Powerful intelligence for long-running agents and coding + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `"claude-sonnet-4-5"` + Code execution result with encrypted stdout for PFC + web_search results. - High-performance model for agents and coding + - `content: array of CodeExecutionOutputBlock` - - `"claude-sonnet-4-5-20250929"` + - `file_id: string` - High-performance model for agents and coding + - `type: "code_execution_output"` - - `string` + - `encrypted_stdout: string` -### Output Config + - `return_code: number` -- `OutputConfig object { effort, format }` + - `stderr: string` - - `effort: optional "low" or "medium" or "high" or 2 more or null` + - `type: "encrypted_code_execution_result"` - All possible effort levels. + - `"encrypted_code_execution_result"` - - `"low"` + - `tool_use_id: string` - - `"medium"` + - `type: "code_execution_tool_result"` - - `"high"` + - `"code_execution_tool_result"` - - `"xhigh"` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"max"` + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` - - `format: optional JSONOutputFormat or null` + - `BashCodeExecutionToolResultError object { error_code, type }` - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + - `error_code: BashCodeExecutionToolResultErrorCode` - - `schema: map[unknown]` + - `"invalid_tool_input"` - The JSON schema of the format + - `"unavailable"` - - `type: "json_schema"` + - `"too_many_requests"` - - `"json_schema"` + - `"execution_time_exceeded"` -### Output Tokens Details + - `"output_file_too_large"` -- `OutputTokensDetails object { thinking_tokens }` + - `type: "bash_code_execution_tool_result_error"` - - `thinking_tokens: number` + - `"bash_code_execution_tool_result_error"` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `content: array of BashCodeExecutionOutputBlock` -### Plain Text Source + - `file_id: string` -- `PlainTextSource object { data, media_type, type }` + - `type: "bash_code_execution_output"` - - `data: string` + - `"bash_code_execution_output"` - - `media_type: "text/plain"` + - `return_code: number` - - `"text/plain"` + - `stderr: string` - - `type: "text"` + - `stdout: string` - - `"text"` + - `type: "bash_code_execution_result"` -### Raw Content Block Delta + - `"bash_code_execution_result"` -- `RawContentBlockDelta = TextDelta or InputJSONDelta or CitationsDelta or 2 more` + - `tool_use_id: string` - - `TextDelta object { text, type }` + - `type: "bash_code_execution_tool_result"` - - `text: string` + - `"bash_code_execution_tool_result"` - - `type: "text_delta"` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"text_delta"` + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `InputJSONDelta object { partial_json, type }` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `partial_json: string` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `type: "input_json_delta"` + - `"invalid_tool_input"` - - `"input_json_delta"` + - `"unavailable"` - - `CitationsDelta object { citation, type }` + - `"too_many_requests"` - - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + - `"execution_time_exceeded"` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"file_not_found"` - - `cited_text: string` + - `error_message: string or null` - - `document_index: number` + - `type: "text_editor_code_execution_tool_result_error"` - - `document_title: string or null` + - `"text_editor_code_execution_tool_result_error"` - - `end_char_index: number` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `file_id: string or null` + - `content: string` - - `start_char_index: number` + - `file_type: "text" or "image" or "pdf"` - - `type: "char_location"` + - `"text"` - - `"char_location"` + - `"image"` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"pdf"` - - `cited_text: string` + - `num_lines: number or null` - - `document_index: number` + - `start_line: number or null` - - `document_title: string or null` + - `total_lines: number or null` - - `end_page_number: number` + - `type: "text_editor_code_execution_view_result"` - - `file_id: string or null` + - `"text_editor_code_execution_view_result"` - - `start_page_number: number` + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `type: "page_location"` + - `is_file_update: boolean` - - `"page_location"` + - `type: "text_editor_code_execution_create_result"` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `"text_editor_code_execution_create_result"` - - `cited_text: string` + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - The full text of the cited block range, concatenated. + - `lines: array of string or null` - 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. + - `new_lines: number or null` - - `document_index: number` + - `new_start: number or null` - - `document_title: string or null` + - `old_lines: number or null` - - `end_block_index: number` + - `old_start: number or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "text_editor_code_execution_str_replace_result"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"text_editor_code_execution_str_replace_result"` - - `file_id: string or null` + - `tool_use_id: string` - - `start_block_index: number` + - `type: "text_editor_code_execution_tool_result"` - 0-based index of the first cited block in the source's `content` array. + - `"text_editor_code_execution_tool_result"` - - `type: "content_block_location"` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - - `"content_block_location"` + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `cited_text: string` + - `error_code: ToolSearchToolResultErrorCode` - - `encrypted_index: string` + - `"invalid_tool_input"` - - `title: string or null` + - `"unavailable"` - - `type: "web_search_result_location"` + - `"too_many_requests"` - - `"web_search_result_location"` + - `"execution_time_exceeded"` - - `url: string` + - `error_message: string or null` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "tool_search_tool_result_error"` - - `cited_text: string` + - `"tool_search_tool_result_error"` - The full text of the cited block range, concatenated. + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - 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. + - `tool_references: array of ToolReferenceBlock` - - `end_block_index: number` + - `tool_name: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "tool_reference"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"tool_reference"` - - `search_result_index: number` + - `type: "tool_search_tool_search_result"` - 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. + - `"tool_search_tool_search_result"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `tool_use_id: string` - - `source: string` + - `type: "tool_search_tool_result"` - - `start_block_index: number` + - `"tool_search_tool_result"` - 0-based index of the first cited block in the source's `content` array. + - `ContainerUploadBlock object { file_id, type }` - - `title: string or null` + Response model for a file uploaded to the container. - - `type: "search_result_location"` + - `file_id: string` - - `"search_result_location"` + - `type: "container_upload"` - - `type: "citations_delta"` + - `"container_upload"` - - `"citations_delta"` + - `model: Model` - - `ThinkingDelta object { thinking, type }` + The model that will complete your prompt. - - `thinking: string` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - 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. + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `type: "thinking_delta"` + The model that will complete your prompt. - - `"thinking_delta"` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `SignatureDelta object { signature, type }` + - `"claude-sonnet-5"` - - `signature: string` + High-performance model for coding and agents - 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. + - `"claude-fable-5"` - - `type: "signature_delta"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `"signature_delta"` + - `"claude-mythos-5"` -### Raw Content Block Delta Event + Most capable model for cybersecurity and biology research -- `RawContentBlockDeltaEvent object { delta, index, type }` + - `"claude-opus-5"` - - `delta: RawContentBlockDelta` + Powerful intelligence for long-running agents and coding - - `TextDelta object { text, type }` + - `"claude-opus-4-8"` - - `text: string` + Powerful intelligence for long-running agents and coding - - `type: "text_delta"` + - `"claude-opus-4-7"` - - `"text_delta"` + Powerful intelligence for long-running agents and coding - - `InputJSONDelta object { partial_json, type }` + - `"claude-mythos-preview"` - - `partial_json: string` + New class of intelligence, strongest in coding and cybersecurity - - `type: "input_json_delta"` + - `"claude-opus-4-6"` - - `"input_json_delta"` + Powerful intelligence for long-running agents and coding - - `CitationsDelta object { citation, type }` + - `"claude-sonnet-4-6"` - - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + Best combination of speed and intelligence - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"claude-haiku-4-5"` - - `cited_text: string` + Fastest model with near-frontier intelligence - - `document_index: number` + - `"claude-haiku-4-5-20251001"` - - `document_title: string or null` + Fastest model with near-frontier intelligence - - `end_char_index: number` + - `"claude-opus-4-5"` - - `file_id: string or null` + Powerful intelligence for long-running agents and coding - - `start_char_index: number` + - `"claude-opus-4-5-20251101"` - - `type: "char_location"` + Powerful intelligence for long-running agents and coding - - `"char_location"` + - `"claude-sonnet-4-5"` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + High-performance model for agents and coding - - `cited_text: string` + - `"claude-sonnet-4-5-20250929"` - - `document_index: number` + High-performance model for agents and coding - - `document_title: string or null` + - `string` - - `end_page_number: number` + - `role: "assistant"` - - `file_id: string or null` + Conversational role of the generated message. - - `start_page_number: number` + This will always be `"assistant"`. - - `type: "page_location"` + - `"assistant"` - - `"page_location"` + - `stop_details: RefusalStopDetails or null` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + Structured information about a refusal. - - `cited_text: string` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - The full text of the cited block range, concatenated. + The policy category that triggered a refusal. - 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. + - `"cyber"` - - `document_index: number` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `document_title: string or null` + - `"bio"` - - `end_block_index: number` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"frontier_llm"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + 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. - - `file_id: string or null` + - `"reasoning_extraction"` - - `start_block_index: number` + 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). - 0-based index of the first cited block in the source's `content` array. + - `"general_harms"` - - `type: "content_block_location"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `"content_block_location"` + - `explanation: string or null` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + Human-readable explanation of the refusal. - - `cited_text: string` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - - `encrypted_index: string` + - `type: "refusal"` - - `title: string or null` + - `"refusal"` - - `type: "web_search_result_location"` + - `stop_reason: StopReason or null` - - `"web_search_result_location"` + The reason that we stopped. - - `url: string` + This may be one the following values: - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window - - `cited_text: string` + 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. - The full text of the cited block range, concatenated. + - `"end_turn"` - 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. + - `"max_tokens"` - - `end_block_index: number` + - `"stop_sequence"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"tool_use"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"pause_turn"` - - `search_result_index: number` + - `"refusal"` - 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. + - `"model_context_window_exceeded"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `stop_sequence: string or null` - - `source: string` + Which custom stop sequence was generated, if any. - - `start_block_index: number` + This value will be a non-null string if one of your custom stop sequences was generated. - 0-based index of the first cited block in the source's `content` array. + - `type: "message"` - - `title: string or null` + Object type. - - `type: "search_result_location"` + For Messages, this is always `"message"`. - - `"search_result_location"` + - `"message"` - - `type: "citations_delta"` + - `usage: Usage` - - `"citations_delta"` + Billing and rate-limit usage. - - `ThinkingDelta object { thinking, type }` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - - `thinking: string` + 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. - 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. + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `type: "thinking_delta"` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - - `"thinking_delta"` + - `cache_creation: CacheCreation or null` - - `SignatureDelta object { signature, type }` + Breakdown of cached tokens by TTL - - `signature: string` + - `ephemeral_1h_input_tokens: number` - 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. + The number of input tokens used to create the 1 hour cache entry. - - `type: "signature_delta"` + - `ephemeral_5m_input_tokens: number` - - `"signature_delta"` + The number of input tokens used to create the 5 minute cache entry. - - `index: number` + - `cache_creation_input_tokens: number or null` - - `type: "content_block_delta"` + The number of input tokens used to create the cache entry. - - `"content_block_delta"` + - `cache_read_input_tokens: number or null` -### Raw Content Block Start Event + The number of input tokens read from the cache. -- `RawContentBlockStartEvent object { content_block, index, type }` + - `inference_geo: string or null` - - `content_block: TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` + The geographic region where inference was performed for this request. - Response model for a file uploaded to the container. + - `input_tokens: number` - - `TextBlock object { citations, text, type }` + The number of input tokens which were used. - - `citations: array of TextCitation or null` + - `output_tokens: number` - Citations supporting the text block. + The number of output tokens which were used. - 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`. + - `output_tokens_details: OutputTokensDetails or null` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + Breakdown of output tokens by category. - - `cited_text: string` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `document_index: number` + - `thinking_tokens: number` - - `document_title: string or null` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `end_char_index: number` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `file_id: string or null` + - `server_tool_use: ServerToolUsage or null` - - `start_char_index: number` + The number of server tool requests. - - `type: "char_location"` + - `web_fetch_requests: number` - - `"char_location"` + The number of web fetch tool requests. - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `web_search_requests: number` - - `cited_text: string` + The number of web search tool requests. - - `document_index: number` + - `service_tier: "standard" or "priority" or "batch" or null` - - `document_title: string or null` + If the request used the priority, standard, or batch tier. - - `end_page_number: number` + - `"standard"` - - `file_id: string or null` + - `"priority"` - - `start_page_number: number` + - `"batch"` - - `type: "page_location"` + - `type: "message_start"` - - `"page_location"` + - `"message_start"` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` +### Raw Message Stop Event - - `cited_text: string` +- `RawMessageStopEvent object { type }` - The full text of the cited block range, concatenated. + - `type: "message_stop"` - 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. + - `"message_stop"` - - `document_index: number` +### Raw Message Stream Event - - `document_title: string or null` +- `RawMessageStreamEvent = RawMessageStartEvent or RawMessageDeltaEvent or RawMessageStopEvent or 3 more` - - `end_block_index: number` + - `RawMessageStartEvent object { message, type }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `message: Message` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `id: string` - - `file_id: string or null` + Unique object identifier. - - `start_block_index: number` + The format and length of IDs may change over time. - 0-based index of the first cited block in the source's `content` array. + - `container: Container or null` - - `type: "content_block_location"` + Information about the container used in the request (for the code execution tool) - - `"content_block_location"` + - `id: string` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + Identifier for the container used in this request - - `cited_text: string` + - `expires_at: string` - - `encrypted_index: string` + The time at which the container will expire. - - `title: string or null` + - `skills: array of ContainerSkill or null` - - `type: "web_search_result_location"` + Skills loaded in the container - - `"web_search_result_location"` + - `skill_id: string` - - `url: string` + Skill ID - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "anthropic" or "custom"` - - `cited_text: string` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - The full text of the cited block range, concatenated. + - `"anthropic"` - 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. + - `"custom"` - - `end_block_index: number` + - `version: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Skill version or 'latest' for most recent version - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `content: array of ContentBlock` - - `search_result_index: number` + Content generated by the model. - 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. + This is an array of content blocks, each of which has a `type` that determines its shape. - Counted separately from `document_index`; server-side web search results are not included in this count. + Example: - - `source: string` + ```json + [{"type": "text", "text": "Hi, I'm Claude."}] + ``` - - `start_block_index: number` + 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. - 0-based index of the first cited block in the source's `content` array. + For example, if the input `messages` were: - - `title: string or null` + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("} + ] + ``` - - `type: "search_result_location"` + Then the response `content` might be: - - `"search_result_location"` + ```json + [{"type": "text", "text": "B)"}] + ``` - - `text: string` + - `TextBlock object { citations, text, type }` - - `type: "text"` + - `citations: array of TextCitation or null` - - `"text"` + Citations supporting the text block. - - `ThinkingBlock object { signature, thinking, type }` + 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`. - - `signature: string` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `cited_text: string` - 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. + - `document_index: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `document_title: string or null` - - `thinking: string` + - `end_char_index: number` - The text of Claude's thinking process for this block. + - `file_id: string or null` - - `type: "thinking"` + - `start_char_index: number` - - `"thinking"` + - `type: "char_location"` - - `RedactedThinkingBlock object { data, type }` + - `"char_location"` - - `data: string` + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - 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. + - `cited_text: string` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `document_index: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `document_title: string or null` - - `type: "redacted_thinking"` + - `end_page_number: number` - - `"redacted_thinking"` + - `file_id: string or null` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `start_page_number: number` - - `id: string` + - `type: "page_location"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"page_location"` - Tool invocation directly from the model. + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `DirectCaller object { type }` + - `cited_text: string` - Tool invocation directly from the model. + The full text of the cited block range, concatenated. - - `type: "direct"` + 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. - - `"direct"` + - `document_index: number` - - `ServerToolCaller object { tool_id, type }` + - `document_title: string or null` - Tool invocation generated by a server-side tool. + - `end_block_index: number` - - `tool_id: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "code_execution_20250825"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"code_execution_20250825"` + - `file_id: string or null` - - `ServerToolCaller20260120 object { tool_id, type }` + - `start_block_index: number` - - `tool_id: string` + 0-based index of the first cited block in the source's `content` array. - - `type: "code_execution_20260120"` + - `type: "content_block_location"` - - `"code_execution_20260120"` + - `"content_block_location"` - - `input: map[unknown]` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `name: string` + - `cited_text: string` - - `type: "tool_use"` + - `encrypted_index: string` - - `"tool_use"` + - `title: string or null` - - `ServerToolUseBlock object { id, caller, input, 2 more }` + - `type: "web_search_result_location"` - - `id: string` + - `"web_search_result_location"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `url: string` - Tool invocation directly from the model. + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `DirectCaller object { type }` + - `cited_text: string` - Tool invocation directly from the model. + The full text of the cited block range, concatenated. - - `ServerToolCaller object { tool_id, type }` + 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. - Tool invocation generated by a server-side tool. + - `end_block_index: number` - - `ServerToolCaller20260120 object { tool_id, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `input: map[unknown]` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `search_result_index: number` - - `"web_search"` + 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. - - `"web_fetch"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"code_execution"` + - `source: string` - - `"bash_code_execution"` + - `start_block_index: number` - - `"text_editor_code_execution"` + 0-based index of the first cited block in the source's `content` array. - - `"tool_search_tool_regex"` + - `title: string or null` - - `"tool_search_tool_bm25"` + - `type: "search_result_location"` - - `type: "server_tool_use"` + - `"search_result_location"` - - `"server_tool_use"` + - `text: string` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `type: "text"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"text"` - Tool invocation directly from the model. + - `ThinkingBlock object { signature, thinking, type }` - - `DirectCaller object { type }` + - `signature: string` - Tool invocation directly from the model. + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `ServerToolCaller object { tool_id, type }` + 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. - Tool invocation generated by a server-side tool. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `ServerToolCaller20260120 object { tool_id, type }` + - `thinking: string` - - `content: WebSearchToolResultBlockContent` + The text of Claude's thinking process for this block. - - `WebSearchToolResultError object { error_code, type }` + - `type: "thinking"` - - `error_code: WebSearchToolResultErrorCode` + - `"thinking"` - - `"invalid_tool_input"` + - `RedactedThinkingBlock object { data, type }` - - `"unavailable"` + - `data: string` - - `"max_uses_exceeded"` + 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. - - `"too_many_requests"` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `"query_too_long"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `"request_too_large"` + - `type: "redacted_thinking"` - - `type: "web_search_tool_result_error"` + - `"redacted_thinking"` - - `"web_search_tool_result_error"` + - `ToolUseBlock object { id, caller, input, 3 more }` - - `array of WebSearchResultBlock` + - `id: string` - - `encrypted_content: string` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `page_age: string or null` + Tool invocation directly from the model. - - `title: string` + - `DirectCaller object { type }` - - `type: "web_search_result"` + Tool invocation directly from the model. - - `"web_search_result"` + - `type: "direct"` - - `url: string` + - `"direct"` - - `tool_use_id: string` + - `ServerToolCaller object { tool_id, type }` - - `type: "web_search_tool_result"` + Tool invocation generated by a server-side tool. - - `"web_search_tool_result"` + - `tool_id: string` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `type: "code_execution_20250825"` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"code_execution_20250825"` - Tool invocation directly from the model. + - `ServerToolCaller20260120 object { tool_id, type }` - - `DirectCaller object { type }` + - `tool_id: string` - Tool invocation directly from the model. + - `type: "code_execution_20260120"` - - `ServerToolCaller object { tool_id, type }` + - `"code_execution_20260120"` - Tool invocation generated by a server-side tool. + - `input: map[unknown]` - - `ServerToolCaller20260120 object { tool_id, type }` + - `name: string` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + - `type: "tool_use"` - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `"tool_use"` - - `error_code: WebFetchToolResultErrorCode` + - `toolset_name: optional string or null` - - `"invalid_tool_input"` + For a toolset member tool_use, the toolset family. - - `"url_too_long"` + - `ServerToolUseBlock object { id, caller, input, 2 more }` - - `"url_not_allowed"` + - `id: string` - - `"url_not_in_prior_context"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"url_not_accessible"` + Tool invocation directly from the model. - - `"unsupported_content_type"` + - `DirectCaller object { type }` - - `"too_many_requests"` + Tool invocation directly from the model. - - `"max_uses_exceeded"` + - `ServerToolCaller object { tool_id, type }` - - `"unavailable"` + Tool invocation generated by a server-side tool. - - `type: "web_fetch_tool_result_error"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"web_fetch_tool_result_error"` + - `input: map[unknown]` - - `WebFetchBlock object { content, retrieved_at, type, url }` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `content: DocumentBlock` + - `"web_search"` - - `citations: CitationsConfig or null` + - `"web_fetch"` - Citation configuration for the document + - `"code_execution"` - - `enabled: boolean` + - `"bash_code_execution"` - - `source: Base64PDFSource or PlainTextSource` + - `"text_editor_code_execution"` - - `Base64PDFSource object { data, media_type, type }` + - `"tool_search_tool_regex"` - - `data: string` + - `"tool_search_tool_bm25"` - - `media_type: "application/pdf"` + - `type: "server_tool_use"` - - `"application/pdf"` + - `"server_tool_use"` - - `type: "base64"` + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `"base64"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `PlainTextSource object { data, media_type, type }` + Tool invocation directly from the model. - - `data: string` + - `DirectCaller object { type }` - - `media_type: "text/plain"` + Tool invocation directly from the model. - - `"text/plain"` + - `ServerToolCaller object { tool_id, type }` - - `type: "text"` + Tool invocation generated by a server-side tool. - - `"text"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `title: string or null` + - `content: WebSearchToolResultBlockContent` - The title of the document + - `WebSearchToolResultError object { error_code, type }` - - `type: "document"` + - `error_code: WebSearchToolResultErrorCode` - - `"document"` + - `"invalid_tool_input"` - - `retrieved_at: string or null` + - `"unavailable"` - ISO 8601 timestamp when the content was retrieved + - `"max_uses_exceeded"` - - `type: "web_fetch_result"` + - `"too_many_requests"` - - `"web_fetch_result"` + - `"query_too_long"` - - `url: string` + - `"request_too_large"` - Fetched content URL + - `type: "web_search_tool_result_error"` - - `tool_use_id: string` + - `"web_search_tool_result_error"` - - `type: "web_fetch_tool_result"` + - `array of WebSearchResultBlock` - - `"web_fetch_tool_result"` + - `encrypted_content: string` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `page_age: string or null` - - `content: CodeExecutionToolResultBlockContent` + - `title: string` - Code execution result with encrypted stdout for PFC + web_search results. + - `type: "web_search_result"` - - `CodeExecutionToolResultError object { error_code, type }` + - `"web_search_result"` - - `error_code: CodeExecutionToolResultErrorCode` + - `url: string` - - `"invalid_tool_input"` + - `tool_use_id: string` - - `"unavailable"` + - `type: "web_search_tool_result"` - - `"too_many_requests"` + - `"web_search_tool_result"` - - `"execution_time_exceeded"` + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `type: "code_execution_tool_result_error"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"code_execution_tool_result_error"` + Tool invocation directly from the model. - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `DirectCaller object { type }` - - `content: array of CodeExecutionOutputBlock` + Tool invocation directly from the model. - - `file_id: string` + - `ServerToolCaller object { tool_id, type }` - - `type: "code_execution_output"` + Tool invocation generated by a server-side tool. - - `"code_execution_output"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `return_code: number` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - - `stderr: string` + - `WebFetchToolResultErrorBlock object { error_code, type }` - - `stdout: string` + - `error_code: WebFetchToolResultErrorCode` - - `type: "code_execution_result"` + - `"invalid_tool_input"` - - `"code_execution_result"` + - `"url_too_long"` - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"url_not_allowed"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"url_not_in_prior_context"` - - `content: array of CodeExecutionOutputBlock` + - `"url_not_accessible"` - - `file_id: string` + - `"unsupported_content_type"` - - `type: "code_execution_output"` + - `"too_many_requests"` - - `encrypted_stdout: string` + - `"max_uses_exceeded"` - - `return_code: number` + - `"unavailable"` - - `stderr: string` + - `type: "web_fetch_tool_result_error"` - - `type: "encrypted_code_execution_result"` + - `"web_fetch_tool_result_error"` - - `"encrypted_code_execution_result"` + - `WebFetchBlock object { content, retrieved_at, type, url }` - - `tool_use_id: string` + - `content: DocumentBlock` - - `type: "code_execution_tool_result"` + - `citations: CitationsConfig or null` - - `"code_execution_tool_result"` + Citation configuration for the document - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `enabled: boolean` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `source: Base64PDFSource or PlainTextSource` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `Base64PDFSource object { data, media_type, type }` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `data: string` - - `"invalid_tool_input"` + - `media_type: "application/pdf"` - - `"unavailable"` + - `"application/pdf"` - - `"too_many_requests"` + - `type: "base64"` - - `"execution_time_exceeded"` + - `"base64"` - - `"output_file_too_large"` + - `PlainTextSource object { data, media_type, type }` - - `type: "bash_code_execution_tool_result_error"` + - `data: string` - - `"bash_code_execution_tool_result_error"` + - `media_type: "text/plain"` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"text/plain"` - - `content: array of BashCodeExecutionOutputBlock` + - `type: "text"` - - `file_id: string` + - `"text"` - - `type: "bash_code_execution_output"` + - `title: string or null` - - `"bash_code_execution_output"` + The title of the document - - `return_code: number` + - `type: "document"` - - `stderr: string` + - `"document"` - - `stdout: string` + - `retrieved_at: string or null` - - `type: "bash_code_execution_result"` + ISO 8601 timestamp when the content was retrieved - - `"bash_code_execution_result"` + - `type: "web_fetch_result"` - - `tool_use_id: string` + - `"web_fetch_result"` - - `type: "bash_code_execution_tool_result"` + - `url: string` - - `"bash_code_execution_tool_result"` + Fetched content URL - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `tool_use_id: string` - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + - `type: "web_fetch_tool_result"` - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"web_fetch_tool_result"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"invalid_tool_input"` + - `content: CodeExecutionToolResultBlockContent` - - `"unavailable"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"too_many_requests"` + - `CodeExecutionToolResultError object { error_code, type }` - - `"execution_time_exceeded"` + - `error_code: CodeExecutionToolResultErrorCode` - - `"file_not_found"` + - `"invalid_tool_input"` - - `error_message: string or null` + - `"unavailable"` - - `type: "text_editor_code_execution_tool_result_error"` + - `"too_many_requests"` - - `"text_editor_code_execution_tool_result_error"` + - `"execution_time_exceeded"` - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `type: "code_execution_tool_result_error"` - - `content: string` + - `"code_execution_tool_result_error"` - - `file_type: "text" or "image" or "pdf"` + - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `"text"` + - `content: array of CodeExecutionOutputBlock` - - `"image"` + - `file_id: string` - - `"pdf"` + - `type: "code_execution_output"` - - `num_lines: number or null` + - `"code_execution_output"` - - `start_line: number or null` + - `return_code: number` - - `total_lines: number or null` + - `stderr: string` - - `type: "text_editor_code_execution_view_result"` + - `stdout: string` - - `"text_editor_code_execution_view_result"` + - `type: "code_execution_result"` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `"code_execution_result"` - - `is_file_update: boolean` + - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` - - `type: "text_editor_code_execution_create_result"` + Code execution result with encrypted stdout for PFC + web_search results. - - `"text_editor_code_execution_create_result"` + - `content: array of CodeExecutionOutputBlock` - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + - `file_id: string` - - `lines: array of string or null` + - `type: "code_execution_output"` - - `new_lines: number or null` + - `encrypted_stdout: string` - - `new_start: number or null` + - `return_code: number` - - `old_lines: number or null` + - `stderr: string` - - `old_start: number or null` + - `type: "encrypted_code_execution_result"` - - `type: "text_editor_code_execution_str_replace_result"` + - `"encrypted_code_execution_result"` - - `"text_editor_code_execution_str_replace_result"` + - `tool_use_id: string` - - `tool_use_id: string` + - `type: "code_execution_tool_result"` - - `type: "text_editor_code_execution_tool_result"` + - `"code_execution_tool_result"` - - `"text_editor_code_execution_tool_result"` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `BashCodeExecutionToolResultError object { error_code, type }` - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `error_code: BashCodeExecutionToolResultErrorCode` - - `error_code: ToolSearchToolResultErrorCode` + - `"invalid_tool_input"` - - `"invalid_tool_input"` + - `"unavailable"` - - `"unavailable"` + - `"too_many_requests"` - - `"too_many_requests"` + - `"execution_time_exceeded"` - - `"execution_time_exceeded"` + - `"output_file_too_large"` - - `error_message: string or null` + - `type: "bash_code_execution_tool_result_error"` - - `type: "tool_search_tool_result_error"` + - `"bash_code_execution_tool_result_error"` - - `"tool_search_tool_result_error"` + - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `content: array of BashCodeExecutionOutputBlock` - - `tool_references: array of ToolReferenceBlock` + - `file_id: string` - - `tool_name: string` + - `type: "bash_code_execution_output"` - - `type: "tool_reference"` + - `"bash_code_execution_output"` - - `"tool_reference"` + - `return_code: number` - - `type: "tool_search_tool_search_result"` + - `stderr: string` - - `"tool_search_tool_search_result"` + - `stdout: string` - - `tool_use_id: string` + - `type: "bash_code_execution_result"` - - `type: "tool_search_tool_result"` + - `"bash_code_execution_result"` - - `"tool_search_tool_result"` + - `tool_use_id: string` - - `ContainerUploadBlock object { file_id, type }` + - `type: "bash_code_execution_tool_result"` - Response model for a file uploaded to the container. + - `"bash_code_execution_tool_result"` - - `file_id: string` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `type: "container_upload"` + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `"container_upload"` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `index: number` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `type: "content_block_start"` + - `"invalid_tool_input"` - - `"content_block_start"` + - `"unavailable"` -### Raw Content Block Stop Event + - `"too_many_requests"` -- `RawContentBlockStopEvent object { index, type }` + - `"execution_time_exceeded"` - - `index: number` + - `"file_not_found"` - - `type: "content_block_stop"` + - `error_message: string or null` - - `"content_block_stop"` + - `type: "text_editor_code_execution_tool_result_error"` -### Raw Message Delta Event + - `"text_editor_code_execution_tool_result_error"` -- `RawMessageDeltaEvent object { delta, type, usage }` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `delta: object { container, stop_details, stop_reason, stop_sequence }` + - `content: string` - - `container: Container or null` + - `file_type: "text" or "image" or "pdf"` - Information about the container used in the request (for the code execution tool) + - `"text"` - - `id: string` + - `"image"` - Identifier for the container used in this request + - `"pdf"` - - `expires_at: string` + - `num_lines: number or null` - The time at which the container will expire. + - `start_line: number or null` - - `stop_details: RefusalStopDetails or null` + - `total_lines: number or null` - Structured information about a refusal. + - `type: "text_editor_code_execution_view_result"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `"text_editor_code_execution_view_result"` - The policy category that triggered a refusal. + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `"cyber"` + - `is_file_update: boolean` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `type: "text_editor_code_execution_create_result"` - - `"bio"` + - `"text_editor_code_execution_create_result"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `"frontier_llm"` + - `lines: array of string or null` - 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. + - `new_lines: number or null` - - `"reasoning_extraction"` + - `new_start: number or null` - 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). + - `old_lines: number or null` - - `"general_harms"` + - `old_start: number or null` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `type: "text_editor_code_execution_str_replace_result"` - - `explanation: string or null` + - `"text_editor_code_execution_str_replace_result"` - Human-readable explanation of the refusal. + - `tool_use_id: string` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `type: "text_editor_code_execution_tool_result"` - - `type: "refusal"` + - `"text_editor_code_execution_tool_result"` - - `"refusal"` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - - `stop_reason: StopReason or null` + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - - `"end_turn"` + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `"max_tokens"` + - `error_code: ToolSearchToolResultErrorCode` - - `"stop_sequence"` + - `"invalid_tool_input"` - - `"tool_use"` + - `"unavailable"` - - `"pause_turn"` + - `"too_many_requests"` - - `"refusal"` + - `"execution_time_exceeded"` - - `"model_context_window_exceeded"` + - `error_message: string or null` - - `stop_sequence: string or null` + - `type: "tool_search_tool_result_error"` - - `type: "message_delta"` + - `"tool_search_tool_result_error"` - - `"message_delta"` + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - - `usage: MessageDeltaUsage` + - `tool_references: array of ToolReferenceBlock` - Billing and rate-limit usage. + - `tool_name: string` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `type: "tool_reference"` - 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. + - `"tool_reference"` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `type: "tool_search_tool_search_result"` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `"tool_search_tool_search_result"` - - `cache_creation_input_tokens: number or null` + - `tool_use_id: string` - The cumulative number of input tokens used to create the cache entry. + - `type: "tool_search_tool_result"` - - `cache_read_input_tokens: number or null` + - `"tool_search_tool_result"` - The cumulative number of input tokens read from the cache. + - `ContainerUploadBlock object { file_id, type }` - - `input_tokens: number or null` + Response model for a file uploaded to the container. - The cumulative number of input tokens which were used. + - `file_id: string` - - `output_tokens: number` + - `type: "container_upload"` - The cumulative number of output tokens which were used. + - `"container_upload"` - - `output_tokens_details: OutputTokensDetails or null` + - `model: Model` - Breakdown of output tokens by category. + The model that will complete your prompt. - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `thinking_tokens: number` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + The model that will complete your prompt. - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `server_tool_use: ServerToolUsage or null` + - `"claude-sonnet-5"` - The number of server tool requests. + High-performance model for coding and agents - - `web_fetch_requests: number` + - `"claude-fable-5"` - The number of web fetch tool requests. + Next generation of intelligence for the hardest knowledge work and coding problems - - `web_search_requests: number` + - `"claude-mythos-5"` - The number of web search tool requests. + Most capable model for cybersecurity and biology research -### Raw Message Start Event + - `"claude-opus-5"` -- `RawMessageStartEvent object { message, type }` + Powerful intelligence for long-running agents and coding - - `message: Message` + - `"claude-opus-4-8"` - - `id: string` + Powerful intelligence for long-running agents and coding - Unique object identifier. + - `"claude-opus-4-7"` - The format and length of IDs may change over time. + Powerful intelligence for long-running agents and coding - - `container: Container or null` + - `"claude-mythos-preview"` - Information about the container used in the request (for the code execution tool) + New class of intelligence, strongest in coding and cybersecurity - - `id: string` + - `"claude-opus-4-6"` - Identifier for the container used in this request + Powerful intelligence for long-running agents and coding - - `expires_at: string` + - `"claude-sonnet-4-6"` - The time at which the container will expire. + Best combination of speed and intelligence - - `content: array of ContentBlock` + - `"claude-haiku-4-5"` - Content generated by the model. + Fastest model with near-frontier intelligence - This is an array of content blocks, each of which has a `type` that determines its shape. + - `"claude-haiku-4-5-20251001"` - Example: + Fastest model with near-frontier intelligence - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `"claude-opus-4-5"` - 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. + Powerful intelligence for long-running agents and coding - For example, if the input `messages` were: + - `"claude-opus-4-5-20251101"` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + Powerful intelligence for long-running agents and coding - Then the response `content` might be: + - `"claude-sonnet-4-5"` - ```json - [{"type": "text", "text": "B)"}] - ``` + High-performance model for agents and coding - - `TextBlock object { citations, text, type }` + - `"claude-sonnet-4-5-20250929"` - - `citations: array of TextCitation or null` + High-performance model for agents and coding - Citations supporting the text block. + - `string` - 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`. + - `role: "assistant"` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + Conversational role of the generated message. - - `cited_text: string` + This will always be `"assistant"`. - - `document_index: number` + - `"assistant"` - - `document_title: string or null` + - `stop_details: RefusalStopDetails or null` - - `end_char_index: number` + Structured information about a refusal. - - `file_id: string or null` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `start_char_index: number` + The policy category that triggered a refusal. - - `type: "char_location"` + - `"cyber"` - - `"char_location"` + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `"bio"` - - `cited_text: string` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `document_index: number` + - `"frontier_llm"` - - `document_title: string or null` + 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. - - `end_page_number: number` + - `"reasoning_extraction"` - - `file_id: string or null` + 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). - - `start_page_number: number` + - `"general_harms"` - - `type: "page_location"` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `"page_location"` + - `explanation: string or null` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + Human-readable explanation of the refusal. - - `cited_text: string` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - The full text of the cited block range, concatenated. + - `type: "refusal"` - 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. + - `"refusal"` - - `document_index: number` + - `stop_reason: StopReason or null` - - `document_title: string or null` + The reason that we stopped. - - `end_block_index: number` + This may be one the following values: - Exclusive 0-based end index of the cited block range in the source's `content` array. + * `"end_turn"`: the model reached a natural stopping point + * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum + * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated + * `"tool_use"`: the model invoked one or more tools + * `"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. + * `"refusal"`: when streaming classifiers intervene to handle potential policy violations + * `"model_context_window_exceeded"`: we exceeded the model's context window - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + 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. - - `file_id: string or null` + - `"end_turn"` - - `start_block_index: number` + - `"max_tokens"` - 0-based index of the first cited block in the source's `content` array. + - `"stop_sequence"` - - `type: "content_block_location"` + - `"tool_use"` - - `"content_block_location"` + - `"pause_turn"` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"refusal"` - - `cited_text: string` + - `"model_context_window_exceeded"` - - `encrypted_index: string` + - `stop_sequence: string or null` - - `title: string or null` + Which custom stop sequence was generated, if any. - - `type: "web_search_result_location"` + This value will be a non-null string if one of your custom stop sequences was generated. - - `"web_search_result_location"` + - `type: "message"` - - `url: string` + Object type. - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + For Messages, this is always `"message"`. - - `cited_text: string` + - `"message"` - The full text of the cited block range, concatenated. + - `usage: Usage` - 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. + Billing and rate-limit usage. - - `end_block_index: number` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `search_result_index: number` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - 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. + - `cache_creation: CacheCreation or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + Breakdown of cached tokens by TTL - - `source: string` + - `ephemeral_1h_input_tokens: number` - - `start_block_index: number` + The number of input tokens used to create the 1 hour cache entry. - 0-based index of the first cited block in the source's `content` array. + - `ephemeral_5m_input_tokens: number` - - `title: string or null` + The number of input tokens used to create the 5 minute cache entry. - - `type: "search_result_location"` + - `cache_creation_input_tokens: number or null` - - `"search_result_location"` + The number of input tokens used to create the cache entry. - - `text: string` + - `cache_read_input_tokens: number or null` - - `type: "text"` + The number of input tokens read from the cache. - - `"text"` + - `inference_geo: string or null` - - `ThinkingBlock object { signature, thinking, type }` + The geographic region where inference was performed for this request. - - `signature: string` + - `input_tokens: number` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + The number of input tokens which were used. - 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. + - `output_tokens: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + The number of output tokens which were used. - - `thinking: string` + - `output_tokens_details: OutputTokensDetails or null` - The text of Claude's thinking process for this block. + Breakdown of output tokens by category. - - `type: "thinking"` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `"thinking"` + - `thinking_tokens: number` - - `RedactedThinkingBlock object { data, type }` + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `data: string` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - 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. + - `server_tool_use: ServerToolUsage or null` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + The number of server tool requests. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `web_fetch_requests: number` - - `type: "redacted_thinking"` + The number of web fetch tool requests. - - `"redacted_thinking"` + - `web_search_requests: number` - - `ToolUseBlock object { id, caller, input, 2 more }` + The number of web search tool requests. - - `id: string` + - `service_tier: "standard" or "priority" or "batch" or null` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + If the request used the priority, standard, or batch tier. - Tool invocation directly from the model. + - `"standard"` - - `DirectCaller object { type }` + - `"priority"` - Tool invocation directly from the model. + - `"batch"` - - `type: "direct"` + - `type: "message_start"` - - `"direct"` + - `"message_start"` - - `ServerToolCaller object { tool_id, type }` + - `RawMessageDeltaEvent object { delta, type, usage }` - Tool invocation generated by a server-side tool. + - `delta: object { container, stop_details, stop_reason, stop_sequence }` - - `tool_id: string` + - `container: Container or null` - - `type: "code_execution_20250825"` + Information about the container used in the request (for the code execution tool) - - `"code_execution_20250825"` + - `stop_details: RefusalStopDetails or null` - - `ServerToolCaller20260120 object { tool_id, type }` + Structured information about a refusal. - - `tool_id: string` + - `stop_reason: StopReason or null` - - `type: "code_execution_20260120"` + - `stop_sequence: string or null` - - `"code_execution_20260120"` + - `type: "message_delta"` - - `input: map[unknown]` + - `"message_delta"` - - `name: string` + - `usage: MessageDeltaUsage` - - `type: "tool_use"` + Billing and rate-limit usage. - - `"tool_use"` + Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. - - `ServerToolUseBlock object { id, caller, input, 2 more }` + 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. - - `id: string` + For example, `output_tokens` will be non-zero, even for an empty string response from Claude. - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. - Tool invocation directly from the model. + - `cache_creation_input_tokens: number or null` - - `DirectCaller object { type }` + The cumulative number of input tokens used to create the cache entry. - Tool invocation directly from the model. + - `cache_read_input_tokens: number or null` - - `ServerToolCaller object { tool_id, type }` + The cumulative number of input tokens read from the cache. - Tool invocation generated by a server-side tool. + - `input_tokens: number or null` - - `ServerToolCaller20260120 object { tool_id, type }` + The cumulative number of input tokens which were used. - - `input: map[unknown]` + - `output_tokens: number` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + The cumulative number of output tokens which were used. - - `"web_search"` + - `output_tokens_details: OutputTokensDetails or null` - - `"web_fetch"` + Breakdown of output tokens by category. - - `"code_execution"` + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. - - `"bash_code_execution"` + - `server_tool_use: ServerToolUsage or null` - - `"text_editor_code_execution"` + The number of server tool requests. - - `"tool_search_tool_regex"` + - `RawMessageStopEvent object { type }` - - `"tool_search_tool_bm25"` + - `type: "message_stop"` - - `type: "server_tool_use"` + - `"message_stop"` - - `"server_tool_use"` + - `RawContentBlockStartEvent object { content_block, index, type }` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `content_block: TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + Response model for a file uploaded to the container. - Tool invocation directly from the model. + - `TextBlock object { citations, text, type }` - - `DirectCaller object { type }` + - `ThinkingBlock object { signature, thinking, type }` - Tool invocation directly from the model. + - `RedactedThinkingBlock object { data, type }` - - `ServerToolCaller object { tool_id, type }` + - `ToolUseBlock object { id, caller, input, 3 more }` - Tool invocation generated by a server-side tool. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - - `ServerToolCaller20260120 object { tool_id, type }` + - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `content: WebSearchToolResultBlockContent` + - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - `WebSearchToolResultError object { error_code, type }` + - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `error_code: WebSearchToolResultErrorCode` + - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"invalid_tool_input"` + - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `"unavailable"` + - `ToolSearchToolResultBlock object { content, tool_use_id, type }` - - `"max_uses_exceeded"` + - `ContainerUploadBlock object { file_id, type }` - - `"too_many_requests"` + Response model for a file uploaded to the container. - - `"query_too_long"` + - `index: number` - - `"request_too_large"` + - `type: "content_block_start"` - - `type: "web_search_tool_result_error"` + - `"content_block_start"` - - `"web_search_tool_result_error"` + - `RawContentBlockDeltaEvent object { delta, index, type }` - - `array of WebSearchResultBlock` + - `delta: RawContentBlockDelta` - - `encrypted_content: string` + - `TextDelta object { text, type }` - - `page_age: string or null` + - `text: string` - - `title: string` + - `type: "text_delta"` - - `type: "web_search_result"` + - `"text_delta"` - - `"web_search_result"` + - `InputJSONDelta object { partial_json, type }` - - `url: string` + - `partial_json: string` - - `tool_use_id: string` + - `type: "input_json_delta"` - - `type: "web_search_tool_result"` + - `"input_json_delta"` - - `"web_search_tool_result"` + - `CitationsDelta object { citation, type }` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - Tool invocation directly from the model. + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `DirectCaller object { type }` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - Tool invocation directly from the model. + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `ServerToolCaller object { tool_id, type }` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - Tool invocation generated by a server-side tool. + - `type: "citations_delta"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `"citations_delta"` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + - `ThinkingDelta object { thinking, type }` - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `thinking: string` - - `error_code: WebFetchToolResultErrorCode` + 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. - - `"invalid_tool_input"` + - `type: "thinking_delta"` - - `"url_too_long"` + - `"thinking_delta"` - - `"url_not_allowed"` + - `SignatureDelta object { signature, type }` - - `"url_not_in_prior_context"` + - `signature: string` - - `"url_not_accessible"` + 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. - - `"unsupported_content_type"` + - `type: "signature_delta"` - - `"too_many_requests"` + - `"signature_delta"` - - `"max_uses_exceeded"` + - `index: number` - - `"unavailable"` + - `type: "content_block_delta"` - - `type: "web_fetch_tool_result_error"` + - `"content_block_delta"` - - `"web_fetch_tool_result_error"` + - `RawContentBlockStopEvent object { index, type }` - - `WebFetchBlock object { content, retrieved_at, type, url }` + - `index: number` - - `content: DocumentBlock` + - `type: "content_block_stop"` - - `citations: CitationsConfig or null` + - `"content_block_stop"` - Citation configuration for the document +### Redacted Thinking Block - - `enabled: boolean` +- `RedactedThinkingBlock object { data, type }` - - `source: Base64PDFSource or PlainTextSource` + - `data: string` - - `Base64PDFSource object { data, media_type, type }` + 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. - - `data: string` + Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. - - `media_type: "application/pdf"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. - - `"application/pdf"` + - `type: "redacted_thinking"` - - `type: "base64"` + - `"redacted_thinking"` - - `"base64"` +### Redacted Thinking Block Param - - `PlainTextSource object { data, media_type, type }` +- `RedactedThinkingBlockParam object { data, type }` - - `data: string` + - `data: string` - - `media_type: "text/plain"` + 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. - - `"text/plain"` + - `type: "redacted_thinking"` - - `type: "text"` + - `"redacted_thinking"` - - `"text"` +### Refusal Stop Details - - `title: string or null` +- `RefusalStopDetails object { category, explanation, type }` - The title of the document + Structured information about a refusal. - - `type: "document"` + - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` - - `"document"` + The policy category that triggered a refusal. - - `retrieved_at: string or null` + - `"cyber"` - ISO 8601 timestamp when the content was retrieved + The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. - - `type: "web_fetch_result"` + - `"bio"` - - `"web_fetch_result"` + The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. - - `url: string` + - `"frontier_llm"` - Fetched content URL + 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. - - `tool_use_id: string` + - `"reasoning_extraction"` - - `type: "web_fetch_tool_result"` + 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). - - `"web_fetch_tool_result"` + - `"general_harms"` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. - - `content: CodeExecutionToolResultBlockContent` + - `explanation: string or null` - Code execution result with encrypted stdout for PFC + web_search results. + Human-readable explanation of the refusal. - - `CodeExecutionToolResultError object { error_code, type }` + This text is not guaranteed to be stable. `null` when no explanation is available for the category. - - `error_code: CodeExecutionToolResultErrorCode` + - `type: "refusal"` - - `"invalid_tool_input"` + - `"refusal"` - - `"unavailable"` +### Search Result Block Param - - `"too_many_requests"` +- `SearchResultBlockParam object { content, source, title, 3 more }` - - `"execution_time_exceeded"` + - `content: array of TextBlockParam` - - `type: "code_execution_tool_result_error"` + - `text: string` - - `"code_execution_tool_result_error"` + - `type: "text"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"text"` - - `content: array of CodeExecutionOutputBlock` + - `cache_control: optional CacheControlEphemeral or null` - - `file_id: string` + Create a cache control breakpoint at this content block. - - `type: "code_execution_output"` + - `type: "ephemeral"` - - `"code_execution_output"` + - `"ephemeral"` - - `return_code: number` + - `ttl: optional "5m" or "1h"` - - `stderr: string` + The time-to-live for the cache control breakpoint. - - `stdout: string` + This may be one the following values: - - `type: "code_execution_result"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"code_execution_result"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `"5m"` - Code execution result with encrypted stdout for PFC + web_search results. + - `"1h"` - - `content: array of CodeExecutionOutputBlock` + - `citations: optional array of TextCitationParam or null` - - `file_id: string` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `type: "code_execution_output"` + - `cited_text: string` - - `encrypted_stdout: string` + - `document_index: number` - - `return_code: number` + - `document_title: string or null` - - `stderr: string` + - `end_char_index: number` - - `type: "encrypted_code_execution_result"` + - `start_char_index: number` - - `"encrypted_code_execution_result"` + - `type: "char_location"` - - `tool_use_id: string` + - `"char_location"` - - `type: "code_execution_tool_result"` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"code_execution_tool_result"` + - `cited_text: string` - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `document_index: number` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `document_title: string or null` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `end_page_number: number` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `start_page_number: number` - - `"invalid_tool_input"` + - `type: "page_location"` - - `"unavailable"` + - `"page_location"` - - `"too_many_requests"` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"execution_time_exceeded"` + - `cited_text: string` - - `"output_file_too_large"` + The full text of the cited block range, concatenated. - - `type: "bash_code_execution_tool_result_error"` + 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. - - `"bash_code_execution_tool_result_error"` + - `document_index: number` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `document_title: string or null` - - `content: array of BashCodeExecutionOutputBlock` + - `end_block_index: number` - - `file_id: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "bash_code_execution_output"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"bash_code_execution_output"` + - `start_block_index: number` - - `return_code: number` + 0-based index of the first cited block in the source's `content` array. - - `stderr: string` + - `type: "content_block_location"` - - `stdout: string` + - `"content_block_location"` - - `type: "bash_code_execution_result"` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `"bash_code_execution_result"` + - `cited_text: string` - - `tool_use_id: string` + - `encrypted_index: string` - - `type: "bash_code_execution_tool_result"` + - `title: string or null` - - `"bash_code_execution_tool_result"` + - `type: "web_search_result_location"` - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"web_search_result_location"` - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + - `url: string` - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `cited_text: string` - - `"invalid_tool_input"` + The full text of the cited block range, concatenated. - - `"unavailable"` + 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. - - `"too_many_requests"` + - `end_block_index: number` - - `"execution_time_exceeded"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"file_not_found"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `error_message: string or null` + - `search_result_index: number` - - `type: "text_editor_code_execution_tool_result_error"` + 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. - - `"text_editor_code_execution_tool_result_error"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `source: string` - - `content: string` + - `start_block_index: number` - - `file_type: "text" or "image" or "pdf"` + 0-based index of the first cited block in the source's `content` array. - - `"text"` + - `title: string or null` - - `"image"` + - `type: "search_result_location"` - - `"pdf"` + - `"search_result_location"` - - `num_lines: number or null` + - `source: string` - - `start_line: number or null` + - `title: string` - - `total_lines: number or null` + - `type: "search_result"` - - `type: "text_editor_code_execution_view_result"` + - `"search_result"` - - `"text_editor_code_execution_view_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + Create a cache control breakpoint at this content block. - - `is_file_update: boolean` + - `citations: optional CitationsConfigParam` - - `type: "text_editor_code_execution_create_result"` + - `enabled: optional boolean` - - `"text_editor_code_execution_create_result"` +### Server Tool Caller - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` +- `ServerToolCaller object { tool_id, type }` - - `lines: array of string or null` + Tool invocation generated by a server-side tool. - - `new_lines: number or null` + - `tool_id: string` - - `new_start: number or null` + - `type: "code_execution_20250825"` - - `old_lines: number or null` + - `"code_execution_20250825"` - - `old_start: number or null` +### Server Tool Caller 20260120 - - `type: "text_editor_code_execution_str_replace_result"` +- `ServerToolCaller20260120 object { tool_id, type }` - - `"text_editor_code_execution_str_replace_result"` + - `tool_id: string` - - `tool_use_id: string` + - `type: "code_execution_20260120"` - - `type: "text_editor_code_execution_tool_result"` + - `"code_execution_20260120"` - - `"text_editor_code_execution_tool_result"` +### Server Tool Usage - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` +- `ServerToolUsage object { web_fetch_requests, web_search_requests }` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `web_fetch_requests: number` - - `ToolSearchToolResultError object { error_code, error_message, type }` + The number of web fetch tool requests. - - `error_code: ToolSearchToolResultErrorCode` + - `web_search_requests: number` - - `"invalid_tool_input"` + The number of web search tool requests. - - `"unavailable"` +### Server Tool Use Block - - `"too_many_requests"` +- `ServerToolUseBlock object { id, caller, input, 2 more }` - - `"execution_time_exceeded"` + - `id: string` - - `error_message: string or null` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "tool_search_tool_result_error"` + Tool invocation directly from the model. - - `"tool_search_tool_result_error"` + - `DirectCaller object { type }` - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + Tool invocation directly from the model. - - `tool_references: array of ToolReferenceBlock` + - `type: "direct"` - - `tool_name: string` + - `"direct"` - - `type: "tool_reference"` + - `ServerToolCaller object { tool_id, type }` - - `"tool_reference"` + Tool invocation generated by a server-side tool. - - `type: "tool_search_tool_search_result"` + - `tool_id: string` - - `"tool_search_tool_search_result"` + - `type: "code_execution_20250825"` - - `tool_use_id: string` + - `"code_execution_20250825"` - - `type: "tool_search_tool_result"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"tool_search_tool_result"` + - `tool_id: string` - - `ContainerUploadBlock object { file_id, type }` + - `type: "code_execution_20260120"` - Response model for a file uploaded to the container. + - `"code_execution_20260120"` - - `file_id: string` + - `input: map[unknown]` - - `type: "container_upload"` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `"container_upload"` + - `"web_search"` - - `model: Model` + - `"web_fetch"` - The model that will complete your prompt. + - `"code_execution"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"bash_code_execution"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `"text_editor_code_execution"` - The model that will complete your prompt. + - `"tool_search_tool_regex"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"tool_search_tool_bm25"` - - `"claude-sonnet-5"` + - `type: "server_tool_use"` - High-performance model for coding and agents + - `"server_tool_use"` - - `"claude-fable-5"` +### Server Tool Use Block Param - Next generation of intelligence for the hardest knowledge work and coding problems +- `ServerToolUseBlockParam object { id, input, name, 3 more }` - - `"claude-mythos-5"` + - `id: string` - Most capable model for cybersecurity and biology research + - `input: map[unknown]` - - `"claude-opus-5"` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - Powerful intelligence for long-running agents and coding + - `"web_search"` - - `"claude-opus-4-8"` + - `"web_fetch"` - Powerful intelligence for long-running agents and coding + - `"code_execution"` - - `"claude-opus-4-7"` + - `"bash_code_execution"` - Powerful intelligence for long-running agents and coding + - `"text_editor_code_execution"` - - `"claude-mythos-preview"` + - `"tool_search_tool_regex"` - New class of intelligence, strongest in coding and cybersecurity + - `"tool_search_tool_bm25"` - - `"claude-opus-4-6"` + - `type: "server_tool_use"` - Powerful intelligence for long-running agents and coding + - `"server_tool_use"` - - `"claude-sonnet-4-6"` + - `cache_control: optional CacheControlEphemeral or null` - Best combination of speed and intelligence + Create a cache control breakpoint at this content block. - - `"claude-haiku-4-5"` + - `type: "ephemeral"` - Fastest model with near-frontier intelligence + - `"ephemeral"` - - `"claude-haiku-4-5-20251001"` + - `ttl: optional "5m" or "1h"` - Fastest model with near-frontier intelligence + The time-to-live for the cache control breakpoint. - - `"claude-opus-4-5"` + This may be one the following values: - Powerful intelligence for long-running agents and coding + - `5m`: 5 minutes + - `1h`: 1 hour - - `"claude-opus-4-5-20251101"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Powerful intelligence for long-running agents and coding + - `"5m"` - - `"claude-sonnet-4-5"` + - `"1h"` - High-performance model for agents and coding + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"claude-sonnet-4-5-20250929"` + Tool invocation directly from the model. - High-performance model for agents and coding + - `DirectCaller object { type }` - - `string` + Tool invocation directly from the model. - - `role: "assistant"` + - `type: "direct"` - Conversational role of the generated message. + - `"direct"` - This will always be `"assistant"`. + - `ServerToolCaller object { tool_id, type }` - - `"assistant"` + Tool invocation generated by a server-side tool. - - `stop_details: RefusalStopDetails or null` + - `tool_id: string` - Structured information about a refusal. + - `type: "code_execution_20250825"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `"code_execution_20250825"` - The policy category that triggered a refusal. + - `ServerToolCaller20260120 object { tool_id, type }` - - `"cyber"` + - `tool_id: string` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + - `type: "code_execution_20260120"` - - `"bio"` + - `"code_execution_20260120"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. +### Signature Delta - - `"frontier_llm"` +- `SignatureDelta object { signature, type }` - 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. + - `signature: string` - - `"reasoning_extraction"` + 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. - 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). + - `type: "signature_delta"` - - `"general_harms"` + - `"signature_delta"` - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. +### Skill Params - - `explanation: string or null` +- `SkillParams object { skill_id, type, version }` - Human-readable explanation of the refusal. + Specification for a skill to be loaded in a container (request model). - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `skill_id: string` - - `type: "refusal"` + Skill ID - - `"refusal"` + - `type: "anthropic" or "custom"` - - `stop_reason: StopReason or null` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - The reason that we stopped. + - `"anthropic"` - This may be one the following values: + - `"custom"` - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `version: optional string` - 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. + Skill version or 'latest' for most recent version - - `"end_turn"` +### Stop Reason - - `"max_tokens"` +- `StopReason = "end_turn" or "max_tokens" or "stop_sequence" or 4 more` - - `"stop_sequence"` + - `"end_turn"` - - `"tool_use"` + - `"max_tokens"` - - `"pause_turn"` + - `"stop_sequence"` - - `"refusal"` + - `"tool_use"` - - `"model_context_window_exceeded"` + - `"pause_turn"` - - `stop_sequence: string or null` + - `"refusal"` - Which custom stop sequence was generated, if any. + - `"model_context_window_exceeded"` - This value will be a non-null string if one of your custom stop sequences was generated. +### Text Block - - `type: "message"` +- `TextBlock object { citations, text, type }` - Object type. + - `citations: array of TextCitation or null` - For Messages, this is always `"message"`. + Citations supporting the text block. - - `"message"` + 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`. - - `usage: Usage` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - Billing and rate-limit usage. + - `cited_text: string` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `document_index: number` - 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. + - `document_title: string or null` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `end_char_index: number` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `file_id: string or null` - - `cache_creation: CacheCreation or null` + - `start_char_index: number` - Breakdown of cached tokens by TTL + - `type: "char_location"` - - `ephemeral_1h_input_tokens: number` + - `"char_location"` - The number of input tokens used to create the 1 hour cache entry. + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `ephemeral_5m_input_tokens: number` + - `cited_text: string` - The number of input tokens used to create the 5 minute cache entry. + - `document_index: number` - - `cache_creation_input_tokens: number or null` + - `document_title: string or null` - The number of input tokens used to create the cache entry. + - `end_page_number: number` - - `cache_read_input_tokens: number or null` + - `file_id: string or null` - The number of input tokens read from the cache. + - `start_page_number: number` - - `inference_geo: string or null` + - `type: "page_location"` - The geographic region where inference was performed for this request. + - `"page_location"` - - `input_tokens: number` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - The number of input tokens which were used. + - `cited_text: string` - - `output_tokens: number` + The full text of the cited block range, concatenated. - The number of output tokens which were used. + 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. - - `output_tokens_details: OutputTokensDetails or null` + - `document_index: number` - Breakdown of output tokens by category. + - `document_title: string or null` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `end_block_index: number` - - `thinking_tokens: number` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `file_id: string or null` - - `server_tool_use: ServerToolUsage or null` + - `start_block_index: number` - The number of server tool requests. + 0-based index of the first cited block in the source's `content` array. - - `web_fetch_requests: number` + - `type: "content_block_location"` - The number of web fetch tool requests. + - `"content_block_location"` - - `web_search_requests: number` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - The number of web search tool requests. + - `cited_text: string` - - `service_tier: "standard" or "priority" or "batch" or null` + - `encrypted_index: string` - If the request used the priority, standard, or batch tier. + - `title: string or null` - - `"standard"` + - `type: "web_search_result_location"` - - `"priority"` + - `"web_search_result_location"` - - `"batch"` + - `url: string` - - `type: "message_start"` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `"message_start"` + - `cited_text: string` -### Raw Message Stop Event + The full text of the cited block range, concatenated. -- `RawMessageStopEvent object { type }` + 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. - - `type: "message_stop"` + - `end_block_index: number` - - `"message_stop"` + Exclusive 0-based end index of the cited block range in the source's `content` array. -### Raw Message Stream Event + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. -- `RawMessageStreamEvent = RawMessageStartEvent or RawMessageDeltaEvent or RawMessageStopEvent or 3 more` + - `search_result_index: number` - - `RawMessageStartEvent object { message, type }` + 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. - - `message: Message` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `id: string` + - `source: string` - Unique object identifier. + - `start_block_index: number` - The format and length of IDs may change over time. + 0-based index of the first cited block in the source's `content` array. - - `container: Container or null` + - `title: string or null` - Information about the container used in the request (for the code execution tool) + - `type: "search_result_location"` - - `id: string` + - `"search_result_location"` - Identifier for the container used in this request + - `text: string` - - `expires_at: string` + - `type: "text"` - The time at which the container will expire. + - `"text"` - - `content: array of ContentBlock` +### Text Block Param - Content generated by the model. +- `TextBlockParam object { text, type, cache_control, citations }` - This is an array of content blocks, each of which has a `type` that determines its shape. + - `text: string` - Example: + - `type: "text"` - ```json - [{"type": "text", "text": "Hi, I'm Claude."}] - ``` + - `"text"` - 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. + - `cache_control: optional CacheControlEphemeral or null` - For example, if the input `messages` were: + Create a cache control breakpoint at this content block. - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("} - ] - ``` + - `type: "ephemeral"` - Then the response `content` might be: + - `"ephemeral"` - ```json - [{"type": "text", "text": "B)"}] - ``` + - `ttl: optional "5m" or "1h"` - - `TextBlock object { citations, text, type }` + The time-to-live for the cache control breakpoint. - - `citations: array of TextCitation or null` + This may be one the following values: - Citations supporting the text block. + - `5m`: 5 minutes + - `1h`: 1 hour - 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`. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"5m"` - - `cited_text: string` + - `"1h"` - - `document_index: number` + - `citations: optional array of TextCitationParam or null` - - `document_title: string or null` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `end_char_index: number` + - `cited_text: string` - - `file_id: string or null` + - `document_index: number` - - `start_char_index: number` + - `document_title: string or null` - - `type: "char_location"` + - `end_char_index: number` - - `"char_location"` + - `start_char_index: number` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "char_location"` - - `cited_text: string` + - `"char_location"` - - `document_index: number` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `document_title: string or null` + - `cited_text: string` - - `end_page_number: number` + - `document_index: number` - - `file_id: string or null` + - `document_title: string or null` - - `start_page_number: number` + - `end_page_number: number` - - `type: "page_location"` + - `start_page_number: number` - - `"page_location"` + - `type: "page_location"` - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `"page_location"` - - `cited_text: string` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - The full text of the cited block range, concatenated. + - `cited_text: string` - 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. + The full text of the cited block range, concatenated. - - `document_index: number` + 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. - - `document_title: string or null` + - `document_index: number` - - `end_block_index: number` + - `document_title: string or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `end_block_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `file_id: string or null` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `start_block_index: number` + - `start_block_index: number` - 0-based index of the first cited block in the source's `content` array. + 0-based index of the first cited block in the source's `content` array. - - `type: "content_block_location"` + - `type: "content_block_location"` - - `"content_block_location"` + - `"content_block_location"` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `cited_text: string` + - `cited_text: string` - - `encrypted_index: string` + - `encrypted_index: string` - - `title: string or null` + - `title: string or null` - - `type: "web_search_result_location"` + - `type: "web_search_result_location"` - - `"web_search_result_location"` + - `"web_search_result_location"` - - `url: string` + - `url: string` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `cited_text: string` + - `cited_text: string` - The full text of the cited block range, concatenated. + The full text of the cited block range, concatenated. - 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. + 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. - - `end_block_index: number` + - `end_block_index: number` - Exclusive 0-based end index of the cited block range in the source's `content` array. + Exclusive 0-based end index of the cited block range in the source's `content` array. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `search_result_index: number` + - `search_result_index: number` - 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. + 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. - Counted separately from `document_index`; server-side web search results are not included in this count. + Counted separately from `document_index`; server-side web search results are not included in this count. - - `source: string` + - `source: string` - - `start_block_index: number` + - `start_block_index: number` - 0-based index of the first cited block in the source's `content` array. + 0-based index of the first cited block in the source's `content` array. - - `title: string or null` + - `title: string or null` - - `type: "search_result_location"` + - `type: "search_result_location"` - - `"search_result_location"` + - `"search_result_location"` - - `text: string` +### Text Citation - - `type: "text"` +- `TextCitation = CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` - - `"text"` + - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` - - `ThinkingBlock object { signature, thinking, type }` + - `cited_text: string` - - `signature: string` + - `document_index: number` - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `document_title: string or null` - 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. + - `end_char_index: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `file_id: string or null` - - `thinking: string` + - `start_char_index: number` - The text of Claude's thinking process for this block. + - `type: "char_location"` - - `type: "thinking"` + - `"char_location"` - - `"thinking"` + - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` - - `RedactedThinkingBlock object { data, type }` + - `cited_text: string` - - `data: string` + - `document_index: number` - 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. + - `document_title: string or null` - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + - `end_page_number: number` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. + - `file_id: string or null` - - `type: "redacted_thinking"` + - `start_page_number: number` - - `"redacted_thinking"` + - `type: "page_location"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `"page_location"` - - `id: string` + - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `cited_text: string` - Tool invocation directly from the model. + The full text of the cited block range, concatenated. - - `DirectCaller object { type }` + 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. - Tool invocation directly from the model. + - `document_index: number` - - `type: "direct"` + - `document_title: string or null` - - `"direct"` + - `end_block_index: number` - - `ServerToolCaller object { tool_id, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Tool invocation generated by a server-side tool. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `tool_id: string` + - `file_id: string or null` - - `type: "code_execution_20250825"` + - `start_block_index: number` - - `"code_execution_20250825"` + 0-based index of the first cited block in the source's `content` array. - - `ServerToolCaller20260120 object { tool_id, type }` + - `type: "content_block_location"` - - `tool_id: string` + - `"content_block_location"` - - `type: "code_execution_20260120"` + - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` - - `"code_execution_20260120"` + - `cited_text: string` - - `input: map[unknown]` + - `encrypted_index: string` - - `name: string` + - `title: string or null` - - `type: "tool_use"` + - `type: "web_search_result_location"` - - `"tool_use"` + - `"web_search_result_location"` - - `ServerToolUseBlock object { id, caller, input, 2 more }` + - `url: string` - - `id: string` + - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `cited_text: string` - Tool invocation directly from the model. + The full text of the cited block range, concatenated. - - `DirectCaller object { type }` + 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. - Tool invocation directly from the model. + - `end_block_index: number` - - `ServerToolCaller object { tool_id, type }` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Tool invocation generated by a server-side tool. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `ServerToolCaller20260120 object { tool_id, type }` + - `search_result_index: number` - - `input: map[unknown]` + 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. - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"web_search"` + - `source: string` - - `"web_fetch"` + - `start_block_index: number` - - `"code_execution"` + 0-based index of the first cited block in the source's `content` array. - - `"bash_code_execution"` + - `title: string or null` - - `"text_editor_code_execution"` + - `type: "search_result_location"` - - `"tool_search_tool_regex"` + - `"search_result_location"` - - `"tool_search_tool_bm25"` +### Text Citation Param - - `type: "server_tool_use"` +- `TextCitationParam = CitationCharLocationParam or CitationPageLocationParam or CitationContentBlockLocationParam or 2 more` - - `"server_tool_use"` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `cited_text: string` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `document_index: number` - Tool invocation directly from the model. + - `document_title: string or null` - - `DirectCaller object { type }` + - `end_char_index: number` - Tool invocation directly from the model. + - `start_char_index: number` - - `ServerToolCaller object { tool_id, type }` + - `type: "char_location"` - Tool invocation generated by a server-side tool. + - `"char_location"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `content: WebSearchToolResultBlockContent` + - `cited_text: string` - - `WebSearchToolResultError object { error_code, type }` + - `document_index: number` - - `error_code: WebSearchToolResultErrorCode` + - `document_title: string or null` - - `"invalid_tool_input"` + - `end_page_number: number` - - `"unavailable"` + - `start_page_number: number` - - `"max_uses_exceeded"` + - `type: "page_location"` - - `"too_many_requests"` + - `"page_location"` - - `"query_too_long"` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"request_too_large"` + - `cited_text: string` - - `type: "web_search_tool_result_error"` + The full text of the cited block range, concatenated. - - `"web_search_tool_result_error"` + 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. - - `array of WebSearchResultBlock` + - `document_index: number` - - `encrypted_content: string` + - `document_title: string or null` - - `page_age: string or null` + - `end_block_index: number` - - `title: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `type: "web_search_result"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"web_search_result"` + - `start_block_index: number` - - `url: string` + 0-based index of the first cited block in the source's `content` array. - - `tool_use_id: string` + - `type: "content_block_location"` - - `type: "web_search_tool_result"` + - `"content_block_location"` - - `"web_search_tool_result"` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `cited_text: string` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `encrypted_index: string` - Tool invocation directly from the model. + - `title: string or null` - - `DirectCaller object { type }` + - `type: "web_search_result_location"` - Tool invocation directly from the model. + - `"web_search_result_location"` - - `ServerToolCaller object { tool_id, type }` + - `url: string` - Tool invocation generated by a server-side tool. + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `ServerToolCaller20260120 object { tool_id, type }` + - `cited_text: string` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + The full text of the cited block range, concatenated. - - `WebFetchToolResultErrorBlock object { error_code, type }` + 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. - - `error_code: WebFetchToolResultErrorCode` + - `end_block_index: number` - - `"invalid_tool_input"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"url_too_long"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"url_not_allowed"` + - `search_result_index: number` - - `"url_not_in_prior_context"` + 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. - - `"url_not_accessible"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"unsupported_content_type"` + - `source: string` - - `"too_many_requests"` + - `start_block_index: number` - - `"max_uses_exceeded"` + 0-based index of the first cited block in the source's `content` array. - - `"unavailable"` + - `title: string or null` - - `type: "web_fetch_tool_result_error"` + - `type: "search_result_location"` - - `"web_fetch_tool_result_error"` + - `"search_result_location"` - - `WebFetchBlock object { content, retrieved_at, type, url }` +### Text Delta - - `content: DocumentBlock` +- `TextDelta object { text, type }` - - `citations: CitationsConfig or null` + - `text: string` - Citation configuration for the document + - `type: "text_delta"` - - `enabled: boolean` + - `"text_delta"` - - `source: Base64PDFSource or PlainTextSource` +### Text Editor Code Execution Create Result Block - - `Base64PDFSource object { data, media_type, type }` +- `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `data: string` + - `is_file_update: boolean` - - `media_type: "application/pdf"` + - `type: "text_editor_code_execution_create_result"` - - `"application/pdf"` + - `"text_editor_code_execution_create_result"` - - `type: "base64"` +### Text Editor Code Execution Create Result Block Param - - `"base64"` +- `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `PlainTextSource object { data, media_type, type }` + - `is_file_update: boolean` - - `data: string` + - `type: "text_editor_code_execution_create_result"` - - `media_type: "text/plain"` + - `"text_editor_code_execution_create_result"` - - `"text/plain"` +### Text Editor Code Execution Str Replace Result Block - - `type: "text"` +- `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `"text"` + - `lines: array of string or null` - - `title: string or null` + - `new_lines: number or null` - The title of the document + - `new_start: number or null` - - `type: "document"` + - `old_lines: number or null` - - `"document"` + - `old_start: number or null` - - `retrieved_at: string or null` + - `type: "text_editor_code_execution_str_replace_result"` - ISO 8601 timestamp when the content was retrieved + - `"text_editor_code_execution_str_replace_result"` - - `type: "web_fetch_result"` +### Text Editor Code Execution Str Replace Result Block Param - - `"web_fetch_result"` +- `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `url: string` + - `type: "text_editor_code_execution_str_replace_result"` - Fetched content URL + - `"text_editor_code_execution_str_replace_result"` - - `tool_use_id: string` + - `lines: optional array of string or null` - - `type: "web_fetch_tool_result"` + - `new_lines: optional number or null` - - `"web_fetch_tool_result"` + - `new_start: optional number or null` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `old_lines: optional number or null` - - `content: CodeExecutionToolResultBlockContent` + - `old_start: optional number or null` - Code execution result with encrypted stdout for PFC + web_search results. +### Text Editor Code Execution Tool Result Block - - `CodeExecutionToolResultError object { error_code, type }` +- `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` - - `error_code: CodeExecutionToolResultErrorCode` + - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` - - `"invalid_tool_input"` + - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `"unavailable"` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `"too_many_requests"` + - `"invalid_tool_input"` - - `"execution_time_exceeded"` + - `"unavailable"` - - `type: "code_execution_tool_result_error"` + - `"too_many_requests"` - - `"code_execution_tool_result_error"` + - `"execution_time_exceeded"` - - `CodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `"file_not_found"` - - `content: array of CodeExecutionOutputBlock` + - `error_message: string or null` - - `file_id: string` + - `type: "text_editor_code_execution_tool_result_error"` - - `type: "code_execution_output"` + - `"text_editor_code_execution_tool_result_error"` - - `"code_execution_output"` + - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `return_code: number` + - `content: string` - - `stderr: string` + - `file_type: "text" or "image" or "pdf"` - - `stdout: string` + - `"text"` - - `type: "code_execution_result"` + - `"image"` - - `"code_execution_result"` + - `"pdf"` - - `EncryptedCodeExecutionResultBlock object { content, encrypted_stdout, return_code, 2 more }` + - `num_lines: number or null` - Code execution result with encrypted stdout for PFC + web_search results. + - `start_line: number or null` - - `content: array of CodeExecutionOutputBlock` + - `total_lines: number or null` - - `file_id: string` + - `type: "text_editor_code_execution_view_result"` - - `type: "code_execution_output"` + - `"text_editor_code_execution_view_result"` - - `encrypted_stdout: string` + - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` - - `return_code: number` + - `is_file_update: boolean` - - `stderr: string` + - `type: "text_editor_code_execution_create_result"` - - `type: "encrypted_code_execution_result"` + - `"text_editor_code_execution_create_result"` - - `"encrypted_code_execution_result"` + - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` - - `tool_use_id: string` + - `lines: array of string or null` - - `type: "code_execution_tool_result"` + - `new_lines: number or null` - - `"code_execution_tool_result"` + - `new_start: number or null` - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `old_lines: number or null` - - `content: BashCodeExecutionToolResultError or BashCodeExecutionResultBlock` + - `old_start: number or null` - - `BashCodeExecutionToolResultError object { error_code, type }` + - `type: "text_editor_code_execution_str_replace_result"` - - `error_code: BashCodeExecutionToolResultErrorCode` + - `"text_editor_code_execution_str_replace_result"` - - `"invalid_tool_input"` + - `tool_use_id: string` - - `"unavailable"` + - `type: "text_editor_code_execution_tool_result"` - - `"too_many_requests"` + - `"text_editor_code_execution_tool_result"` - - `"execution_time_exceeded"` +### Text Editor Code Execution Tool Result Block Param - - `"output_file_too_large"` +- `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `type: "bash_code_execution_tool_result_error"` + - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` - - `"bash_code_execution_tool_result_error"` + - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `BashCodeExecutionResultBlock object { content, return_code, stderr, 2 more }` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `content: array of BashCodeExecutionOutputBlock` + - `"invalid_tool_input"` - - `file_id: string` + - `"unavailable"` - - `type: "bash_code_execution_output"` + - `"too_many_requests"` - - `"bash_code_execution_output"` + - `"execution_time_exceeded"` - - `return_code: number` + - `"file_not_found"` - - `stderr: string` + - `type: "text_editor_code_execution_tool_result_error"` - - `stdout: string` + - `"text_editor_code_execution_tool_result_error"` - - `type: "bash_code_execution_result"` + - `error_message: optional string or null` - - `"bash_code_execution_result"` + - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `tool_use_id: string` + - `content: string` - - `type: "bash_code_execution_tool_result"` + - `file_type: "text" or "image" or "pdf"` - - `"bash_code_execution_tool_result"` + - `"text"` - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `"image"` - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + - `"pdf"` - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `type: "text_editor_code_execution_view_result"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `"text_editor_code_execution_view_result"` - - `"invalid_tool_input"` + - `num_lines: optional number or null` - - `"unavailable"` + - `start_line: optional number or null` - - `"too_many_requests"` + - `total_lines: optional number or null` - - `"execution_time_exceeded"` + - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `"file_not_found"` + - `is_file_update: boolean` - - `error_message: string or null` + - `type: "text_editor_code_execution_create_result"` - - `type: "text_editor_code_execution_tool_result_error"` + - `"text_editor_code_execution_create_result"` - - `"text_editor_code_execution_tool_result_error"` + - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `type: "text_editor_code_execution_str_replace_result"` - - `content: string` + - `"text_editor_code_execution_str_replace_result"` - - `file_type: "text" or "image" or "pdf"` + - `lines: optional array of string or null` - - `"text"` + - `new_lines: optional number or null` - - `"image"` + - `new_start: optional number or null` - - `"pdf"` + - `old_lines: optional number or null` - - `num_lines: number or null` + - `old_start: optional number or null` - - `start_line: number or null` + - `tool_use_id: string` - - `total_lines: number or null` + - `type: "text_editor_code_execution_tool_result"` - - `type: "text_editor_code_execution_view_result"` + - `"text_editor_code_execution_tool_result"` - - `"text_editor_code_execution_view_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + Create a cache control breakpoint at this content block. - - `is_file_update: boolean` + - `type: "ephemeral"` - - `type: "text_editor_code_execution_create_result"` + - `"ephemeral"` - - `"text_editor_code_execution_create_result"` + - `ttl: optional "5m" or "1h"` - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + The time-to-live for the cache control breakpoint. - - `lines: array of string or null` + This may be one the following values: - - `new_lines: number or null` + - `5m`: 5 minutes + - `1h`: 1 hour - - `new_start: number or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `old_lines: number or null` + - `"5m"` - - `old_start: number or null` + - `"1h"` - - `type: "text_editor_code_execution_str_replace_result"` +### Text Editor Code Execution Tool Result Error - - `"text_editor_code_execution_str_replace_result"` +- `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` - - `tool_use_id: string` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `type: "text_editor_code_execution_tool_result"` + - `"invalid_tool_input"` - - `"text_editor_code_execution_tool_result"` + - `"unavailable"` - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + - `"too_many_requests"` - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `"execution_time_exceeded"` - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `"file_not_found"` - - `error_code: ToolSearchToolResultErrorCode` + - `error_message: string or null` - - `"invalid_tool_input"` + - `type: "text_editor_code_execution_tool_result_error"` - - `"unavailable"` + - `"text_editor_code_execution_tool_result_error"` - - `"too_many_requests"` +### Text Editor Code Execution Tool Result Error Code - - `"execution_time_exceeded"` +- `TextEditorCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` - - `error_message: string or null` + - `"invalid_tool_input"` - - `type: "tool_search_tool_result_error"` + - `"unavailable"` - - `"tool_search_tool_result_error"` + - `"too_many_requests"` - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `"execution_time_exceeded"` - - `tool_references: array of ToolReferenceBlock` + - `"file_not_found"` - - `tool_name: string` +### Text Editor Code Execution Tool Result Error Param - - `type: "tool_reference"` +- `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `"tool_reference"` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `type: "tool_search_tool_search_result"` + - `"invalid_tool_input"` - - `"tool_search_tool_search_result"` + - `"unavailable"` - - `tool_use_id: string` + - `"too_many_requests"` - - `type: "tool_search_tool_result"` + - `"execution_time_exceeded"` - - `"tool_search_tool_result"` + - `"file_not_found"` - - `ContainerUploadBlock object { file_id, type }` + - `type: "text_editor_code_execution_tool_result_error"` - Response model for a file uploaded to the container. + - `"text_editor_code_execution_tool_result_error"` - - `file_id: string` + - `error_message: optional string or null` - - `type: "container_upload"` +### Text Editor Code Execution View Result Block - - `"container_upload"` +- `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` - - `model: Model` + - `content: string` - The model that will complete your prompt. + - `file_type: "text" or "image" or "pdf"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `"text"` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + - `"image"` - The model that will complete your prompt. + - `"pdf"` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `num_lines: number or null` - - `"claude-sonnet-5"` + - `start_line: number or null` - High-performance model for coding and agents + - `total_lines: number or null` - - `"claude-fable-5"` + - `type: "text_editor_code_execution_view_result"` - Next generation of intelligence for the hardest knowledge work and coding problems + - `"text_editor_code_execution_view_result"` - - `"claude-mythos-5"` +### Text Editor Code Execution View Result Block Param - Most capable model for cybersecurity and biology research +- `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `"claude-opus-5"` + - `content: string` - Powerful intelligence for long-running agents and coding + - `file_type: "text" or "image" or "pdf"` - - `"claude-opus-4-8"` + - `"text"` - Powerful intelligence for long-running agents and coding + - `"image"` - - `"claude-opus-4-7"` + - `"pdf"` - Powerful intelligence for long-running agents and coding + - `type: "text_editor_code_execution_view_result"` - - `"claude-mythos-preview"` + - `"text_editor_code_execution_view_result"` - New class of intelligence, strongest in coding and cybersecurity + - `num_lines: optional number or null` - - `"claude-opus-4-6"` + - `start_line: optional number or null` - Powerful intelligence for long-running agents and coding + - `total_lines: optional number or null` - - `"claude-sonnet-4-6"` +### Thinking Block - Best combination of speed and intelligence +- `ThinkingBlock object { signature, thinking, type }` - - `"claude-haiku-4-5"` + - `signature: string` - Fastest model with near-frontier intelligence + A value used to verify that this thinking block was generated by Claude when it is passed back to the API. - - `"claude-haiku-4-5-20251001"` + 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. - Fastest model with near-frontier intelligence + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"claude-opus-4-5"` + - `thinking: string` - Powerful intelligence for long-running agents and coding + The text of Claude's thinking process for this block. - - `"claude-opus-4-5-20251101"` + - `type: "thinking"` - Powerful intelligence for long-running agents and coding + - `"thinking"` - - `"claude-sonnet-4-5"` +### Thinking Block Param - High-performance model for agents and coding +- `ThinkingBlockParam object { signature, thinking, type }` - - `"claude-sonnet-4-5-20250929"` + - `signature: string` - High-performance model for agents and coding + 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. - - `string` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - - `role: "assistant"` + - `thinking: string` - Conversational role of the generated message. + The `thinking` text of this block as returned by the API. - This will always be `"assistant"`. + - `type: "thinking"` - - `"assistant"` + - `"thinking"` - - `stop_details: RefusalStopDetails or null` +### Thinking Config Adaptive - Structured information about a refusal. +- `ThinkingConfigAdaptive object { type, display }` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `type: "adaptive"` - The policy category that triggered a refusal. + - `"adaptive"` - - `"cyber"` + - `display: optional "summarized" or "omitted" or null` - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. + 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`. - - `"bio"` + - `"summarized"` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `"omitted"` - - `"frontier_llm"` +### Thinking Config Disabled - 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. +- `ThinkingConfigDisabled object { type }` - - `"reasoning_extraction"` + - `type: "disabled"` - 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). + - `"disabled"` - - `"general_harms"` +### Thinking Config Enabled - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. +- `ThinkingConfigEnabled object { budget_tokens, type, display }` - - `explanation: string or null` + - `budget_tokens: number` - Human-readable explanation of the refusal. + 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. - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + Must be ≥1024 and less than `max_tokens`. - - `type: "refusal"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"refusal"` + - `type: "enabled"` - - `stop_reason: StopReason or null` + - `"enabled"` - The reason that we stopped. + - `display: optional "summarized" or "omitted" or null` - This may be one the following values: + 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`. - * `"end_turn"`: the model reached a natural stopping point - * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum - * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated - * `"tool_use"`: the model invoked one or more tools - * `"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. - * `"refusal"`: when streaming classifiers intervene to handle potential policy violations - * `"model_context_window_exceeded"`: we exceeded the model's context window + - `"summarized"` - 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. + - `"omitted"` - - `"end_turn"` +### Thinking Config Param - - `"max_tokens"` +- `ThinkingConfigParam = ThinkingConfigEnabled or ThinkingConfigDisabled or ThinkingConfigAdaptive` - - `"stop_sequence"` + Configuration for enabling Claude's extended thinking. - - `"tool_use"` + 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. - - `"pause_turn"` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `"refusal"` + - `ThinkingConfigEnabled object { budget_tokens, type, display }` - - `"model_context_window_exceeded"` + - `budget_tokens: number` - - `stop_sequence: string or null` + 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. - Which custom stop sequence was generated, if any. + Must be ≥1024 and less than `max_tokens`. - This value will be a non-null string if one of your custom stop sequences was generated. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `type: "message"` + - `type: "enabled"` - Object type. + - `"enabled"` - For Messages, this is always `"message"`. + - `display: optional "summarized" or "omitted" or null` - - `"message"` + 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`. - - `usage: Usage` + - `"summarized"` - Billing and rate-limit usage. + - `"omitted"` - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `ThinkingConfigDisabled object { type }` - 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. + - `type: "disabled"` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + - `"disabled"` - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `ThinkingConfigAdaptive object { type, display }` - - `cache_creation: CacheCreation or null` + - `type: "adaptive"` - Breakdown of cached tokens by TTL + - `"adaptive"` - - `ephemeral_1h_input_tokens: number` + - `display: optional "summarized" or "omitted" or null` - The number of input tokens used to create the 1 hour cache entry. + 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`. - - `ephemeral_5m_input_tokens: number` + - `"summarized"` - The number of input tokens used to create the 5 minute cache entry. + - `"omitted"` - - `cache_creation_input_tokens: number or null` +### Thinking Delta - The number of input tokens used to create the cache entry. +- `ThinkingDelta object { thinking, type }` - - `cache_read_input_tokens: number or null` + - `thinking: string` - The number of input tokens read from the cache. + 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. - - `inference_geo: string or null` + - `type: "thinking_delta"` - The geographic region where inference was performed for this request. + - `"thinking_delta"` - - `input_tokens: number` +### Tool - The number of input tokens which were used. +- `Tool object { input_schema, name, allowed_callers, 7 more }` - - `output_tokens: number` + - `input_schema: object { type, properties, required }` - The number of output tokens which were used. + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. - - `output_tokens_details: OutputTokensDetails or null` + This defines the shape of the `input` that your tool accepts and that the model will produce. - Breakdown of output tokens by category. + - `type: "object"` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `"object"` - - `thinking_tokens: number` + - `properties: optional map[unknown] or null` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `required: optional array of string or null` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `name: string` - - `server_tool_use: ServerToolUsage or null` + Name of the tool. - The number of server tool requests. + This is how the tool will be called by the model and in `tool_use` blocks. - - `web_fetch_requests: number` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - The number of web fetch tool requests. + - `"direct"` - - `web_search_requests: number` + - `"code_execution_20250825"` - The number of web search tool requests. + - `"code_execution_20260120"` - - `service_tier: "standard" or "priority" or "batch" or null` + - `"code_execution_20260521"` - If the request used the priority, standard, or batch tier. + - `cache_control: optional CacheControlEphemeral or null` - - `"standard"` + Create a cache control breakpoint at this content block. - - `"priority"` + - `type: "ephemeral"` - - `"batch"` + - `"ephemeral"` - - `type: "message_start"` + - `ttl: optional "5m" or "1h"` - - `"message_start"` + The time-to-live for the cache control breakpoint. - - `RawMessageDeltaEvent object { delta, type, usage }` + This may be one the following values: - - `delta: object { container, stop_details, stop_reason, stop_sequence }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `container: Container or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - Information about the container used in the request (for the code execution tool) + - `"5m"` - - `stop_details: RefusalStopDetails or null` + - `"1h"` - Structured information about a refusal. + - `defer_loading: optional boolean` - - `stop_reason: StopReason or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `stop_sequence: string or null` + - `description: optional string` - - `type: "message_delta"` + Description of what this tool does. - - `"message_delta"` + 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. - - `usage: MessageDeltaUsage` + - `eager_input_streaming: optional boolean or null` - Billing and rate-limit usage. + 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. - Anthropic's API bills and rate-limits by token counts, as tokens represent the underlying cost to our systems. + - `input_examples: optional array of map[unknown]` - 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. + - `strict: optional boolean` - For example, `output_tokens` will be non-zero, even for an empty string response from Claude. + When true, guarantees schema validation on tool names and inputs - Total input tokens in a request is the summation of `input_tokens`, `cache_creation_input_tokens`, and `cache_read_input_tokens`. + - `type: optional "custom" or null` - - `cache_creation_input_tokens: number or null` + - `"custom"` - The cumulative number of input tokens used to create the cache entry. +### Tool Bash 20250124 - - `cache_read_input_tokens: number or null` +- `ToolBash20250124 object { name, type, allowed_callers, 4 more }` - The cumulative number of input tokens read from the cache. + - `name: "bash"` - - `input_tokens: number or null` + Name of the tool. - The cumulative number of input tokens which were used. + This is how the tool will be called by the model and in `tool_use` blocks. - - `output_tokens: number` + - `"bash"` - The cumulative number of output tokens which were used. + - `type: "bash_20250124"` - - `output_tokens_details: OutputTokensDetails or null` + - `"bash_20250124"` - Breakdown of output tokens by category. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `"direct"` - - `server_tool_use: ServerToolUsage or null` + - `"code_execution_20250825"` - The number of server tool requests. + - `"code_execution_20260120"` - - `RawMessageStopEvent object { type }` + - `"code_execution_20260521"` - - `type: "message_stop"` + - `cache_control: optional CacheControlEphemeral or null` - - `"message_stop"` + Create a cache control breakpoint at this content block. - - `RawContentBlockStartEvent object { content_block, index, type }` + - `type: "ephemeral"` - - `content_block: TextBlock or ThinkingBlock or RedactedThinkingBlock or 9 more` + - `"ephemeral"` - Response model for a file uploaded to the container. + - `ttl: optional "5m" or "1h"` - - `TextBlock object { citations, text, type }` + The time-to-live for the cache control breakpoint. - - `ThinkingBlock object { signature, thinking, type }` + This may be one the following values: - - `RedactedThinkingBlock object { data, type }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `ToolUseBlock object { id, caller, input, 2 more }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `ServerToolUseBlock object { id, caller, input, 2 more }` + - `"5m"` - - `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `"1h"` - - `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` + - `defer_loading: optional boolean` - - `CodeExecutionToolResultBlock object { content, tool_use_id, type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `BashCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `input_examples: optional array of map[unknown]` - - `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + - `strict: optional boolean` - - `ToolSearchToolResultBlock object { content, tool_use_id, type }` + When true, guarantees schema validation on tool names and inputs - - `ContainerUploadBlock object { file_id, type }` +### Tool Choice - Response model for a file uploaded to the container. +- `ToolChoice = ToolChoiceAuto or ToolChoiceAny or ToolChoiceTool or ToolChoiceNone` - - `index: number` + 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. - - `type: "content_block_start"` + - `ToolChoiceAuto object { type, disable_parallel_tool_use }` - - `"content_block_start"` + The model will automatically decide whether to use tools. - - `RawContentBlockDeltaEvent object { delta, index, type }` + - `type: "auto"` - - `delta: RawContentBlockDelta` + - `"auto"` - - `TextDelta object { text, type }` + - `disable_parallel_tool_use: optional boolean` - - `text: string` + Whether to disable parallel tool use. - - `type: "text_delta"` + Defaults to `false`. If set to `true`, the model will output at most one tool use. - - `"text_delta"` + - `ToolChoiceAny object { type, disable_parallel_tool_use }` - - `InputJSONDelta object { partial_json, type }` + The model will use any available tools. - - `partial_json: string` + - `type: "any"` - - `type: "input_json_delta"` + - `"any"` - - `"input_json_delta"` + - `disable_parallel_tool_use: optional boolean` - - `CitationsDelta object { citation, type }` + Whether to disable parallel tool use. - - `citation: CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + The model will use the specified tool with `tool_choice.name`. - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `name: string` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + The name of the tool to use. - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + - `type: "tool"` - - `type: "citations_delta"` + - `"tool"` - - `"citations_delta"` + - `disable_parallel_tool_use: optional boolean` - - `ThinkingDelta object { thinking, type }` + Whether to disable parallel tool use. - - `thinking: string` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - 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. + - `ToolChoiceNone object { type }` - - `type: "thinking_delta"` + The model will not be allowed to use tools. - - `"thinking_delta"` + - `type: "none"` - - `SignatureDelta object { signature, type }` + - `"none"` - - `signature: string` +### Tool Choice Any - 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. +- `ToolChoiceAny object { type, disable_parallel_tool_use }` - - `type: "signature_delta"` + The model will use any available tools. - - `"signature_delta"` + - `type: "any"` - - `index: number` + - `"any"` - - `type: "content_block_delta"` + - `disable_parallel_tool_use: optional boolean` - - `"content_block_delta"` + Whether to disable parallel tool use. - - `RawContentBlockStopEvent object { index, type }` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `index: number` +### Tool Choice Auto - - `type: "content_block_stop"` +- `ToolChoiceAuto object { type, disable_parallel_tool_use }` - - `"content_block_stop"` + The model will automatically decide whether to use tools. -### Redacted Thinking Block + - `type: "auto"` -- `RedactedThinkingBlock object { data, type }` + - `"auto"` - - `data: string` + - `disable_parallel_tool_use: optional boolean` - 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. + Whether to disable parallel tool use. - Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation. + Defaults to `false`. If set to `true`, the model will output at most one tool use. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details. +### Tool Choice None - - `type: "redacted_thinking"` +- `ToolChoiceNone object { type }` - - `"redacted_thinking"` + The model will not be allowed to use tools. -### Redacted Thinking Block Param + - `type: "none"` -- `RedactedThinkingBlockParam object { data, type }` + - `"none"` - - `data: string` +### Tool Choice Tool - 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. +- `ToolChoiceTool object { name, type, disable_parallel_tool_use }` - - `type: "redacted_thinking"` + The model will use the specified tool with `tool_choice.name`. - - `"redacted_thinking"` + - `name: string` -### Refusal Stop Details + The name of the tool to use. -- `RefusalStopDetails object { category, explanation, type }` + - `type: "tool"` - Structured information about a refusal. + - `"tool"` - - `category: "cyber" or "bio" or "frontier_llm" or 2 more or null` + - `disable_parallel_tool_use: optional boolean` - The policy category that triggered a refusal. + Whether to disable parallel tool use. - - `"cyber"` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - The request could enable cyber harm, such as malware or exploit development. Benign cybersecurity work can also trigger this category. +### Tool Reference Block - - `"bio"` +- `ToolReferenceBlock object { tool_name, type }` - The request could enable biological harm, such as dangerous lab methods. Beneficial life sciences work can also trigger this category. + - `tool_name: string` - - `"frontier_llm"` + - `type: "tool_reference"` - 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. + - `"tool_reference"` - - `"reasoning_extraction"` +### Tool Reference Block Param - 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). +- `ToolReferenceBlockParam object { tool_name, type, cache_control }` - - `"general_harms"` + Tool reference block that can be included in tool_result content. - The request could be related to an area that was determined as harmful. Benign work might sometimes trigger this category. + - `tool_name: string` - - `explanation: string or null` + - `type: "tool_reference"` - Human-readable explanation of the refusal. + - `"tool_reference"` - This text is not guaranteed to be stable. `null` when no explanation is available for the category. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "refusal"` + Create a cache control breakpoint at this content block. - - `"refusal"` + - `type: "ephemeral"` -### Search Result Block Param + - `"ephemeral"` -- `SearchResultBlockParam object { content, source, title, 3 more }` + - `ttl: optional "5m" or "1h"` - - `content: array of TextBlockParam` + The time-to-live for the cache control breakpoint. - - `text: string` + This may be one the following values: - - `type: "text"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"text"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `cache_control: optional CacheControlEphemeral or null` + - `"5m"` - Create a cache control breakpoint at this content block. + - `"1h"` - - `type: "ephemeral"` +### Tool Result Block Param - - `"ephemeral"` +- `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - - `ttl: optional "5m" or "1h"` + - `tool_use_id: string` - The time-to-live for the cache control breakpoint. + - `type: "tool_result"` - This may be one the following values: + - `"tool_result"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `cache_control: optional CacheControlEphemeral or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Create a cache control breakpoint at this content block. - - `"5m"` + - `type: "ephemeral"` - - `"1h"` + - `"ephemeral"` - - `citations: optional array of TextCitationParam or null` + - `ttl: optional "5m" or "1h"` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + The time-to-live for the cache control breakpoint. - - `cited_text: string` + This may be one the following values: - - `document_index: number` + - `5m`: 5 minutes + - `1h`: 1 hour - - `document_title: string or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `end_char_index: number` + - `"5m"` - - `start_char_index: number` + - `"1h"` - - `type: "char_location"` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `"char_location"` + - `string` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - - `cited_text: string` + - `TextBlockParam object { text, type, cache_control, citations }` - - `document_index: number` + - `text: string` - - `document_title: string or null` + - `type: "text"` - - `end_page_number: number` + - `"text"` - - `start_page_number: number` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "page_location"` + Create a cache control breakpoint at this content block. - - `"page_location"` + - `citations: optional array of TextCitationParam or null` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `cited_text: string` + - `cited_text: string` - The full text of the cited block range, concatenated. + - `document_index: number` - 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. + - `document_title: string or null` - - `document_index: number` + - `end_char_index: number` - - `document_title: string or null` + - `start_char_index: number` - - `end_block_index: number` + - `type: "char_location"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"char_location"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `start_block_index: number` + - `cited_text: string` - 0-based index of the first cited block in the source's `content` array. + - `document_index: number` - - `type: "content_block_location"` + - `document_title: string or null` - - `"content_block_location"` + - `end_page_number: number` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `start_page_number: number` - - `cited_text: string` + - `type: "page_location"` - - `encrypted_index: string` + - `"page_location"` - - `title: string or null` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `type: "web_search_result_location"` + - `cited_text: string` - - `"web_search_result_location"` + The full text of the cited block range, concatenated. - - `url: string` + 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. - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `document_index: number` - - `cited_text: string` + - `document_title: string or null` - The full text of the cited block range, concatenated. + - `end_block_index: number` - 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. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `end_block_index: number` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `start_block_index: number` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + 0-based index of the first cited block in the source's `content` array. - - `search_result_index: number` + - `type: "content_block_location"` - 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. + - `"content_block_location"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `source: string` + - `cited_text: string` - - `start_block_index: number` + - `encrypted_index: string` - 0-based index of the first cited block in the source's `content` array. + - `title: string or null` - - `title: string or null` + - `type: "web_search_result_location"` - - `type: "search_result_location"` + - `"web_search_result_location"` - - `"search_result_location"` + - `url: string` - - `source: string` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `title: string` + - `cited_text: string` - - `type: "search_result"` + The full text of the cited block range, concatenated. - - `"search_result"` + 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. - - `cache_control: optional CacheControlEphemeral or null` + - `end_block_index: number` - Create a cache control breakpoint at this content block. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `citations: optional CitationsConfigParam` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `enabled: optional boolean` + - `search_result_index: number` -### Server Tool Caller + 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. -- `ServerToolCaller object { tool_id, type }` + Counted separately from `document_index`; server-side web search results are not included in this count. - Tool invocation generated by a server-side tool. + - `source: string` - - `tool_id: string` + - `start_block_index: number` - - `type: "code_execution_20250825"` + 0-based index of the first cited block in the source's `content` array. - - `"code_execution_20250825"` + - `title: string or null` -### Server Tool Caller 20260120 + - `type: "search_result_location"` -- `ServerToolCaller20260120 object { tool_id, type }` + - `"search_result_location"` - - `tool_id: string` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `type: "code_execution_20260120"` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `"code_execution_20260120"` + - `Base64ImageSource object { data, media_type, type }` -### Server Tool Usage + - `data: string` -- `ServerToolUsage object { web_fetch_requests, web_search_requests }` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `web_fetch_requests: number` + - `"image/jpeg"` - The number of web fetch tool requests. + - `"image/png"` - - `web_search_requests: number` + - `"image/gif"` - The number of web search tool requests. + - `"image/webp"` -### Server Tool Use Block + - `type: "base64"` -- `ServerToolUseBlock object { id, caller, input, 2 more }` + - `"base64"` - - `id: string` + - `URLImageSource object { type, url }` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `type: "url"` - Tool invocation directly from the model. + - `"url"` - - `DirectCaller object { type }` + - `url: string` - Tool invocation directly from the model. + - `FileImageSource object { file_id, type }` - - `type: "direct"` + - `file_id: string` - - `"direct"` + - `type: "file"` - - `ServerToolCaller object { tool_id, type }` + - `"file"` - Tool invocation generated by a server-side tool. + - `type: "image"` - - `tool_id: string` + - `"image"` - - `type: "code_execution_20250825"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20250825"` + Create a cache control breakpoint at this content block. - - `ServerToolCaller20260120 object { tool_id, type }` + - `transformations: optional ImageTransformationsParam or null` - - `tool_id: string` + 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. - - `type: "code_execution_20260120"` + - `oversized_image: optional "downsize" or "error"` - - `"code_execution_20260120"` + 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. - - `input: map[unknown]` + - `"downsize"` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `"error"` - - `"web_search"` + - `SearchResultBlockParam object { content, source, title, 3 more }` - - `"web_fetch"` + - `content: array of TextBlockParam` - - `"code_execution"` + - `text: string` - - `"bash_code_execution"` + - `type: "text"` - - `"text_editor_code_execution"` + - `cache_control: optional CacheControlEphemeral or null` - - `"tool_search_tool_regex"` + Create a cache control breakpoint at this content block. - - `"tool_search_tool_bm25"` + - `citations: optional array of TextCitationParam or null` - - `type: "server_tool_use"` + - `source: string` - - `"server_tool_use"` + - `title: string` -### Server Tool Use Block Param + - `type: "search_result"` -- `ServerToolUseBlockParam object { id, input, name, 3 more }` + - `"search_result"` - - `id: string` + - `cache_control: optional CacheControlEphemeral or null` - - `input: map[unknown]` + Create a cache control breakpoint at this content block. - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `citations: optional CitationsConfigParam` - - `"web_search"` + - `enabled: optional boolean` - - `"web_fetch"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `"code_execution"` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `"bash_code_execution"` + - `Base64PDFSource object { data, media_type, type }` - - `"text_editor_code_execution"` + - `data: string` - - `"tool_search_tool_regex"` + - `media_type: "application/pdf"` - - `"tool_search_tool_bm25"` + - `"application/pdf"` - - `type: "server_tool_use"` + - `type: "base64"` - - `"server_tool_use"` + - `"base64"` - - `cache_control: optional CacheControlEphemeral or null` + - `PlainTextSource object { data, media_type, type }` - Create a cache control breakpoint at this content block. + - `data: string` - - `type: "ephemeral"` + - `media_type: "text/plain"` - - `"ephemeral"` + - `"text/plain"` - - `ttl: optional "5m" or "1h"` + - `type: "text"` - The time-to-live for the cache control breakpoint. + - `"text"` - This may be one the following values: + - `ContentBlockSource object { content, type }` - - `5m`: 5 minutes - - `1h`: 1 hour + - `content: string or array of ContentBlockSourceContent` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `string` - - `"5m"` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `"1h"` + - `TextBlockParam object { text, type, cache_control, citations }` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `ImageBlockParam object { source, type, cache_control, transformations }` - Tool invocation directly from the model. + - `type: "content"` - - `DirectCaller object { type }` + - `"content"` - Tool invocation directly from the model. + - `URLPDFSource object { type, url }` - - `type: "direct"` + - `type: "url"` - - `"direct"` + - `"url"` - - `ServerToolCaller object { tool_id, type }` + - `url: string` - Tool invocation generated by a server-side tool. + - `FileDocumentSource object { file_id, type }` - - `tool_id: string` + - `file_id: string` - - `type: "code_execution_20250825"` + - `type: "file"` - - `"code_execution_20250825"` + - `"file"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `type: "document"` - - `tool_id: string` + - `"document"` - - `type: "code_execution_20260120"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20260120"` + Create a cache control breakpoint at this content block. -### Signature Delta + - `citations: optional CitationsConfigParam or null` -- `SignatureDelta object { signature, type }` + - `context: optional string or null` - - `signature: string` + - `title: optional string or null` - 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. + - `ToolReferenceBlockParam object { tool_name, type, cache_control }` - - `type: "signature_delta"` + Tool reference block that can be included in tool_result content. - - `"signature_delta"` + - `tool_name: string` -### Stop Reason + - `type: "tool_reference"` -- `StopReason = "end_turn" or "max_tokens" or "stop_sequence" or 4 more` + - `"tool_reference"` - - `"end_turn"` + - `cache_control: optional CacheControlEphemeral or null` - - `"max_tokens"` + Create a cache control breakpoint at this content block. - - `"stop_sequence"` + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `"tool_use"` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - - `"pause_turn"` + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `"refusal"` + - `tabs: array of BrowserStateTabEntry` - - `"model_context_window_exceeded"` + 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`. -### Text Block + - `tab_id: string` -- `TextBlock object { citations, text, type }` + The caller-assigned identifier for this tab, unique within the inventory. - - `citations: array of TextCitation or null` + - `title: string` - Citations supporting the text block. + The title of the page the tab is showing. May be empty. - 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`. + - `url: string` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + The URL of the page the tab is showing. May be empty. - - `cited_text: string` + - `active: optional boolean` - - `document_index: number` + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `document_title: string or null` + - `type: "browser_state"` - - `end_char_index: number` + - `"browser_state"` - - `file_id: string or null` + - `cache_control: optional CacheControlEphemeral or null` - - `start_char_index: number` + Create a cache control breakpoint at this content block. - - `type: "char_location"` + - `state_changes: optional array of BrowserStateChange or null` - - `"char_location"` + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `BrowserStateChangeTabOpened object { tab_id, type }` - - `cited_text: string` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `document_index: number` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `document_title: string or null` + - `tab_id: string` - - `end_page_number: number` + The `tab_id` of the opened tab, present in `tabs`. - - `file_id: string or null` + - `type: "tab_opened"` - - `start_page_number: number` + - `"tab_opened"` - - `type: "page_location"` + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` - - `"page_location"` + A file download that started during this call. - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `download_id: string` - - `cited_text: string` + The caller-assigned identifier for this download, stable across the state changes reporting it. - The full text of the cited block range, concatenated. + - `type: "download_started"` - 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. + - `"download_started"` - - `document_index: number` + - `url: string` - - `document_title: string or null` + The final post-redirect URL the download was served from. - - `end_block_index: number` + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - Exclusive 0-based end index of the cited block range in the source's `content` array. + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `download_id: string` - - `file_id: string or null` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `start_block_index: number` + - `type: "download_completed"` - 0-based index of the first cited block in the source's `content` array. + - `"download_completed"` - - `type: "content_block_location"` + - `url: string` - - `"content_block_location"` + The final post-redirect URL the download was served from. - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `path: optional string or null` - - `cited_text: string` + 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. - - `encrypted_index: string` + - `size_bytes: optional number or null` - - `title: string or null` + The completed download's size. - - `type: "web_search_result_location"` + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `"web_search_result_location"` + A file download that failed — or was cancelled — during this call. - - `url: string` + - `download_id: string` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `cited_text: string` + - `type: "download_failed"` - The full text of the cited block range, concatenated. + - `"download_failed"` - 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. + - `url: string` - - `end_block_index: number` + The final post-redirect URL the download was served from. - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `error: optional string or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + The failure or cancellation detail, when known. - - `search_result_index: number` + - `is_error: optional boolean` - 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. + - `toolset_name: optional string or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + For a toolset member tool_result, the toolset family of the paired tool_use. - - `source: string` +### Tool Search Tool Bm25 20251119 - - `start_block_index: number` +- `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` - 0-based index of the first cited block in the source's `content` array. + - `name: "tool_search_tool_bm25"` - - `title: string or null` + Name of the tool. - - `type: "search_result_location"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"search_result_location"` + - `"tool_search_tool_bm25"` - - `text: string` + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` - - `type: "text"` + - `"tool_search_tool_bm25_20251119"` - - `"text"` + - `"tool_search_tool_bm25"` -### Text Block Param + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -- `TextBlockParam object { text, type, cache_control, citations }` + - `"direct"` - - `text: string` + - `"code_execution_20250825"` - - `type: "text"` + - `"code_execution_20260120"` - - `"text"` + - `"code_execution_20260521"` - `cache_control: optional CacheControlEphemeral or null` @@ -16143,1998 +22828,2033 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `citations: optional array of TextCitationParam or null` + - `defer_loading: optional boolean` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `cited_text: string` + - `strict: optional boolean` - - `document_index: number` + When true, guarantees schema validation on tool names and inputs - - `document_title: string or null` +### Tool Search Tool Regex 20251119 - - `end_char_index: number` +- `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` - - `start_char_index: number` + - `name: "tool_search_tool_regex"` - - `type: "char_location"` + Name of the tool. - - `"char_location"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"tool_search_tool_regex"` - - `cited_text: string` + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` - - `document_index: number` + - `"tool_search_tool_regex_20251119"` - - `document_title: string or null` + - `"tool_search_tool_regex"` - - `end_page_number: number` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `start_page_number: number` + - `"direct"` - - `type: "page_location"` + - `"code_execution_20250825"` - - `"page_location"` + - `"code_execution_20260120"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"code_execution_20260521"` - - `cited_text: string` + - `cache_control: optional CacheControlEphemeral or null` - The full text of the cited block range, concatenated. + Create a cache control breakpoint at this content block. - 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. + - `type: "ephemeral"` - - `document_index: number` + - `"ephemeral"` - - `document_title: string or null` + - `ttl: optional "5m" or "1h"` - - `end_block_index: number` + The time-to-live for the cache control breakpoint. - Exclusive 0-based end index of the cited block range in the source's `content` array. + This may be one the following values: - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `5m`: 5 minutes + - `1h`: 1 hour - - `start_block_index: number` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - 0-based index of the first cited block in the source's `content` array. + - `"5m"` - - `type: "content_block_location"` + - `"1h"` - - `"content_block_location"` + - `defer_loading: optional boolean` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `cited_text: string` + - `strict: optional boolean` - - `encrypted_index: string` + When true, guarantees schema validation on tool names and inputs - - `title: string or null` +### Tool Search Tool Result Block - - `type: "web_search_result_location"` +- `ToolSearchToolResultBlock object { content, tool_use_id, type }` - - `"web_search_result_location"` + - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` - - `url: string` + - `ToolSearchToolResultError object { error_code, error_message, type }` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `error_code: ToolSearchToolResultErrorCode` - - `cited_text: string` + - `"invalid_tool_input"` - The full text of the cited block range, concatenated. + - `"unavailable"` - 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. + - `"too_many_requests"` - - `end_block_index: number` + - `"execution_time_exceeded"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `error_message: string or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `type: "tool_search_tool_result_error"` - - `search_result_index: number` + - `"tool_search_tool_result_error"` - 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. + - `ToolSearchToolSearchResultBlock object { tool_references, type }` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `tool_references: array of ToolReferenceBlock` + + - `tool_name: string` + + - `type: "tool_reference"` + + - `"tool_reference"` + + - `type: "tool_search_tool_search_result"` + + - `"tool_search_tool_search_result"` + + - `tool_use_id: string` - - `source: string` + - `type: "tool_search_tool_result"` - - `start_block_index: number` + - `"tool_search_tool_result"` - 0-based index of the first cited block in the source's `content` array. +### Tool Search Tool Result Block Param - - `title: string or null` +- `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `type: "search_result_location"` + - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` - - `"search_result_location"` + - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` -### Text Citation + - `error_code: ToolSearchToolResultErrorCode` -- `TextCitation = CitationCharLocation or CitationPageLocation or CitationContentBlockLocation or 2 more` + - `"invalid_tool_input"` - - `CitationCharLocation object { cited_text, document_index, document_title, 4 more }` + - `"unavailable"` - - `cited_text: string` + - `"too_many_requests"` - - `document_index: number` + - `"execution_time_exceeded"` - - `document_title: string or null` + - `type: "tool_search_tool_result_error"` - - `end_char_index: number` + - `"tool_search_tool_result_error"` - - `file_id: string or null` + - `error_message: optional string or null` - - `start_char_index: number` + - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` - - `type: "char_location"` + - `tool_references: array of ToolReferenceBlockParam` - - `"char_location"` + - `tool_name: string` - - `CitationPageLocation object { cited_text, document_index, document_title, 4 more }` + - `type: "tool_reference"` - - `cited_text: string` + - `"tool_reference"` - - `document_index: number` + - `cache_control: optional CacheControlEphemeral or null` - - `document_title: string or null` + Create a cache control breakpoint at this content block. - - `end_page_number: number` + - `type: "ephemeral"` - - `file_id: string or null` + - `"ephemeral"` - - `start_page_number: number` + - `ttl: optional "5m" or "1h"` - - `type: "page_location"` + The time-to-live for the cache control breakpoint. - - `"page_location"` + This may be one the following values: - - `CitationContentBlockLocation object { cited_text, document_index, document_title, 4 more }` + - `5m`: 5 minutes + - `1h`: 1 hour - - `cited_text: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - The full text of the cited block range, concatenated. + - `"5m"` - 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. + - `"1h"` - - `document_index: number` + - `type: "tool_search_tool_search_result"` - - `document_title: string or null` + - `"tool_search_tool_search_result"` - - `end_block_index: number` + - `tool_use_id: string` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "tool_search_tool_result"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"tool_search_tool_result"` - - `file_id: string or null` + - `cache_control: optional CacheControlEphemeral or null` - - `start_block_index: number` + Create a cache control breakpoint at this content block. - 0-based index of the first cited block in the source's `content` array. +### Tool Search Tool Result Error - - `type: "content_block_location"` +- `ToolSearchToolResultError object { error_code, error_message, type }` - - `"content_block_location"` + - `error_code: ToolSearchToolResultErrorCode` - - `CitationsWebSearchResultLocation object { cited_text, encrypted_index, title, 2 more }` + - `"invalid_tool_input"` - - `cited_text: string` + - `"unavailable"` - - `encrypted_index: string` + - `"too_many_requests"` - - `title: string or null` + - `"execution_time_exceeded"` - - `type: "web_search_result_location"` + - `error_message: string or null` - - `"web_search_result_location"` + - `type: "tool_search_tool_result_error"` - - `url: string` + - `"tool_search_tool_result_error"` - - `CitationsSearchResultLocation object { cited_text, end_block_index, search_result_index, 4 more }` +### Tool Search Tool Result Error Code - - `cited_text: string` +- `ToolSearchToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` - The full text of the cited block range, concatenated. + - `"invalid_tool_input"` - 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. + - `"unavailable"` - - `end_block_index: number` + - `"too_many_requests"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"execution_time_exceeded"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. +### Tool Search Tool Result Error Param - - `search_result_index: number` +- `ToolSearchToolResultErrorParam object { error_code, type, error_message }` - 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. + - `error_code: ToolSearchToolResultErrorCode` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"invalid_tool_input"` - - `source: string` + - `"unavailable"` - - `start_block_index: number` + - `"too_many_requests"` - 0-based index of the first cited block in the source's `content` array. + - `"execution_time_exceeded"` - - `title: string or null` + - `type: "tool_search_tool_result_error"` - - `type: "search_result_location"` + - `"tool_search_tool_result_error"` - - `"search_result_location"` + - `error_message: optional string or null` -### Text Citation Param +### Tool Search Tool Search Result Block -- `TextCitationParam = CitationCharLocationParam or CitationPageLocationParam or CitationContentBlockLocationParam or 2 more` +- `ToolSearchToolSearchResultBlock object { tool_references, type }` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_references: array of ToolReferenceBlock` - - `cited_text: string` + - `tool_name: string` - - `document_index: number` + - `type: "tool_reference"` - - `document_title: string or null` + - `"tool_reference"` - - `end_char_index: number` + - `type: "tool_search_tool_search_result"` - - `start_char_index: number` + - `"tool_search_tool_search_result"` - - `type: "char_location"` +### Tool Search Tool Search Result Block Param - - `"char_location"` +- `ToolSearchToolSearchResultBlockParam object { tool_references, type }` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `tool_references: array of ToolReferenceBlockParam` - - `cited_text: string` + - `tool_name: string` - - `document_index: number` + - `type: "tool_reference"` - - `document_title: string or null` + - `"tool_reference"` - - `end_page_number: number` + - `cache_control: optional CacheControlEphemeral or null` - - `start_page_number: number` + Create a cache control breakpoint at this content block. - - `type: "page_location"` + - `type: "ephemeral"` - - `"page_location"` + - `"ephemeral"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `ttl: optional "5m" or "1h"` - - `cited_text: string` + The time-to-live for the cache control breakpoint. - The full text of the cited block range, concatenated. + This may be one the following values: - 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. + - `5m`: 5 minutes + - `1h`: 1 hour - - `document_index: number` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `document_title: string or null` + - `"5m"` - - `end_block_index: number` + - `"1h"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "tool_search_tool_search_result"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"tool_search_tool_search_result"` - - `start_block_index: number` +### Tool Text Editor 20250124 - 0-based index of the first cited block in the source's `content` array. +- `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - - `type: "content_block_location"` + - `name: "str_replace_editor"` - - `"content_block_location"` + Name of the tool. - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `cited_text: string` + - `"str_replace_editor"` - - `encrypted_index: string` + - `type: "text_editor_20250124"` - - `title: string or null` + - `"text_editor_20250124"` - - `type: "web_search_result_location"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"web_search_result_location"` + - `"direct"` - - `url: string` + - `"code_execution_20250825"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `"code_execution_20260120"` - - `cited_text: string` + - `"code_execution_20260521"` - The full text of the cited block range, concatenated. + - `cache_control: optional CacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - - `end_block_index: number` + - `type: "ephemeral"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"ephemeral"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `ttl: optional "5m" or "1h"` - - `search_result_index: number` + The time-to-live for the cache control breakpoint. - 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. + This may be one the following values: - Counted separately from `document_index`; server-side web search results are not included in this count. + - `5m`: 5 minutes + - `1h`: 1 hour - - `source: string` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `start_block_index: number` + - `"5m"` - 0-based index of the first cited block in the source's `content` array. + - `"1h"` - - `title: string or null` + - `defer_loading: optional boolean` - - `type: "search_result_location"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"search_result_location"` + - `input_examples: optional array of map[unknown]` -### Text Delta + - `strict: optional boolean` -- `TextDelta object { text, type }` + When true, guarantees schema validation on tool names and inputs - - `text: string` +### Tool Text Editor 20250429 - - `type: "text_delta"` +- `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` - - `"text_delta"` + - `name: "str_replace_based_edit_tool"` -### Text Editor Code Execution Create Result Block + Name of the tool. -- `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `is_file_update: boolean` + - `"str_replace_based_edit_tool"` - - `type: "text_editor_code_execution_create_result"` + - `type: "text_editor_20250429"` - - `"text_editor_code_execution_create_result"` + - `"text_editor_20250429"` -### Text Editor Code Execution Create Result Block Param + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -- `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `"direct"` - - `is_file_update: boolean` + - `"code_execution_20250825"` - - `type: "text_editor_code_execution_create_result"` + - `"code_execution_20260120"` - - `"text_editor_code_execution_create_result"` + - `"code_execution_20260521"` -### Text Editor Code Execution Str Replace Result Block + - `cache_control: optional CacheControlEphemeral or null` -- `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + Create a cache control breakpoint at this content block. - - `lines: array of string or null` + - `type: "ephemeral"` - - `new_lines: number or null` + - `"ephemeral"` - - `new_start: number or null` + - `ttl: optional "5m" or "1h"` - - `old_lines: number or null` + The time-to-live for the cache control breakpoint. - - `old_start: number or null` + This may be one the following values: - - `type: "text_editor_code_execution_str_replace_result"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"text_editor_code_execution_str_replace_result"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. -### Text Editor Code Execution Str Replace Result Block Param + - `"5m"` -- `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `"1h"` - - `type: "text_editor_code_execution_str_replace_result"` + - `defer_loading: optional boolean` - - `"text_editor_code_execution_str_replace_result"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `lines: optional array of string or null` + - `input_examples: optional array of map[unknown]` - - `new_lines: optional number or null` + - `strict: optional boolean` - - `new_start: optional number or null` + When true, guarantees schema validation on tool names and inputs - - `old_lines: optional number or null` +### Tool Text Editor 20250728 - - `old_start: optional number or null` +- `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` -### Text Editor Code Execution Tool Result Block + - `name: "str_replace_based_edit_tool"` -- `TextEditorCodeExecutionToolResultBlock object { content, tool_use_id, type }` + Name of the tool. - - `content: TextEditorCodeExecutionToolResultError or TextEditorCodeExecutionViewResultBlock or TextEditorCodeExecutionCreateResultBlock or TextEditorCodeExecutionStrReplaceResultBlock` + This is how the tool will be called by the model and in `tool_use` blocks. - - `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `"str_replace_based_edit_tool"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `type: "text_editor_20250728"` - - `"invalid_tool_input"` + - `"text_editor_20250728"` - - `"unavailable"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"too_many_requests"` + - `"direct"` - - `"execution_time_exceeded"` + - `"code_execution_20250825"` - - `"file_not_found"` + - `"code_execution_20260120"` - - `error_message: string or null` + - `"code_execution_20260521"` - - `type: "text_editor_code_execution_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` - - `"text_editor_code_execution_tool_result_error"` + Create a cache control breakpoint at this content block. - - `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `type: "ephemeral"` - - `content: string` + - `"ephemeral"` - - `file_type: "text" or "image" or "pdf"` + - `ttl: optional "5m" or "1h"` - - `"text"` + The time-to-live for the cache control breakpoint. - - `"image"` + This may be one the following values: - - `"pdf"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `num_lines: number or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `start_line: number or null` + - `"5m"` - - `total_lines: number or null` + - `"1h"` - - `type: "text_editor_code_execution_view_result"` + - `defer_loading: optional boolean` - - `"text_editor_code_execution_view_result"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `TextEditorCodeExecutionCreateResultBlock object { is_file_update, type }` + - `input_examples: optional array of map[unknown]` - - `is_file_update: boolean` + - `max_characters: optional number or null` - - `type: "text_editor_code_execution_create_result"` + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. - - `"text_editor_code_execution_create_result"` + - `strict: optional boolean` - - `TextEditorCodeExecutionStrReplaceResultBlock object { lines, new_lines, new_start, 3 more }` + When true, guarantees schema validation on tool names and inputs - - `lines: array of string or null` +### Tool Union - - `new_lines: number or null` +- `ToolUnion = Tool or ToolBash20250124 or CodeExecutionTool20250522 or 18 more` - - `new_start: number or null` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - `old_lines: number or null` + - `Tool object { input_schema, name, allowed_callers, 7 more }` - - `old_start: number or null` + - `input_schema: object { type, properties, required }` - - `type: "text_editor_code_execution_str_replace_result"` + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. - - `"text_editor_code_execution_str_replace_result"` + This defines the shape of the `input` that your tool accepts and that the model will produce. - - `tool_use_id: string` + - `type: "object"` - - `type: "text_editor_code_execution_tool_result"` + - `"object"` - - `"text_editor_code_execution_tool_result"` + - `properties: optional map[unknown] or null` -### Text Editor Code Execution Tool Result Block Param + - `required: optional array of string or null` -- `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `name: string` - - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + Name of the tool. - - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"invalid_tool_input"` + - `"direct"` - - `"unavailable"` + - `"code_execution_20250825"` - - `"too_many_requests"` + - `"code_execution_20260120"` - - `"execution_time_exceeded"` + - `"code_execution_20260521"` - - `"file_not_found"` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "text_editor_code_execution_tool_result_error"` + Create a cache control breakpoint at this content block. - - `"text_editor_code_execution_tool_result_error"` + - `type: "ephemeral"` - - `error_message: optional string or null` + - `"ephemeral"` - - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `ttl: optional "5m" or "1h"` - - `content: string` + The time-to-live for the cache control breakpoint. - - `file_type: "text" or "image" or "pdf"` + This may be one the following values: - - `"text"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `"image"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"pdf"` + - `"5m"` - - `type: "text_editor_code_execution_view_result"` + - `"1h"` - - `"text_editor_code_execution_view_result"` + - `defer_loading: optional boolean` - - `num_lines: optional number or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `start_line: optional number or null` + - `description: optional string` - - `total_lines: optional number or null` + Description of what this tool does. - - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + 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. - - `is_file_update: boolean` + - `eager_input_streaming: optional boolean or null` - - `type: "text_editor_code_execution_create_result"` + 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. - - `"text_editor_code_execution_create_result"` + - `input_examples: optional array of map[unknown]` - - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `strict: optional boolean` - - `type: "text_editor_code_execution_str_replace_result"` + When true, guarantees schema validation on tool names and inputs - - `"text_editor_code_execution_str_replace_result"` + - `type: optional "custom" or null` - - `lines: optional array of string or null` + - `"custom"` - - `new_lines: optional number or null` + - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` - - `new_start: optional number or null` + - `name: "bash"` - - `old_lines: optional number or null` + Name of the tool. - - `old_start: optional number or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `tool_use_id: string` + - `"bash"` - - `type: "text_editor_code_execution_tool_result"` + - `type: "bash_20250124"` - - `"text_editor_code_execution_tool_result"` + - `"bash_20250124"` - - `cache_control: optional CacheControlEphemeral or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - Create a cache control breakpoint at this content block. + - `"direct"` - - `type: "ephemeral"` + - `"code_execution_20250825"` - - `"ephemeral"` + - `"code_execution_20260120"` - - `ttl: optional "5m" or "1h"` + - `"code_execution_20260521"` - The time-to-live for the cache control breakpoint. + - `cache_control: optional CacheControlEphemeral or null` - This may be one the following values: + Create a cache control breakpoint at this content block. - - `5m`: 5 minutes - - `1h`: 1 hour + - `defer_loading: optional boolean` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"5m"` + - `input_examples: optional array of map[unknown]` - - `"1h"` + - `strict: optional boolean` -### Text Editor Code Execution Tool Result Error + When true, guarantees schema validation on tool names and inputs -- `TextEditorCodeExecutionToolResultError object { error_code, error_message, type }` + - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `name: "code_execution"` - - `"invalid_tool_input"` + Name of the tool. - - `"unavailable"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"too_many_requests"` + - `"code_execution"` - - `"execution_time_exceeded"` + - `type: "code_execution_20250522"` - - `"file_not_found"` + - `"code_execution_20250522"` - - `error_message: string or null` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "text_editor_code_execution_tool_result_error"` + - `"direct"` - - `"text_editor_code_execution_tool_result_error"` + - `"code_execution_20250825"` -### Text Editor Code Execution Tool Result Error Code + - `"code_execution_20260120"` -- `TextEditorCodeExecutionToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or 2 more` + - `"code_execution_20260521"` - - `"invalid_tool_input"` + - `cache_control: optional CacheControlEphemeral or null` - - `"unavailable"` + Create a cache control breakpoint at this content block. - - `"too_many_requests"` + - `defer_loading: optional boolean` - - `"execution_time_exceeded"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"file_not_found"` + - `strict: optional boolean` -### Text Editor Code Execution Tool Result Error Param + When true, guarantees schema validation on tool names and inputs -- `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `name: "code_execution"` - - `"invalid_tool_input"` + Name of the tool. - - `"unavailable"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"too_many_requests"` + - `"code_execution"` - - `"execution_time_exceeded"` + - `type: "code_execution_20250825"` - - `"file_not_found"` + - `"code_execution_20250825"` - - `type: "text_editor_code_execution_tool_result_error"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"text_editor_code_execution_tool_result_error"` + - `"direct"` - - `error_message: optional string or null` + - `"code_execution_20250825"` -### Text Editor Code Execution View Result Block + - `"code_execution_20260120"` -- `TextEditorCodeExecutionViewResultBlock object { content, file_type, num_lines, 3 more }` + - `"code_execution_20260521"` - - `content: string` + - `cache_control: optional CacheControlEphemeral or null` - - `file_type: "text" or "image" or "pdf"` + Create a cache control breakpoint at this content block. - - `"text"` + - `defer_loading: optional boolean` - - `"image"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"pdf"` + - `strict: optional boolean` - - `num_lines: number or null` + When true, guarantees schema validation on tool names and inputs - - `start_line: number or null` + - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - `total_lines: number or null` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - `type: "text_editor_code_execution_view_result"` + - `name: "code_execution"` - - `"text_editor_code_execution_view_result"` + Name of the tool. -### Text Editor Code Execution View Result Block Param + This is how the tool will be called by the model and in `tool_use` blocks. -- `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `"code_execution"` - - `content: string` + - `type: "code_execution_20260120"` - - `file_type: "text" or "image" or "pdf"` + - `"code_execution_20260120"` - - `"text"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"image"` + - `"direct"` - - `"pdf"` + - `"code_execution_20250825"` - - `type: "text_editor_code_execution_view_result"` + - `"code_execution_20260120"` - - `"text_editor_code_execution_view_result"` + - `"code_execution_20260521"` - - `num_lines: optional number or null` + - `cache_control: optional CacheControlEphemeral or null` - - `start_line: optional number or null` + Create a cache control breakpoint at this content block. - - `total_lines: optional number or null` + - `defer_loading: optional boolean` -### Thinking Block + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. -- `ThinkingBlock object { signature, thinking, type }` + - `strict: optional boolean` - - `signature: string` + When true, guarantees schema validation on tool names and inputs - A value used to verify that this thinking block was generated by Claude when it is passed back to the API. + - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - 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. + Code execution tool with REPL state persistence. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `name: "code_execution"` - - `thinking: string` + Name of the tool. - The text of Claude's thinking process for this block. + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "thinking"` + - `"code_execution"` - - `"thinking"` + - `type: "code_execution_20260521"` -### Thinking Block Param + - `"code_execution_20260521"` -- `ThinkingBlockParam object { signature, thinking, type }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `signature: string` + - `"direct"` - 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. + - `"code_execution_20250825"` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `"code_execution_20260120"` - - `thinking: string` + - `"code_execution_20260521"` - The `thinking` text of this block as returned by the API. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "thinking"` + Create a cache control breakpoint at this content block. - - `"thinking"` + - `defer_loading: optional boolean` -### Thinking Config Adaptive + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. -- `ThinkingConfigAdaptive object { type, display }` + - `strict: optional boolean` - - `type: "adaptive"` + When true, guarantees schema validation on tool names and inputs - - `"adaptive"` + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `display: optional "summarized" or "omitted" or null` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - 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`. + - `type: "browser_toolset_20260801"` - - `"summarized"` + - `"browser_toolset_20260801"` - - `"omitted"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -### Thinking Config Disabled + - `"direct"` -- `ThinkingConfigDisabled object { type }` + - `"code_execution_20250825"` - - `type: "disabled"` + - `"code_execution_20260120"` - - `"disabled"` + - `"code_execution_20260521"` -### Thinking Config Enabled + - `cache_control: optional CacheControlEphemeral or null` -- `ThinkingConfigEnabled object { budget_tokens, type, display }` + Create a cache control breakpoint at this content block. - - `budget_tokens: number` + - `configs: optional BrowserToolsetConfigs or null` - 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. + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - Must be ≥1024 and less than `max_tokens`. + - `close_tab: optional BrowserCloseTabConfig or null` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + `close_tab`'s config overrides. - - `type: "enabled"` + - `defer_loading: optional boolean or null` - - `"enabled"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `display: optional "summarized" or "omitted" or null` + - `enabled: optional boolean or null` - 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`. + 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. - - `"summarized"` + - `double_click: optional BrowserDoubleClickConfig or null` - - `"omitted"` + `double_click`'s config overrides. -### Thinking Config Param + - `defer_loading: optional boolean or null` -- `ThinkingConfigParam = ThinkingConfigEnabled or ThinkingConfigDisabled or ThinkingConfigAdaptive` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Configuration for enabling Claude's extended thinking. + - `enabled: optional boolean or null` - 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. + 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. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `file_upload: optional BrowserFileUploadConfig or null` - - `ThinkingConfigEnabled object { budget_tokens, type, display }` + `file_upload`'s config overrides. - - `budget_tokens: number` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Must be ≥1024 and less than `max_tokens`. + - `enabled: optional boolean or null` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + 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. - - `type: "enabled"` + - `find: optional BrowserFindConfig or null` - - `"enabled"` + `find`'s config overrides. - - `display: optional "summarized" or "omitted" or null` + - `defer_loading: optional boolean or null` - 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`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"summarized"` + - `enabled: optional boolean or null` - - `"omitted"` + 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. - - `ThinkingConfigDisabled object { type }` + - `form_input: optional BrowserFormInputConfig or null` - - `type: "disabled"` + `form_input`'s config overrides. - - `"disabled"` + - `defer_loading: optional boolean or null` - - `ThinkingConfigAdaptive object { type, display }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "adaptive"` + - `enabled: optional boolean or null` - - `"adaptive"` + 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. - - `display: optional "summarized" or "omitted" or null` + - `get_page_text: optional BrowserGetPageTextConfig or null` - 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`. + `get_page_text`'s config overrides. - - `"summarized"` + - `defer_loading: optional boolean or null` - - `"omitted"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Thinking Delta + - `enabled: optional boolean or null` -- `ThinkingDelta object { thinking, type }` + 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. - - `thinking: string` + - `hold_key: optional BrowserHoldKeyConfig or null` - 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. + `hold_key`'s config overrides. - - `type: "thinking_delta"` + - `defer_loading: optional boolean or null` - - `"thinking_delta"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Tool + - `enabled: optional boolean or null` -- `Tool object { input_schema, name, allowed_callers, 7 more }` + 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. - - `input_schema: object { type, properties, required }` + - `hover: optional BrowserHoverConfig or null` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + `hover`'s config overrides. - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `defer_loading: optional boolean or null` - - `type: "object"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"object"` + - `enabled: optional boolean or null` - - `properties: optional map[unknown] or null` + 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. - - `required: optional array of string or null` + - `javascript_exec: optional BrowserJavascriptExecConfig or null` - - `name: string` + `javascript_exec`'s config overrides. - Name of the tool. + - `defer_loading: optional boolean or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `key: optional BrowserKeyConfig or null` - - `"code_execution_20260120"` + `key`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `left_click: optional BrowserLeftClickConfig or null` - - `ttl: optional "5m" or "1h"` + `left_click`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `left_click_drag: optional BrowserLeftClickDragConfig or null` - - `"1h"` + `left_click_drag`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `description: optional string` + - `enabled: optional boolean or null` - Description of what this tool does. + 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. - 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. + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` - - `eager_input_streaming: optional boolean or null` + `left_mouse_down`'s config overrides. - 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. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. - - `type: optional "custom" or null` + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` - - `"custom"` + `left_mouse_up`'s config overrides. -### Tool Bash 20250124 + - `defer_loading: optional boolean or null` -- `ToolBash20250124 object { name, type, allowed_callers, 4 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "bash"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `list_tabs: optional BrowserListTabsConfig or null` - - `"bash"` + `list_tabs`'s config overrides. - - `type: "bash_20250124"` + - `defer_loading: optional boolean or null` - - `"bash_20250124"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `middle_click: optional BrowserMiddleClickConfig or null` - - `"code_execution_20260120"` + `middle_click`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `mouse_move: optional BrowserMouseMoveConfig or null` - - `ttl: optional "5m" or "1h"` + `mouse_move`'s config overrides. - The time-to-live for the cache control breakpoint. + - `defer_loading: optional boolean or null` - This may be one the following values: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `5m`: 5 minutes - - `1h`: 1 hour + - `enabled: optional boolean or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `navigate: optional BrowserNavigateConfig or null` - - `"1h"` + `navigate`'s config overrides. - - `defer_loading: optional boolean` + - `defer_loading: optional boolean or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `input_examples: optional array of map[unknown]` + - `enabled: optional boolean or null` - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `new_tab: optional BrowserNewTabConfig or null` -### Tool Choice + `new_tab`'s config overrides. -- `ToolChoice = ToolChoiceAuto or ToolChoiceAny or ToolChoiceTool or ToolChoiceNone` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ToolChoiceAuto object { type, disable_parallel_tool_use }` + - `enabled: optional boolean or null` - The model will automatically decide whether to use tools. + 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. - - `type: "auto"` + - `read_console: optional BrowserReadConsoleConfig or null` - - `"auto"` + `read_console`'s config overrides. - - `disable_parallel_tool_use: optional boolean` + - `defer_loading: optional boolean or null` - Whether to disable parallel tool use. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `enabled: optional boolean or null` - - `ToolChoiceAny object { type, disable_parallel_tool_use }` + 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. - The model will use any available tools. + - `read_network: optional BrowserReadNetworkConfig or null` - - `type: "any"` + `read_network`'s config overrides. - - `"any"` + - `defer_loading: optional boolean or null` - - `disable_parallel_tool_use: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Whether to disable parallel tool use. + - `enabled: optional boolean or null` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + 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. - - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` + - `read_page: optional BrowserReadPageConfig or null` - The model will use the specified tool with `tool_choice.name`. + `read_page`'s config overrides. - - `name: string` + - `defer_loading: optional boolean or null` - The name of the tool to use. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "tool"` + - `enabled: optional boolean or null` - - `"tool"` + 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. - - `disable_parallel_tool_use: optional boolean` + - `right_click: optional BrowserRightClickConfig or null` - Whether to disable parallel tool use. + `right_click`'s config overrides. - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `defer_loading: optional boolean or null` - - `ToolChoiceNone object { type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The model will not be allowed to use tools. + - `enabled: optional boolean or null` - - `type: "none"` + 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. - - `"none"` + - `screenshot: optional BrowserScreenshotConfig or null` -### Tool Choice Any + `screenshot`'s config overrides. -- `ToolChoiceAny object { type, disable_parallel_tool_use }` + - `defer_loading: optional boolean or null` - The model will use any available tools. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "any"` + - `enabled: optional boolean or null` - - `"any"` + 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. - - `disable_parallel_tool_use: optional boolean` + - `scroll: optional BrowserScrollConfig or null` - Whether to disable parallel tool use. + `scroll`'s config overrides. - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `defer_loading: optional boolean or null` -### Tool Choice Auto + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -- `ToolChoiceAuto object { type, disable_parallel_tool_use }` + - `enabled: optional boolean or null` - The model will automatically decide whether to use tools. + 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. - - `type: "auto"` + - `scroll_to: optional BrowserScrollToConfig or null` - - `"auto"` + `scroll_to`'s config overrides. - - `disable_parallel_tool_use: optional boolean` + - `defer_loading: optional boolean or null` - Whether to disable parallel tool use. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `enabled: optional boolean or null` -### Tool Choice None + 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. -- `ToolChoiceNone object { type }` + - `switch_tab: optional BrowserSwitchTabConfig or null` - The model will not be allowed to use tools. + `switch_tab`'s config overrides. - - `type: "none"` + - `defer_loading: optional boolean or null` - - `"none"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. -### Tool Choice Tool + - `enabled: optional boolean or null` -- `ToolChoiceTool object { name, type, disable_parallel_tool_use }` + 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. - The model will use the specified tool with `tool_choice.name`. + - `triple_click: optional BrowserTripleClickConfig or null` - - `name: string` + `triple_click`'s config overrides. - The name of the tool to use. + - `defer_loading: optional boolean or null` - - `type: "tool"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"tool"` + - `enabled: optional boolean or null` - - `disable_parallel_tool_use: optional boolean` + 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. - Whether to disable parallel tool use. + - `type: optional BrowserTypeConfig or null` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + `type`'s config overrides. -### Tool Reference Block + - `defer_loading: optional boolean or null` -- `ToolReferenceBlock object { tool_name, type }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_name: string` + - `enabled: optional boolean or null` - - `type: "tool_reference"` + 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. - - `"tool_reference"` + - `wait: optional BrowserWaitConfig or null` -### Tool Reference Block Param + `wait`'s config overrides. -- `ToolReferenceBlockParam object { tool_name, type, cache_control }` + - `defer_loading: optional boolean or null` - Tool reference block that can be included in tool_result content. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_name: string` + - `enabled: optional boolean or null` - - `type: "tool_reference"` + 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. - - `"tool_reference"` + - `zoom: optional BrowserZoomConfig or null` - - `cache_control: optional CacheControlEphemeral or null` + `zoom`'s config overrides. - Create a cache control breakpoint at this content block. + - `defer_loading: optional boolean or null` - - `type: "ephemeral"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"ephemeral"` + - `enabled: optional boolean or null` - - `ttl: optional "5m" or "1h"` + 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. - The time-to-live for the cache control breakpoint. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - This may be one the following values: + - `name: "memory"` - - `5m`: 5 minutes - - `1h`: 1 hour + Name of the tool. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + This is how the tool will be called by the model and in `tool_use` blocks. - - `"5m"` + - `"memory"` - - `"1h"` + - `type: "memory_20250818"` -### Tool Result Block Param + - `"memory_20250818"` -- `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `tool_use_id: string` + - `"direct"` - - `type: "tool_result"` + - `"code_execution_20250825"` - - `"tool_result"` + - `"code_execution_20260120"` - - `cache_control: optional CacheControlEphemeral or null` + - `"code_execution_20260521"` - Create a cache control breakpoint at this content block. + - `cache_control: optional CacheControlEphemeral or null` - - `type: "ephemeral"` + Create a cache control breakpoint at this content block. - - `"ephemeral"` + - `defer_loading: optional boolean` - - `ttl: optional "5m" or "1h"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - The time-to-live for the cache control breakpoint. + - `input_examples: optional array of map[unknown]` - This may be one the following values: + - `strict: optional boolean` - - `5m`: 5 minutes - - `1h`: 1 hour + When true, guarantees schema validation on tool names and inputs - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"5m"` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - - `"1h"` + - `type: "computer_toolset_20260801"` - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `"computer_toolset_20260801"` - - `string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `"direct"` - - `TextBlockParam object { text, type, cache_control, citations }` + - `"code_execution_20250825"` - - `text: string` + - `"code_execution_20260120"` - - `type: "text"` + - `"code_execution_20260521"` - - `"text"` + - `cache_control: optional CacheControlEphemeral or null` - - `cache_control: optional CacheControlEphemeral or null` + Create a cache control breakpoint at this content block. - Create a cache control breakpoint at this content block. + - `configs: optional ComputerToolsetConfigs or null` - - `citations: optional array of TextCitationParam or null` + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `cursor_position: optional ComputerCursorPositionConfig or null` - - `cited_text: string` + `cursor_position`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_char_index: number` + - `enabled: optional boolean or null` - - `start_char_index: number` + 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. - - `type: "char_location"` + - `double_click: optional ComputerDoubleClickConfig or null` - - `"char_location"` + `double_click`'s config overrides. - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `defer_loading: optional boolean or null` - - `cited_text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `document_index: number` + - `enabled: optional boolean or null` - - `document_title: string or null` + 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. - - `end_page_number: number` + - `hold_key: optional ComputerHoldKeyConfig or null` - - `start_page_number: number` + `hold_key`'s config overrides. - - `type: "page_location"` + - `defer_loading: optional boolean or null` - - `"page_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `enabled: optional boolean or null` - - `cited_text: string` + 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. - The full text of the cited block range, concatenated. + - `key: optional ComputerKeyConfig or null` - 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. + `key`'s config overrides. - - `document_index: number` + - `defer_loading: optional boolean or null` - - `document_title: string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_block_index: number` + - `enabled: optional boolean or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `left_click: optional ComputerLeftClickConfig or null` - - `start_block_index: number` + `left_click`'s config overrides. - 0-based index of the first cited block in the source's `content` array. + - `defer_loading: optional boolean or null` - - `type: "content_block_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"content_block_location"` + - `enabled: optional boolean or null` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + 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. - - `cited_text: string` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - - `encrypted_index: string` + `left_click_drag`'s config overrides. - - `title: string or null` + - `defer_loading: optional boolean or null` - - `type: "web_search_result_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"web_search_result_location"` + - `enabled: optional boolean or null` - - `url: string` + 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. - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - - `cited_text: string` + `left_mouse_down`'s config overrides. - The full text of the cited block range, concatenated. + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `end_block_index: number` + - `enabled: optional boolean or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + 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. - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - - `search_result_index: number` + `left_mouse_up`'s config overrides. - 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. + - `defer_loading: optional boolean or null` - Counted separately from `document_index`; server-side web search results are not included in this count. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `source: string` + - `enabled: optional boolean or null` - - `start_block_index: number` + 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. - 0-based index of the first cited block in the source's `content` array. + - `middle_click: optional ComputerMiddleClickConfig or null` - - `title: string or null` + `middle_click`'s config overrides. - - `type: "search_result_location"` + - `defer_loading: optional boolean or null` - - `"search_result_location"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ImageBlockParam object { source, type, cache_control }` + - `enabled: optional boolean or null` - - `source: Base64ImageSource or URLImageSource` + 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. - - `Base64ImageSource object { data, media_type, type }` + - `mouse_move: optional ComputerMouseMoveConfig or null` - - `data: string` + `mouse_move`'s config overrides. - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `defer_loading: optional boolean or null` - - `"image/jpeg"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"image/png"` + - `enabled: optional boolean or null` - - `"image/gif"` + 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. - - `"image/webp"` + - `right_click: optional ComputerRightClickConfig or null` - - `type: "base64"` + `right_click`'s config overrides. - - `"base64"` + - `defer_loading: optional boolean or null` - - `URLImageSource object { type, url }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "url"` + - `enabled: optional boolean or null` - - `"url"` + 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. - - `url: string` + - `screenshot: optional ComputerScreenshotConfig or null` - - `type: "image"` + `screenshot`'s config overrides. - - `"image"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `SearchResultBlockParam object { content, source, title, 3 more }` + 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. - - `content: array of TextBlockParam` + - `scroll: optional ComputerScrollConfig or null` - - `text: string` + `scroll`'s config overrides. - - `type: "text"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `citations: optional array of TextCitationParam or null` + 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. - - `source: string` + - `triple_click: optional ComputerTripleClickConfig or null` - - `title: string` + `triple_click`'s config overrides. - - `type: "search_result"` + - `defer_loading: optional boolean or null` - - `"search_result"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `citations: optional CitationsConfigParam` + - `type: optional ComputerTypeConfig or null` - - `enabled: optional boolean` + `type`'s config overrides. - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `defer_loading: optional boolean or null` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `Base64PDFSource object { data, media_type, type }` + - `enabled: optional boolean or null` - - `data: string` + 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. - - `media_type: "application/pdf"` + - `wait: optional ComputerWaitConfig or null` - - `"application/pdf"` + `wait`'s config overrides. - - `type: "base64"` + - `defer_loading: optional boolean or null` - - `"base64"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `PlainTextSource object { data, media_type, type }` + - `enabled: optional boolean or null` - - `data: string` + 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. - - `media_type: "text/plain"` + - `zoom: optional ComputerZoomConfig or null` - - `"text/plain"` + `zoom`'s config overrides. - - `type: "text"` + - `defer_loading: optional boolean or null` - - `"text"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `ContentBlockSource object { content, type }` + - `enabled: optional boolean or null` - - `content: string or array of ContentBlockSourceContent` + 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. - - `string` + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + - `name: "str_replace_editor"` - - `TextBlockParam object { text, type, cache_control, citations }` + Name of the tool. - - `ImageBlockParam object { source, type, cache_control }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `type: "content"` + - `"str_replace_editor"` - - `"content"` + - `type: "text_editor_20250124"` - - `URLPDFSource object { type, url }` + - `"text_editor_20250124"` - - `type: "url"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"url"` + - `"direct"` - - `url: string` + - `"code_execution_20250825"` - - `type: "document"` + - `"code_execution_20260120"` - - `"document"` + - `"code_execution_20260521"` - - `cache_control: optional CacheControlEphemeral or null` + - `cache_control: optional CacheControlEphemeral or null` - Create a cache control breakpoint at this content block. + Create a cache control breakpoint at this content block. - - `citations: optional CitationsConfigParam or null` + - `defer_loading: optional boolean` - - `context: optional string or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `title: optional string or null` + - `input_examples: optional array of map[unknown]` - - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + - `strict: optional boolean` - Tool reference block that can be included in tool_result content. + When true, guarantees schema validation on tool names and inputs - - `tool_name: string` + - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` - - `type: "tool_reference"` + - `name: "str_replace_based_edit_tool"` - - `"tool_reference"` + Name of the tool. - - `cache_control: optional CacheControlEphemeral or null` + This is how the tool will be called by the model and in `tool_use` blocks. - Create a cache control breakpoint at this content block. + - `"str_replace_based_edit_tool"` - - `is_error: optional boolean` + - `type: "text_editor_20250429"` -### Tool Search Tool Bm25 20251119 + - `"text_editor_20250429"` -- `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `name: "tool_search_tool_bm25"` + - `"direct"` - Name of the tool. + - `"code_execution_20250825"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"code_execution_20260120"` - - `"tool_search_tool_bm25"` + - `"code_execution_20260521"` - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + - `cache_control: optional CacheControlEphemeral or null` - - `"tool_search_tool_bm25_20251119"` + Create a cache control breakpoint at this content block. - - `"tool_search_tool_bm25"` + - `defer_loading: optional boolean` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"direct"` + - `input_examples: optional array of map[unknown]` - - `"code_execution_20250825"` + - `strict: optional boolean` - - `"code_execution_20260120"` + When true, guarantees schema validation on tool names and inputs - - `"code_execution_20260521"` + - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` - - `cache_control: optional CacheControlEphemeral or null` + - `name: "str_replace_based_edit_tool"` - Create a cache control breakpoint at this content block. + Name of the tool. - - `type: "ephemeral"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"ephemeral"` + - `"str_replace_based_edit_tool"` - - `ttl: optional "5m" or "1h"` + - `type: "text_editor_20250728"` - The time-to-live for the cache control breakpoint. + - `"text_editor_20250728"` - This may be one the following values: + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"direct"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"code_execution_20250825"` - - `"5m"` + - `"code_execution_20260120"` - - `"1h"` + - `"code_execution_20260521"` - - `defer_loading: optional boolean` + - `cache_control: optional CacheControlEphemeral or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Create a cache control breakpoint at this content block. - - `strict: optional boolean` + - `defer_loading: optional boolean` - When true, guarantees schema validation on tool names and inputs + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. -### Tool Search Tool Regex 20251119 + - `input_examples: optional array of map[unknown]` -- `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + - `max_characters: optional number or null` - - `name: "tool_search_tool_regex"` + Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. - Name of the tool. + - `strict: optional boolean` - This is how the tool will be called by the model and in `tool_use` blocks. + When true, guarantees schema validation on tool names and inputs - - `"tool_search_tool_regex"` + - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + - `name: "web_search"` - - `"tool_search_tool_regex_20251119"` + Name of the tool. - - `"tool_search_tool_regex"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"web_search"` - - `"direct"` + - `type: "web_search_20250305"` - - `"code_execution_20250825"` + - `"web_search_20250305"` - - `"code_execution_20260120"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"code_execution_20260521"` + - `"direct"` - - `cache_control: optional CacheControlEphemeral or null` + - `"code_execution_20250825"` - Create a cache control breakpoint at this content block. + - `"code_execution_20260120"` - - `type: "ephemeral"` + - `"code_execution_20260521"` - - `"ephemeral"` + - `allowed_domains: optional array of string or null` - - `ttl: optional "5m" or "1h"` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - The time-to-live for the cache control breakpoint. + - `blocked_domains: optional array of string or null` - This may be one the following values: + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - - `5m`: 5 minutes - - `1h`: 1 hour + - `cache_control: optional CacheControlEphemeral or null` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + Create a cache control breakpoint at this content block. - - `"5m"` + - `defer_loading: optional boolean` - - `"1h"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `defer_loading: optional boolean` + - `max_uses: optional number or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Maximum number of times the tool can be used in the API request. - - `strict: optional boolean` + - `strict: optional boolean` - When true, guarantees schema validation on tool names and inputs + When true, guarantees schema validation on tool names and inputs -### Tool Search Tool Result Block + - `user_location: optional UserLocation or null` -- `ToolSearchToolResultBlock object { content, tool_use_id, type }` + Parameters for the user's location. Used to provide more relevant search results. - - `content: ToolSearchToolResultError or ToolSearchToolSearchResultBlock` + - `type: "approximate"` - - `ToolSearchToolResultError object { error_code, error_message, type }` + - `"approximate"` - - `error_code: ToolSearchToolResultErrorCode` + - `city: optional string or null` - - `"invalid_tool_input"` + The city of the user. - - `"unavailable"` + - `country: optional string or null` - - `"too_many_requests"` + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. - - `"execution_time_exceeded"` + - `region: optional string or null` - - `error_message: string or null` + The region of the user. - - `type: "tool_search_tool_result_error"` + - `timezone: optional string or null` - - `"tool_search_tool_result_error"` + The [IANA timezone](https://nodatime.org/TimeZones) of the user. - - `ToolSearchToolSearchResultBlock object { tool_references, type }` + - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` - - `tool_references: array of ToolReferenceBlock` + - `name: "web_fetch"` - - `tool_name: string` + Name of the tool. - - `type: "tool_reference"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"tool_reference"` + - `"web_fetch"` - - `type: "tool_search_tool_search_result"` + - `type: "web_fetch_20250910"` - - `"tool_search_tool_search_result"` + - `"web_fetch_20250910"` - - `tool_use_id: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "tool_search_tool_result"` + - `"direct"` - - `"tool_search_tool_result"` + - `"code_execution_20250825"` -### Tool Search Tool Result Block Param + - `"code_execution_20260120"` -- `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `"code_execution_20260521"` - - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + - `allowed_domains: optional array of string or null` - - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + List of domains to allow fetching from - - `error_code: ToolSearchToolResultErrorCode` + - `blocked_domains: optional array of string or null` - - `"invalid_tool_input"` + List of domains to block fetching from - - `"unavailable"` + - `cache_control: optional CacheControlEphemeral or null` - - `"too_many_requests"` + Create a cache control breakpoint at this content block. - - `"execution_time_exceeded"` + - `citations: optional CitationsConfigParam or null` - - `type: "tool_search_tool_result_error"` + Citations configuration for fetched documents. Citations are disabled by default. - - `"tool_search_tool_result_error"` + - `enabled: optional boolean` - - `error_message: optional string or null` + - `defer_loading: optional boolean` - - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `tool_references: array of ToolReferenceBlockParam` + - `max_content_tokens: optional number or null` - - `tool_name: string` + 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. - - `type: "tool_reference"` + - `max_uses: optional number or null` - - `"tool_reference"` + Maximum number of times the tool can be used in the API request. - - `cache_control: optional CacheControlEphemeral or null` + - `strict: optional boolean` - Create a cache control breakpoint at this content block. + When true, guarantees schema validation on tool names and inputs - - `type: "ephemeral"` + - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` - - `"ephemeral"` + - `name: "web_search"` - - `ttl: optional "5m" or "1h"` + Name of the tool. - The time-to-live for the cache control breakpoint. + This is how the tool will be called by the model and in `tool_use` blocks. - This may be one the following values: + - `"web_search"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "web_search_20260209"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"web_search_20260209"` - - `"5m"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"1h"` + - `"direct"` - - `type: "tool_search_tool_search_result"` + - `"code_execution_20250825"` - - `"tool_search_tool_search_result"` + - `"code_execution_20260120"` - - `tool_use_id: string` + - `"code_execution_20260521"` - - `type: "tool_search_tool_result"` + - `allowed_domains: optional array of string or null` - - `"tool_search_tool_result"` + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - - `cache_control: optional CacheControlEphemeral or null` + - `blocked_domains: optional array of string or null` - Create a cache control breakpoint at this content block. + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. -### Tool Search Tool Result Error + - `cache_control: optional CacheControlEphemeral or null` -- `ToolSearchToolResultError object { error_code, error_message, type }` + Create a cache control breakpoint at this content block. - - `error_code: ToolSearchToolResultErrorCode` + - `defer_loading: optional boolean` - - `"invalid_tool_input"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"unavailable"` + - `max_uses: optional number or null` - - `"too_many_requests"` + Maximum number of times the tool can be used in the API request. - - `"execution_time_exceeded"` + - `strict: optional boolean` - - `error_message: string or null` + When true, guarantees schema validation on tool names and inputs - - `type: "tool_search_tool_result_error"` + - `user_location: optional UserLocation or null` - - `"tool_search_tool_result_error"` + Parameters for the user's location. Used to provide more relevant search results. -### Tool Search Tool Result Error Code + - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` -- `ToolSearchToolResultErrorCode = "invalid_tool_input" or "unavailable" or "too_many_requests" or "execution_time_exceeded"` + - `name: "web_fetch"` - - `"invalid_tool_input"` + Name of the tool. - - `"unavailable"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"too_many_requests"` + - `"web_fetch"` - - `"execution_time_exceeded"` + - `type: "web_fetch_20260209"` -### Tool Search Tool Result Error Param + - `"web_fetch_20260209"` -- `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `error_code: ToolSearchToolResultErrorCode` + - `"direct"` - - `"invalid_tool_input"` + - `"code_execution_20250825"` - - `"unavailable"` + - `"code_execution_20260120"` - - `"too_many_requests"` + - `"code_execution_20260521"` - - `"execution_time_exceeded"` + - `allowed_domains: optional array of string or null` - - `type: "tool_search_tool_result_error"` + List of domains to allow fetching from - - `"tool_search_tool_result_error"` + - `blocked_domains: optional array of string or null` - - `error_message: optional string or null` + List of domains to block fetching from -### Tool Search Tool Search Result Block + - `cache_control: optional CacheControlEphemeral or null` -- `ToolSearchToolSearchResultBlock object { tool_references, type }` + Create a cache control breakpoint at this content block. - - `tool_references: array of ToolReferenceBlock` + - `citations: optional CitationsConfigParam or null` - - `tool_name: string` + Citations configuration for fetched documents. Citations are disabled by default. - - `type: "tool_reference"` + - `defer_loading: optional boolean` - - `"tool_reference"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "tool_search_tool_search_result"` + - `max_content_tokens: optional number or null` - - `"tool_search_tool_search_result"` + 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. -### Tool Search Tool Search Result Block Param + - `max_uses: optional number or null` -- `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + Maximum number of times the tool can be used in the API request. - - `tool_references: array of ToolReferenceBlockParam` + - `strict: optional boolean` - - `tool_name: string` + When true, guarantees schema validation on tool names and inputs - - `type: "tool_reference"` + - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` - - `"tool_reference"` + Web fetch tool with use_cache parameter for bypassing cached content. - - `cache_control: optional CacheControlEphemeral or null` + - `name: "web_fetch"` - Create a cache control breakpoint at this content block. + Name of the tool. - - `type: "ephemeral"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"ephemeral"` + - `"web_fetch"` - - `ttl: optional "5m" or "1h"` + - `type: "web_fetch_20260309"` - The time-to-live for the cache control breakpoint. + - `"web_fetch_20260309"` - This may be one the following values: + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"direct"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"code_execution_20250825"` - - `"5m"` + - `"code_execution_20260120"` - - `"1h"` + - `"code_execution_20260521"` - - `type: "tool_search_tool_search_result"` + - `allowed_domains: optional array of string or null` - - `"tool_search_tool_search_result"` + List of domains to allow fetching from -### Tool Text Editor 20250124 + - `blocked_domains: optional array of string or null` -- `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + List of domains to block fetching from - - `name: "str_replace_editor"` + - `cache_control: optional CacheControlEphemeral or null` - Name of the tool. + Create a cache control breakpoint at this content block. - This is how the tool will be called by the model and in `tool_use` blocks. + - `citations: optional CitationsConfigParam or null` - - `"str_replace_editor"` + Citations configuration for fetched documents. Citations are disabled by default. - - `type: "text_editor_20250124"` + - `defer_loading: optional boolean` - - `"text_editor_20250124"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `max_content_tokens: optional number or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `max_uses: optional number or null` - - `"code_execution_20260120"` + Maximum number of times the tool can be used in the API request. - - `"code_execution_20260521"` + - `strict: optional boolean` - - `cache_control: optional CacheControlEphemeral or null` + When true, guarantees schema validation on tool names and inputs - Create a cache control breakpoint at this content block. + - `use_cache: optional boolean` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` - - `ttl: optional "5m" or "1h"` + - `name: "web_search"` - The time-to-live for the cache control breakpoint. + Name of the tool. - This may be one the following values: + This is how the tool will be called by the model and in `tool_use` blocks. - - `5m`: 5 minutes - - `1h`: 1 hour + - `"web_search"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `type: "web_search_20260318"` - - `"5m"` + - `"web_search_20260318"` - - `"1h"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `defer_loading: optional boolean` + - `"direct"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"code_execution_20250825"` - - `input_examples: optional array of map[unknown]` + - `"code_execution_20260120"` - - `strict: optional boolean` + - `"code_execution_20260521"` - When true, guarantees schema validation on tool names and inputs + - `allowed_domains: optional array of string or null` -### Tool Text Editor 20250429 + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. -- `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + - `blocked_domains: optional array of string or null` - - `name: "str_replace_based_edit_tool"` + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - Name of the tool. + - `cache_control: optional CacheControlEphemeral or null` - This is how the tool will be called by the model and in `tool_use` blocks. + Create a cache control breakpoint at this content block. - - `"str_replace_based_edit_tool"` + - `defer_loading: optional boolean` - - `type: "text_editor_20250429"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"text_editor_20250429"` + - `max_uses: optional number or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Maximum number of times the tool can be used in the API request. - - `"direct"` + - `response_inclusion: optional "full" or "excluded"` - - `"code_execution_20250825"` + 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. - - `"code_execution_20260120"` + - `"full"` - - `"code_execution_20260521"` + - `"excluded"` - - `cache_control: optional CacheControlEphemeral or null` + - `strict: optional boolean` - Create a cache control breakpoint at this content block. + When true, guarantees schema validation on tool names and inputs - - `type: "ephemeral"` + - `user_location: optional UserLocation or null` - - `"ephemeral"` + Parameters for the user's location. Used to provide more relevant search results. - - `ttl: optional "5m" or "1h"` + - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` - The time-to-live for the cache control breakpoint. + - `name: "web_fetch"` - This may be one the following values: + Name of the tool. - - `5m`: 5 minutes - - `1h`: 1 hour + This is how the tool will be called by the model and in `tool_use` blocks. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"web_fetch"` - - `"5m"` + - `type: "web_fetch_20260318"` - - `"1h"` + - `"web_fetch_20260318"` - - `defer_loading: optional boolean` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"direct"` - - `input_examples: optional array of map[unknown]` + - `"code_execution_20250825"` - - `strict: optional boolean` + - `"code_execution_20260120"` - When true, guarantees schema validation on tool names and inputs + - `"code_execution_20260521"` -### Tool Text Editor 20250728 + - `allowed_domains: optional array of string or null` -- `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + List of domains to allow fetching from - - `name: "str_replace_based_edit_tool"` + - `blocked_domains: optional array of string or null` - Name of the tool. + List of domains to block fetching from - This is how the tool will be called by the model and in `tool_use` blocks. + - `cache_control: optional CacheControlEphemeral or null` - - `"str_replace_based_edit_tool"` + Create a cache control breakpoint at this content block. - - `type: "text_editor_20250728"` + - `citations: optional CitationsConfigParam or null` - - `"text_editor_20250728"` + Citations configuration for fetched documents. Citations are disabled by default. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `defer_loading: optional boolean` - - `"direct"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"code_execution_20250825"` + - `max_content_tokens: optional number or null` - - `"code_execution_20260120"` + 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. - - `"code_execution_20260521"` + - `max_uses: optional number or null` - - `cache_control: optional CacheControlEphemeral or null` + Maximum number of times the tool can be used in the API request. - Create a cache control breakpoint at this content block. + - `response_inclusion: optional "full" or "excluded"` - - `type: "ephemeral"` + 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. - - `"ephemeral"` + - `"full"` - - `ttl: optional "5m" or "1h"` + - `"excluded"` - The time-to-live for the cache control breakpoint. + - `strict: optional boolean` - This may be one the following values: + When true, guarantees schema validation on tool names and inputs - - `5m`: 5 minutes - - `1h`: 1 hour + - `use_cache: optional boolean` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + 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. - - `"5m"` + - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` - - `"1h"` + - `name: "tool_search_tool_bm25"` - - `defer_loading: optional boolean` + Name of the tool. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + This is how the tool will be called by the model and in `tool_use` blocks. - - `input_examples: optional array of map[unknown]` + - `"tool_search_tool_bm25"` - - `max_characters: optional number or null` + - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + - `"tool_search_tool_bm25_20251119"` - - `strict: optional boolean` + - `"tool_search_tool_bm25"` - When true, guarantees schema validation on tool names and inputs + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` -### Tool Union + - `"direct"` -- `ToolUnion = Tool or ToolBash20250124 or CodeExecutionTool20250522 or 16 more` + - `"code_execution_20250825"` - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `"code_execution_20260120"` - - `Tool object { input_schema, name, allowed_callers, 7 more }` + - `"code_execution_20260521"` - - `input_schema: object { type, properties, required }` + - `cache_control: optional CacheControlEphemeral or null` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + Create a cache control breakpoint at this content block. - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `defer_loading: optional boolean` - - `type: "object"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"object"` + - `strict: optional boolean` - - `properties: optional map[unknown] or null` + When true, guarantees schema validation on tool names and inputs - - `required: optional array of string or null` + - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` - - `name: string` + - `name: "tool_search_tool_regex"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. + - `"tool_search_tool_regex"` + + - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + + - `"tool_search_tool_regex_20251119"` + + - `"tool_search_tool_regex"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - `"direct"` @@ -18149,900 +24869,933 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ Create a cache control breakpoint at this content block. - - `type: "ephemeral"` + - `defer_loading: optional boolean` - - `"ephemeral"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `ttl: optional "5m" or "1h"` + - `strict: optional boolean` - The time-to-live for the cache control breakpoint. + When true, guarantees schema validation on tool names and inputs - This may be one the following values: +### Tool Use Block - - `5m`: 5 minutes - - `1h`: 1 hour +- `ToolUseBlock object { id, caller, input, 3 more }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `id: string` - - `"5m"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"1h"` + Tool invocation directly from the model. - - `defer_loading: optional boolean` + - `DirectCaller object { type }` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Tool invocation directly from the model. - - `description: optional string` + - `type: "direct"` - Description of what this tool does. + - `"direct"` - 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. + - `ServerToolCaller object { tool_id, type }` - - `eager_input_streaming: optional boolean or null` + Tool invocation generated by a server-side tool. - 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. + - `tool_id: string` - - `input_examples: optional array of map[unknown]` + - `type: "code_execution_20250825"` - - `strict: optional boolean` + - `"code_execution_20250825"` - When true, guarantees schema validation on tool names and inputs + - `ServerToolCaller20260120 object { tool_id, type }` - - `type: optional "custom" or null` + - `tool_id: string` - - `"custom"` + - `type: "code_execution_20260120"` - - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` + - `"code_execution_20260120"` - - `name: "bash"` + - `input: map[unknown]` - Name of the tool. + - `name: string` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "tool_use"` - - `"bash"` + - `"tool_use"` - - `type: "bash_20250124"` + - `toolset_name: optional string or null` - - `"bash_20250124"` + For a toolset member tool_use, the toolset family. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +### Tool Use Block Param - - `"direct"` +- `ToolUseBlockParam object { id, input, name, 4 more }` - - `"code_execution_20250825"` + - `id: string` - - `"code_execution_20260120"` + - `input: map[unknown]` - - `"code_execution_20260521"` + - `name: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "tool_use"` - Create a cache control breakpoint at this content block. + - `"tool_use"` - - `defer_loading: optional boolean` + - `cache_control: optional CacheControlEphemeral or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Create a cache control breakpoint at this content block. - - `input_examples: optional array of map[unknown]` + - `type: "ephemeral"` - - `strict: optional boolean` + - `"ephemeral"` - When true, guarantees schema validation on tool names and inputs + - `ttl: optional "5m" or "1h"` - - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + The time-to-live for the cache control breakpoint. - - `name: "code_execution"` + This may be one the following values: - Name of the tool. + - `5m`: 5 minutes + - `1h`: 1 hour - This is how the tool will be called by the model and in `tool_use` blocks. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"code_execution"` + - `"5m"` - - `type: "code_execution_20250522"` + - `"1h"` - - `"code_execution_20250522"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Tool invocation directly from the model. - - `"direct"` + - `DirectCaller object { type }` - - `"code_execution_20250825"` + Tool invocation directly from the model. - - `"code_execution_20260120"` + - `type: "direct"` - - `"code_execution_20260521"` + - `"direct"` - - `cache_control: optional CacheControlEphemeral or null` + - `ServerToolCaller object { tool_id, type }` - Create a cache control breakpoint at this content block. + Tool invocation generated by a server-side tool. - - `defer_loading: optional boolean` + - `tool_id: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "code_execution_20250825"` - - `strict: optional boolean` + - `"code_execution_20250825"` - When true, guarantees schema validation on tool names and inputs + - `ServerToolCaller20260120 object { tool_id, type }` - - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + - `tool_id: string` - - `name: "code_execution"` + - `type: "code_execution_20260120"` - Name of the tool. + - `"code_execution_20260120"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `toolset_name: optional string or null` - - `"code_execution"` + For a toolset member tool_use, the toolset family this member belongs to. - - `type: "code_execution_20250825"` +### URL Image Source - - `"code_execution_20250825"` +- `URLImageSource object { type, url }` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "url"` - - `"direct"` + - `"url"` - - `"code_execution_20250825"` + - `url: string` - - `"code_execution_20260120"` +### URL PDF Source - - `"code_execution_20260521"` +- `URLPDFSource object { type, url }` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "url"` - Create a cache control breakpoint at this content block. + - `"url"` - - `defer_loading: optional boolean` + - `url: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. +### Usage - - `strict: optional boolean` +- `Usage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 6 more }` - When true, guarantees schema validation on tool names and inputs + - `cache_creation: CacheCreation or null` - - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + Breakdown of cached tokens by TTL - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `ephemeral_1h_input_tokens: number` - - `name: "code_execution"` + The number of input tokens used to create the 1 hour cache entry. - Name of the tool. + - `ephemeral_5m_input_tokens: number` - This is how the tool will be called by the model and in `tool_use` blocks. + The number of input tokens used to create the 5 minute cache entry. - - `"code_execution"` + - `cache_creation_input_tokens: number or null` - - `type: "code_execution_20260120"` + The number of input tokens used to create the cache entry. - - `"code_execution_20260120"` + - `cache_read_input_tokens: number or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + The number of input tokens read from the cache. - - `"direct"` + - `inference_geo: string or null` + + The geographic region where inference was performed for this request. + + - `input_tokens: number` + + The number of input tokens which were used. + + - `output_tokens: number` + + The number of output tokens which were used. + + - `output_tokens_details: OutputTokensDetails or null` + + Breakdown of output tokens by category. + + `output_tokens` remains the inclusive, authoritative total used for billing. + This object provides a read-only decomposition for observability — for example, + how many of the billed output tokens were spent on internal reasoning that may + have been summarized before being returned to you. + + - `thinking_tokens: number` + + Number of output tokens the model generated as internal reasoning, including + the thinking-block delimiter tokens. - - `"code_execution_20250825"` + Reflects the raw reasoning the model produced, not the (possibly shorter) + summarized thinking text returned in the response body. Computed by + re-tokenizing the raw reasoning text, so it may differ from the model's exact + generation count by a small number of tokens. Always ≤ `output_tokens`; + `output_tokens - thinking_tokens` approximates the non-reasoning output. - - `"code_execution_20260120"` + - `server_tool_use: ServerToolUsage or null` - - `"code_execution_20260521"` + The number of server tool requests. - - `cache_control: optional CacheControlEphemeral or null` + - `web_fetch_requests: number` - Create a cache control breakpoint at this content block. + The number of web fetch tool requests. - - `defer_loading: optional boolean` + - `web_search_requests: number` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + The number of web search tool requests. - - `strict: optional boolean` + - `service_tier: "standard" or "priority" or "batch" or null` - When true, guarantees schema validation on tool names and inputs + If the request used the priority, standard, or batch tier. - - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + - `"standard"` - Code execution tool with REPL state persistence. + - `"priority"` - - `name: "code_execution"` + - `"batch"` - Name of the tool. +### User Location - This is how the tool will be called by the model and in `tool_use` blocks. +- `UserLocation object { type, city, country, 2 more }` - - `"code_execution"` + - `type: "approximate"` - - `type: "code_execution_20260521"` + - `"approximate"` - - `"code_execution_20260521"` + - `city: optional string or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + The city of the user. - - `"direct"` + - `country: optional string or null` - - `"code_execution_20250825"` + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. - - `"code_execution_20260120"` + - `region: optional string or null` - - `"code_execution_20260521"` + The region of the user. - - `cache_control: optional CacheControlEphemeral or null` + - `timezone: optional string or null` - Create a cache control breakpoint at this content block. + The [IANA timezone](https://nodatime.org/TimeZones) of the user. - - `defer_loading: optional boolean` +### Web Fetch Block - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. +- `WebFetchBlock object { content, retrieved_at, type, url }` - - `strict: optional boolean` + - `content: DocumentBlock` - When true, guarantees schema validation on tool names and inputs + - `citations: CitationsConfig or null` - - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + Citation configuration for the document - - `name: "memory"` + - `enabled: boolean` - Name of the tool. + - `source: Base64PDFSource or PlainTextSource` - This is how the tool will be called by the model and in `tool_use` blocks. + - `Base64PDFSource object { data, media_type, type }` - - `"memory"` + - `data: string` - - `type: "memory_20250818"` + - `media_type: "application/pdf"` - - `"memory_20250818"` + - `"application/pdf"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "base64"` - - `"direct"` + - `"base64"` - - `"code_execution_20250825"` + - `PlainTextSource object { data, media_type, type }` - - `"code_execution_20260120"` + - `data: string` - - `"code_execution_20260521"` + - `media_type: "text/plain"` - - `cache_control: optional CacheControlEphemeral or null` + - `"text/plain"` - Create a cache control breakpoint at this content block. + - `type: "text"` - - `defer_loading: optional boolean` + - `"text"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `title: string or null` - - `input_examples: optional array of map[unknown]` + The title of the document - - `strict: optional boolean` + - `type: "document"` - When true, guarantees schema validation on tool names and inputs + - `"document"` - - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` + - `retrieved_at: string or null` - - `name: "str_replace_editor"` + ISO 8601 timestamp when the content was retrieved - Name of the tool. + - `type: "web_fetch_result"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"web_fetch_result"` - - `"str_replace_editor"` + - `url: string` - - `type: "text_editor_20250124"` + Fetched content URL - - `"text_editor_20250124"` +### Web Fetch Block Param - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +- `WebFetchBlockParam object { content, type, url, retrieved_at }` - - `"direct"` + - `content: DocumentBlockParam` - - `"code_execution_20250825"` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `"code_execution_20260120"` + - `Base64PDFSource object { data, media_type, type }` - - `"code_execution_20260521"` + - `data: string` - - `cache_control: optional CacheControlEphemeral or null` + - `media_type: "application/pdf"` - Create a cache control breakpoint at this content block. + - `"application/pdf"` - - `defer_loading: optional boolean` + - `type: "base64"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"base64"` - - `input_examples: optional array of map[unknown]` + - `PlainTextSource object { data, media_type, type }` - - `strict: optional boolean` + - `data: string` - When true, guarantees schema validation on tool names and inputs + - `media_type: "text/plain"` - - `ToolTextEditor20250429 object { name, type, allowed_callers, 4 more }` + - `"text/plain"` - - `name: "str_replace_based_edit_tool"` + - `type: "text"` - Name of the tool. + - `"text"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `ContentBlockSource object { content, type }` - - `"str_replace_based_edit_tool"` + - `content: string or array of ContentBlockSourceContent` - - `type: "text_editor_20250429"` + - `string` - - `"text_editor_20250429"` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `TextBlockParam object { text, type, cache_control, citations }` - - `"direct"` + - `text: string` - - `"code_execution_20250825"` + - `type: "text"` - - `"code_execution_20260120"` + - `"text"` - - `"code_execution_20260521"` + - `cache_control: optional CacheControlEphemeral or null` - - `cache_control: optional CacheControlEphemeral or null` + Create a cache control breakpoint at this content block. - Create a cache control breakpoint at this content block. + - `type: "ephemeral"` - - `defer_loading: optional boolean` + - `"ephemeral"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `ttl: optional "5m" or "1h"` - - `input_examples: optional array of map[unknown]` + The time-to-live for the cache control breakpoint. - - `strict: optional boolean` + This may be one the following values: - When true, guarantees schema validation on tool names and inputs + - `5m`: 5 minutes + - `1h`: 1 hour - - `ToolTextEditor20250728 object { name, type, allowed_callers, 5 more }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `name: "str_replace_based_edit_tool"` + - `"5m"` - Name of the tool. + - `"1h"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `citations: optional array of TextCitationParam or null` - - `"str_replace_based_edit_tool"` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `type: "text_editor_20250728"` + - `cited_text: string` - - `"text_editor_20250728"` + - `document_index: number` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `document_title: string or null` - - `"direct"` + - `end_char_index: number` - - `"code_execution_20250825"` + - `start_char_index: number` - - `"code_execution_20260120"` + - `type: "char_location"` - - `"code_execution_20260521"` + - `"char_location"` - - `cache_control: optional CacheControlEphemeral or null` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - Create a cache control breakpoint at this content block. + - `cited_text: string` - - `defer_loading: optional boolean` + - `document_index: number` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `document_title: string or null` - - `input_examples: optional array of map[unknown]` + - `end_page_number: number` - - `max_characters: optional number or null` + - `start_page_number: number` - Maximum number of characters to display when viewing a file. If not specified, defaults to displaying the full file. + - `type: "page_location"` - - `strict: optional boolean` + - `"page_location"` - When true, guarantees schema validation on tool names and inputs + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + - `cited_text: string` - - `name: "web_search"` + The full text of the cited block range, concatenated. - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `document_index: number` - - `"web_search"` + - `document_title: string or null` - - `type: "web_search_20250305"` + - `end_block_index: number` - - `"web_search_20250305"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `"direct"` + - `start_block_index: number` - - `"code_execution_20250825"` + 0-based index of the first cited block in the source's `content` array. - - `"code_execution_20260120"` + - `type: "content_block_location"` - - `"code_execution_20260521"` + - `"content_block_location"` - - `allowed_domains: optional array of string or null` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `cited_text: string` - - `blocked_domains: optional array of string or null` + - `encrypted_index: string` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `title: string or null` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "web_search_result_location"` - Create a cache control breakpoint at this content block. + - `"web_search_result_location"` - - `defer_loading: optional boolean` + - `url: string` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `max_uses: optional number or null` + - `cited_text: string` - Maximum number of times the tool can be used in the API request. + The full text of the cited block range, concatenated. - - `strict: optional boolean` + 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. - When true, guarantees schema validation on tool names and inputs + - `end_block_index: number` - - `user_location: optional UserLocation or null` + Exclusive 0-based end index of the cited block range in the source's `content` array. - Parameters for the user's location. Used to provide more relevant search results. + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "approximate"` + - `search_result_index: number` - - `"approximate"` + 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. - - `city: optional string or null` + Counted separately from `document_index`; server-side web search results are not included in this count. - The city of the user. + - `source: string` - - `country: optional string or null` + - `start_block_index: number` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + 0-based index of the first cited block in the source's `content` array. - - `region: optional string or null` + - `title: string or null` - The region of the user. + - `type: "search_result_location"` - - `timezone: optional string or null` + - `"search_result_location"` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `name: "web_fetch"` + - `Base64ImageSource object { data, media_type, type }` - Name of the tool. + - `data: string` - This is how the tool will be called by the model and in `tool_use` blocks. + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"web_fetch"` + - `"image/jpeg"` - - `type: "web_fetch_20250910"` + - `"image/png"` - - `"web_fetch_20250910"` + - `"image/gif"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"image/webp"` - - `"direct"` + - `type: "base64"` - - `"code_execution_20250825"` + - `"base64"` - - `"code_execution_20260120"` + - `URLImageSource object { type, url }` - - `"code_execution_20260521"` + - `type: "url"` - - `allowed_domains: optional array of string or null` + - `"url"` - List of domains to allow fetching from + - `url: string` - - `blocked_domains: optional array of string or null` + - `FileImageSource object { file_id, type }` - List of domains to block fetching from + - `file_id: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "file"` - Create a cache control breakpoint at this content block. + - `"file"` - - `citations: optional CitationsConfigParam or null` + - `type: "image"` - Citations configuration for fetched documents. Citations are disabled by default. + - `"image"` - - `enabled: optional boolean` + - `cache_control: optional CacheControlEphemeral or null` - - `defer_loading: optional boolean` + Create a cache control breakpoint at this content block. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `transformations: optional ImageTransformationsParam or null` - - `max_content_tokens: optional number or null` + 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. - 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. + - `oversized_image: optional "downsize" or "error"` - - `max_uses: optional number or null` + 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. - Maximum number of times the tool can be used in the API request. + - `"downsize"` - - `strict: optional boolean` + - `"error"` - When true, guarantees schema validation on tool names and inputs + - `type: "content"` - - `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + - `"content"` - - `name: "web_search"` + - `URLPDFSource object { type, url }` - Name of the tool. + - `type: "url"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"url"` - - `"web_search"` + - `url: string` - - `type: "web_search_20260209"` + - `FileDocumentSource object { file_id, type }` - - `"web_search_20260209"` + - `file_id: string` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: "file"` - - `"direct"` + - `"file"` - - `"code_execution_20250825"` + - `type: "document"` - - `"code_execution_20260120"` + - `"document"` - - `"code_execution_20260521"` + - `cache_control: optional CacheControlEphemeral or null` - - `allowed_domains: optional array of string or null` + Create a cache control breakpoint at this content block. - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `citations: optional CitationsConfigParam or null` - - `blocked_domains: optional array of string or null` + - `enabled: optional boolean` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `context: optional string or null` - - `cache_control: optional CacheControlEphemeral or null` + - `title: optional string or null` - Create a cache control breakpoint at this content block. + - `type: "web_fetch_result"` - - `defer_loading: optional boolean` + - `"web_fetch_result"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `url: string` - - `max_uses: optional number or null` + Fetched content URL - Maximum number of times the tool can be used in the API request. + - `retrieved_at: optional string or null` - - `strict: optional boolean` + ISO 8601 timestamp when the content was retrieved - When true, guarantees schema validation on tool names and inputs +### Web Fetch Tool 20250910 - - `user_location: optional UserLocation or null` +- `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` - Parameters for the user's location. Used to provide more relevant search results. + - `name: "web_fetch"` - - `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` + Name of the tool. - - `name: "web_fetch"` + This is how the tool will be called by the model and in `tool_use` blocks. - Name of the tool. + - `"web_fetch"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "web_fetch_20250910"` - - `"web_fetch"` + - `"web_fetch_20250910"` - - `type: "web_fetch_20260209"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"web_fetch_20260209"` + - `"direct"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"code_execution_20250825"` - - `"direct"` + - `"code_execution_20260120"` - - `"code_execution_20250825"` + - `"code_execution_20260521"` - - `"code_execution_20260120"` + - `allowed_domains: optional array of string or null` - - `"code_execution_20260521"` + List of domains to allow fetching from - - `allowed_domains: optional array of string or null` + - `blocked_domains: optional array of string or null` - List of domains to allow fetching from + List of domains to block fetching from - - `blocked_domains: optional array of string or null` + - `cache_control: optional CacheControlEphemeral or null` - List of domains to block fetching from + Create a cache control breakpoint at this content block. - - `cache_control: optional CacheControlEphemeral or null` + - `type: "ephemeral"` - Create a cache control breakpoint at this content block. + - `"ephemeral"` - - `citations: optional CitationsConfigParam or null` + - `ttl: optional "5m" or "1h"` - Citations configuration for fetched documents. Citations are disabled by default. + The time-to-live for the cache control breakpoint. - - `defer_loading: optional boolean` + This may be one the following values: - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `5m`: 5 minutes + - `1h`: 1 hour - - `max_content_tokens: optional number or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - 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. + - `"5m"` - - `max_uses: optional number or null` + - `"1h"` - Maximum number of times the tool can be used in the API request. + - `citations: optional CitationsConfigParam or null` - - `strict: optional boolean` + Citations configuration for fetched documents. Citations are disabled by default. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean` - - `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + - `defer_loading: optional boolean` - Web fetch tool with use_cache parameter for bypassing cached content. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `name: "web_fetch"` + - `max_content_tokens: optional number or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `max_uses: optional number or null` - - `"web_fetch"` + Maximum number of times the tool can be used in the API request. - - `type: "web_fetch_20260309"` + - `strict: optional boolean` - - `"web_fetch_20260309"` + When true, guarantees schema validation on tool names and inputs - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` +### Web Fetch Tool 20260209 - - `"direct"` +- `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` - - `"code_execution_20250825"` + - `name: "web_fetch"` - - `"code_execution_20260120"` + Name of the tool. - - `"code_execution_20260521"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `allowed_domains: optional array of string or null` + - `"web_fetch"` - List of domains to allow fetching from + - `type: "web_fetch_20260209"` - - `blocked_domains: optional array of string or null` + - `"web_fetch_20260209"` - List of domains to block fetching from + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `cache_control: optional CacheControlEphemeral or null` + - `"direct"` - Create a cache control breakpoint at this content block. + - `"code_execution_20250825"` - - `citations: optional CitationsConfigParam or null` + - `"code_execution_20260120"` - Citations configuration for fetched documents. Citations are disabled by default. + - `"code_execution_20260521"` - - `defer_loading: optional boolean` + - `allowed_domains: optional array of string or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + List of domains to allow fetching from - - `max_content_tokens: optional number or null` + - `blocked_domains: optional array of string or null` - 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. + List of domains to block fetching from - - `max_uses: optional number or null` + - `cache_control: optional CacheControlEphemeral or null` - Maximum number of times the tool can be used in the API request. + Create a cache control breakpoint at this content block. - - `strict: optional boolean` + - `type: "ephemeral"` - When true, guarantees schema validation on tool names and inputs + - `"ephemeral"` - - `use_cache: optional boolean` + - `ttl: optional "5m" or "1h"` - 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. + The time-to-live for the cache control breakpoint. - - `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + This may be one the following values: - - `name: "web_search"` + - `5m`: 5 minutes + - `1h`: 1 hour - Name of the tool. + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - This is how the tool will be called by the model and in `tool_use` blocks. + - `"5m"` - - `"web_search"` + - `"1h"` - - `type: "web_search_20260318"` + - `citations: optional CitationsConfigParam or null` - - `"web_search_20260318"` + Citations configuration for fetched documents. Citations are disabled by default. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean` - - `"direct"` + - `defer_loading: optional boolean` - - `"code_execution_20250825"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `"code_execution_20260120"` + - `max_content_tokens: optional number or null` - - `"code_execution_20260521"` + 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. - - `allowed_domains: optional array of string or null` + - `max_uses: optional number or null` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + Maximum number of times the tool can be used in the API request. - - `blocked_domains: optional array of string or null` + - `strict: optional boolean` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + When true, guarantees schema validation on tool names and inputs - - `cache_control: optional CacheControlEphemeral or null` +### Web Fetch Tool 20260309 - Create a cache control breakpoint at this content block. +- `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` - - `defer_loading: optional boolean` + Web fetch tool with use_cache parameter for bypassing cached content. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `name: "web_fetch"` - - `max_uses: optional number or null` + Name of the tool. - Maximum number of times the tool can be used in the API request. + This is how the tool will be called by the model and in `tool_use` blocks. - - `response_inclusion: optional "full" or "excluded"` + - `"web_fetch"` - 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. + - `type: "web_fetch_20260309"` - - `"full"` + - `"web_fetch_20260309"` - - `"excluded"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `strict: optional boolean` + - `"direct"` - When true, guarantees schema validation on tool names and inputs + - `"code_execution_20250825"` - - `user_location: optional UserLocation or null` + - `"code_execution_20260120"` - Parameters for the user's location. Used to provide more relevant search results. + - `"code_execution_20260521"` - - `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + - `allowed_domains: optional array of string or null` - - `name: "web_fetch"` + List of domains to allow fetching from - Name of the tool. + - `blocked_domains: optional array of string or null` - This is how the tool will be called by the model and in `tool_use` blocks. + List of domains to block fetching from - - `"web_fetch"` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "web_fetch_20260318"` + Create a cache control breakpoint at this content block. - - `"web_fetch_20260318"` + - `type: "ephemeral"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"ephemeral"` - - `"direct"` + - `ttl: optional "5m" or "1h"` - - `"code_execution_20250825"` + The time-to-live for the cache control breakpoint. - - `"code_execution_20260120"` + This may be one the following values: - - `"code_execution_20260521"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `allowed_domains: optional array of string or null` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - List of domains to allow fetching from + - `"5m"` - - `blocked_domains: optional array of string or null` + - `"1h"` - List of domains to block fetching from + - `citations: optional CitationsConfigParam or null` - - `cache_control: optional CacheControlEphemeral or null` + Citations configuration for fetched documents. Citations are disabled by default. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean` - - `citations: optional CitationsConfigParam or null` + - `defer_loading: optional boolean` - Citations configuration for fetched documents. Citations are disabled by default. + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `defer_loading: optional boolean` + - `max_content_tokens: optional number or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + 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. - - `max_content_tokens: optional number or null` + - `max_uses: optional number or null` - 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. + Maximum number of times the tool can be used in the API request. - - `max_uses: optional number or null` + - `strict: optional boolean` - Maximum number of times the tool can be used in the API request. + When true, guarantees schema validation on tool names and inputs - - `response_inclusion: optional "full" or "excluded"` + - `use_cache: optional boolean` - 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. + 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. - - `"full"` +### Web Fetch Tool 20260318 - - `"excluded"` +- `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` - - `strict: optional boolean` + - `name: "web_fetch"` - When true, guarantees schema validation on tool names and inputs + Name of the tool. - - `use_cache: optional boolean` + This is how the tool will be called by the model and in `tool_use` blocks. - 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. + - `"web_fetch"` - - `ToolSearchToolBm25_20251119 object { name, type, allowed_callers, 3 more }` + - `type: "web_fetch_20260318"` - - `name: "tool_search_tool_bm25"` + - `"web_fetch_20260318"` - Name of the tool. + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"direct"` - - `"tool_search_tool_bm25"` + - `"code_execution_20250825"` - - `type: "tool_search_tool_bm25_20251119" or "tool_search_tool_bm25"` + - `"code_execution_20260120"` - - `"tool_search_tool_bm25_20251119"` + - `"code_execution_20260521"` - - `"tool_search_tool_bm25"` + - `allowed_domains: optional array of string or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + List of domains to allow fetching from - - `"direct"` + - `blocked_domains: optional array of string or null` - - `"code_execution_20250825"` + List of domains to block fetching from - - `"code_execution_20260120"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20260521"` + Create a cache control breakpoint at this content block. - - `cache_control: optional CacheControlEphemeral or null` + - `type: "ephemeral"` - Create a cache control breakpoint at this content block. + - `"ephemeral"` - - `defer_loading: optional boolean` + - `ttl: optional "5m" or "1h"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + The time-to-live for the cache control breakpoint. - - `strict: optional boolean` + This may be one the following values: - When true, guarantees schema validation on tool names and inputs + - `5m`: 5 minutes + - `1h`: 1 hour - - `ToolSearchToolRegex20251119 object { name, type, allowed_callers, 3 more }` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `name: "tool_search_tool_regex"` + - `"5m"` - Name of the tool. + - `"1h"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `citations: optional CitationsConfigParam or null` - - `"tool_search_tool_regex"` + Citations configuration for fetched documents. Citations are disabled by default. - - `type: "tool_search_tool_regex_20251119" or "tool_search_tool_regex"` + - `enabled: optional boolean` - - `"tool_search_tool_regex_20251119"` + - `defer_loading: optional boolean` - - `"tool_search_tool_regex"` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `max_content_tokens: optional number or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `max_uses: optional number or null` - - `"code_execution_20260120"` + Maximum number of times the tool can be used in the API request. - - `"code_execution_20260521"` + - `response_inclusion: optional "full" or "excluded"` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `"full"` - - `defer_loading: optional boolean` + - `"excluded"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `strict: optional boolean` - - `strict: optional boolean` + When true, guarantees schema validation on tool names and inputs - When true, guarantees schema validation on tool names and inputs + - `use_cache: optional boolean` -### Tool Use Block + 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. -- `ToolUseBlock object { id, caller, input, 2 more }` +### Web Fetch Tool Result Block - - `id: string` +- `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` @@ -19074,610 +25827,574 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"code_execution_20260120"` - - `input: map[unknown]` - - - `name: string` - - - `type: "tool_use"` - - - `"tool_use"` - -### Tool Use Block Param - -- `ToolUseBlockParam object { id, input, name, 3 more }` - - - `id: string` - - - `input: map[unknown]` - - - `name: string` - - - `type: "tool_use"` - - - `"tool_use"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `type: "ephemeral"` + - `content: WebFetchToolResultErrorBlock or WebFetchBlock` - - `"ephemeral"` + - `WebFetchToolResultErrorBlock object { error_code, type }` - - `ttl: optional "5m" or "1h"` + - `error_code: WebFetchToolResultErrorCode` - The time-to-live for the cache control breakpoint. + - `"invalid_tool_input"` - This may be one the following values: + - `"url_too_long"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"url_not_allowed"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"url_not_in_prior_context"` - - `"5m"` + - `"url_not_accessible"` - - `"1h"` + - `"unsupported_content_type"` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `"too_many_requests"` - Tool invocation directly from the model. + - `"max_uses_exceeded"` - - `DirectCaller object { type }` + - `"unavailable"` - Tool invocation directly from the model. + - `type: "web_fetch_tool_result_error"` - - `type: "direct"` + - `"web_fetch_tool_result_error"` - - `"direct"` + - `WebFetchBlock object { content, retrieved_at, type, url }` - - `ServerToolCaller object { tool_id, type }` + - `content: DocumentBlock` - Tool invocation generated by a server-side tool. + - `citations: CitationsConfig or null` - - `tool_id: string` + Citation configuration for the document - - `type: "code_execution_20250825"` + - `enabled: boolean` - - `"code_execution_20250825"` + - `source: Base64PDFSource or PlainTextSource` - - `ServerToolCaller20260120 object { tool_id, type }` + - `Base64PDFSource object { data, media_type, type }` - - `tool_id: string` + - `data: string` - - `type: "code_execution_20260120"` + - `media_type: "application/pdf"` - - `"code_execution_20260120"` + - `"application/pdf"` -### URL Image Source + - `type: "base64"` -- `URLImageSource object { type, url }` + - `"base64"` - - `type: "url"` + - `PlainTextSource object { data, media_type, type }` - - `"url"` + - `data: string` - - `url: string` + - `media_type: "text/plain"` -### URL PDF Source + - `"text/plain"` -- `URLPDFSource object { type, url }` + - `type: "text"` - - `type: "url"` + - `"text"` - - `"url"` + - `title: string or null` - - `url: string` + The title of the document -### Usage + - `type: "document"` -- `Usage object { cache_creation, cache_creation_input_tokens, cache_read_input_tokens, 6 more }` + - `"document"` - - `cache_creation: CacheCreation or null` + - `retrieved_at: string or null` - Breakdown of cached tokens by TTL + ISO 8601 timestamp when the content was retrieved - - `ephemeral_1h_input_tokens: number` + - `type: "web_fetch_result"` - The number of input tokens used to create the 1 hour cache entry. + - `"web_fetch_result"` - - `ephemeral_5m_input_tokens: number` + - `url: string` - The number of input tokens used to create the 5 minute cache entry. + Fetched content URL - - `cache_creation_input_tokens: number or null` + - `tool_use_id: string` - The number of input tokens used to create the cache entry. + - `type: "web_fetch_tool_result"` - - `cache_read_input_tokens: number or null` + - `"web_fetch_tool_result"` - The number of input tokens read from the cache. +### Web Fetch Tool Result Block Param - - `inference_geo: string or null` +- `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - The geographic region where inference was performed for this request. + - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` - - `input_tokens: number` + - `WebFetchToolResultErrorBlockParam object { error_code, type }` - The number of input tokens which were used. + - `error_code: WebFetchToolResultErrorCode` - - `output_tokens: number` + - `"invalid_tool_input"` - The number of output tokens which were used. + - `"url_too_long"` - - `output_tokens_details: OutputTokensDetails or null` + - `"url_not_allowed"` - Breakdown of output tokens by category. + - `"url_not_in_prior_context"` - `output_tokens` remains the inclusive, authoritative total used for billing. - This object provides a read-only decomposition for observability — for example, - how many of the billed output tokens were spent on internal reasoning that may - have been summarized before being returned to you. + - `"url_not_accessible"` - - `thinking_tokens: number` + - `"unsupported_content_type"` - Number of output tokens the model generated as internal reasoning, including - the thinking-block delimiter tokens. + - `"too_many_requests"` - Reflects the raw reasoning the model produced, not the (possibly shorter) - summarized thinking text returned in the response body. Computed by - re-tokenizing the raw reasoning text, so it may differ from the model's exact - generation count by a small number of tokens. Always ≤ `output_tokens`; - `output_tokens - thinking_tokens` approximates the non-reasoning output. + - `"max_uses_exceeded"` - - `server_tool_use: ServerToolUsage or null` + - `"unavailable"` - The number of server tool requests. + - `type: "web_fetch_tool_result_error"` - - `web_fetch_requests: number` + - `"web_fetch_tool_result_error"` - The number of web fetch tool requests. + - `WebFetchBlockParam object { content, type, url, retrieved_at }` - - `web_search_requests: number` + - `content: DocumentBlockParam` - The number of web search tool requests. + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - - `service_tier: "standard" or "priority" or "batch" or null` + - `Base64PDFSource object { data, media_type, type }` - If the request used the priority, standard, or batch tier. + - `data: string` - - `"standard"` + - `media_type: "application/pdf"` - - `"priority"` + - `"application/pdf"` - - `"batch"` + - `type: "base64"` -### User Location + - `"base64"` -- `UserLocation object { type, city, country, 2 more }` + - `PlainTextSource object { data, media_type, type }` - - `type: "approximate"` + - `data: string` - - `"approximate"` + - `media_type: "text/plain"` - - `city: optional string or null` + - `"text/plain"` - The city of the user. + - `type: "text"` - - `country: optional string or null` + - `"text"` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + - `ContentBlockSource object { content, type }` - - `region: optional string or null` + - `content: string or array of ContentBlockSourceContent` - The region of the user. + - `string` - - `timezone: optional string or null` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `TextBlockParam object { text, type, cache_control, citations }` -### Web Fetch Block + - `text: string` -- `WebFetchBlock object { content, retrieved_at, type, url }` + - `type: "text"` - - `content: DocumentBlock` + - `"text"` - - `citations: CitationsConfig or null` + - `cache_control: optional CacheControlEphemeral or null` - Citation configuration for the document + Create a cache control breakpoint at this content block. - - `enabled: boolean` + - `type: "ephemeral"` - - `source: Base64PDFSource or PlainTextSource` + - `"ephemeral"` - - `Base64PDFSource object { data, media_type, type }` + - `ttl: optional "5m" or "1h"` - - `data: string` + The time-to-live for the cache control breakpoint. - - `media_type: "application/pdf"` + This may be one the following values: - - `"application/pdf"` + - `5m`: 5 minutes + - `1h`: 1 hour - - `type: "base64"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"base64"` + - `"5m"` - - `PlainTextSource object { data, media_type, type }` + - `"1h"` - - `data: string` + - `citations: optional array of TextCitationParam or null` - - `media_type: "text/plain"` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"text/plain"` + - `cited_text: string` - - `type: "text"` + - `document_index: number` - - `"text"` + - `document_title: string or null` - - `title: string or null` + - `end_char_index: number` - The title of the document + - `start_char_index: number` - - `type: "document"` + - `type: "char_location"` - - `"document"` + - `"char_location"` - - `retrieved_at: string or null` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - ISO 8601 timestamp when the content was retrieved + - `cited_text: string` - - `type: "web_fetch_result"` + - `document_index: number` - - `"web_fetch_result"` + - `document_title: string or null` - - `url: string` + - `end_page_number: number` - Fetched content URL + - `start_page_number: number` -### Web Fetch Block Param + - `type: "page_location"` -- `WebFetchBlockParam object { content, type, url, retrieved_at }` + - `"page_location"` - - `content: DocumentBlockParam` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `cited_text: string` - - `Base64PDFSource object { data, media_type, type }` + The full text of the cited block range, concatenated. - - `data: string` + 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. - - `media_type: "application/pdf"` + - `document_index: number` - - `"application/pdf"` + - `document_title: string or null` - - `type: "base64"` + - `end_block_index: number` - - `"base64"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `PlainTextSource object { data, media_type, type }` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `data: string` + - `start_block_index: number` - - `media_type: "text/plain"` + 0-based index of the first cited block in the source's `content` array. - - `"text/plain"` + - `type: "content_block_location"` - - `type: "text"` + - `"content_block_location"` - - `"text"` + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` - - `ContentBlockSource object { content, type }` + - `cited_text: string` - - `content: string or array of ContentBlockSourceContent` + - `encrypted_index: string` - - `string` + - `title: string or null` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + - `type: "web_search_result_location"` - - `TextBlockParam object { text, type, cache_control, citations }` + - `"web_search_result_location"` - - `text: string` + - `url: string` - - `type: "text"` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` - - `"text"` + - `cited_text: string` - - `cache_control: optional CacheControlEphemeral or null` + The full text of the cited block range, concatenated. - Create a cache control breakpoint at this content block. + 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. - - `type: "ephemeral"` + - `end_block_index: number` - - `"ephemeral"` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `ttl: optional "5m" or "1h"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - The time-to-live for the cache control breakpoint. + - `search_result_index: number` - This may be one the following values: + 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. - - `5m`: 5 minutes - - `1h`: 1 hour + Counted separately from `document_index`; server-side web search results are not included in this count. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `source: string` - - `"5m"` + - `start_block_index: number` - - `"1h"` + 0-based index of the first cited block in the source's `content` array. - - `citations: optional array of TextCitationParam or null` + - `title: string or null` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `type: "search_result_location"` - - `cited_text: string` + - `"search_result_location"` - - `document_index: number` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `document_title: string or null` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `end_char_index: number` + - `Base64ImageSource object { data, media_type, type }` - - `start_char_index: number` + - `data: string` - - `type: "char_location"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"char_location"` + - `"image/jpeg"` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"image/png"` - - `cited_text: string` + - `"image/gif"` - - `document_index: number` + - `"image/webp"` - - `document_title: string or null` + - `type: "base64"` - - `end_page_number: number` + - `"base64"` - - `start_page_number: number` + - `URLImageSource object { type, url }` - - `type: "page_location"` + - `type: "url"` - - `"page_location"` + - `"url"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `url: string` - - `cited_text: string` + - `FileImageSource object { file_id, type }` - The full text of the cited block range, concatenated. + - `file_id: string` - 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. + - `type: "file"` - - `document_index: number` + - `"file"` - - `document_title: string or null` + - `type: "image"` - - `end_block_index: number` + - `"image"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `cache_control: optional CacheControlEphemeral or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Create a cache control breakpoint at this content block. - - `start_block_index: number` + - `transformations: optional ImageTransformationsParam or null` - 0-based index of the first cited block in the source's `content` array. + 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. - - `type: "content_block_location"` + - `oversized_image: optional "downsize" or "error"` - - `"content_block_location"` + 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. - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `"downsize"` - - `cited_text: string` + - `"error"` - - `encrypted_index: string` + - `type: "content"` - - `title: string or null` + - `"content"` - - `type: "web_search_result_location"` + - `URLPDFSource object { type, url }` - - `"web_search_result_location"` + - `type: "url"` - - `url: string` + - `"url"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `url: string` - - `cited_text: string` + - `FileDocumentSource object { file_id, type }` - The full text of the cited block range, concatenated. + - `file_id: string` - 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. + - `type: "file"` - - `end_block_index: number` + - `"file"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `type: "document"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"document"` - - `search_result_index: number` + - `cache_control: optional CacheControlEphemeral or null` - 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. + Create a cache control breakpoint at this content block. - Counted separately from `document_index`; server-side web search results are not included in this count. + - `citations: optional CitationsConfigParam or null` - - `source: string` + - `enabled: optional boolean` - - `start_block_index: number` + - `context: optional string or null` - 0-based index of the first cited block in the source's `content` array. + - `title: optional string or null` - - `title: string or null` + - `type: "web_fetch_result"` - - `type: "search_result_location"` + - `"web_fetch_result"` - - `"search_result_location"` + - `url: string` - - `ImageBlockParam object { source, type, cache_control }` + Fetched content URL - - `source: Base64ImageSource or URLImageSource` + - `retrieved_at: optional string or null` - - `Base64ImageSource object { data, media_type, type }` + ISO 8601 timestamp when the content was retrieved - - `data: string` + - `tool_use_id: string` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `type: "web_fetch_tool_result"` - - `"image/jpeg"` + - `"web_fetch_tool_result"` - - `"image/png"` + - `cache_control: optional CacheControlEphemeral or null` - - `"image/gif"` + Create a cache control breakpoint at this content block. - - `"image/webp"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `type: "base64"` + Tool invocation directly from the model. - - `"base64"` + - `DirectCaller object { type }` - - `URLImageSource object { type, url }` + Tool invocation directly from the model. - - `type: "url"` + - `type: "direct"` - - `"url"` + - `"direct"` - - `url: string` + - `ServerToolCaller object { tool_id, type }` - - `type: "image"` + Tool invocation generated by a server-side tool. - - `"image"` + - `tool_id: string` - - `cache_control: optional CacheControlEphemeral or null` + - `type: "code_execution_20250825"` - Create a cache control breakpoint at this content block. + - `"code_execution_20250825"` - - `type: "content"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `"content"` + - `tool_id: string` - - `URLPDFSource object { type, url }` + - `type: "code_execution_20260120"` - - `type: "url"` + - `"code_execution_20260120"` - - `"url"` +### Web Fetch Tool Result Error Block - - `url: string` +- `WebFetchToolResultErrorBlock object { error_code, type }` - - `type: "document"` + - `error_code: WebFetchToolResultErrorCode` - - `"document"` + - `"invalid_tool_input"` - - `cache_control: optional CacheControlEphemeral or null` + - `"url_too_long"` - Create a cache control breakpoint at this content block. + - `"url_not_allowed"` - - `citations: optional CitationsConfigParam or null` + - `"url_not_in_prior_context"` - - `enabled: optional boolean` + - `"url_not_accessible"` - - `context: optional string or null` + - `"unsupported_content_type"` - - `title: optional string or null` + - `"too_many_requests"` - - `type: "web_fetch_result"` + - `"max_uses_exceeded"` - - `"web_fetch_result"` + - `"unavailable"` - - `url: string` + - `type: "web_fetch_tool_result_error"` - Fetched content URL + - `"web_fetch_tool_result_error"` - - `retrieved_at: optional string or null` +### Web Fetch Tool Result Error Block Param - ISO 8601 timestamp when the content was retrieved +- `WebFetchToolResultErrorBlockParam object { error_code, type }` -### Web Fetch Tool 20250910 + - `error_code: WebFetchToolResultErrorCode` -- `WebFetchTool20250910 object { name, type, allowed_callers, 8 more }` + - `"invalid_tool_input"` - - `name: "web_fetch"` + - `"url_too_long"` - Name of the tool. + - `"url_not_allowed"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `"url_not_in_prior_context"` - - `"web_fetch"` + - `"url_not_accessible"` - - `type: "web_fetch_20250910"` + - `"unsupported_content_type"` - - `"web_fetch_20250910"` + - `"too_many_requests"` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `"max_uses_exceeded"` - - `"direct"` + - `"unavailable"` - - `"code_execution_20250825"` + - `type: "web_fetch_tool_result_error"` - - `"code_execution_20260120"` + - `"web_fetch_tool_result_error"` - - `"code_execution_20260521"` +### Web Fetch Tool Result Error Code - - `allowed_domains: optional array of string or null` +- `WebFetchToolResultErrorCode = "invalid_tool_input" or "url_too_long" or "url_not_allowed" or 6 more` - List of domains to allow fetching from + - `"invalid_tool_input"` - - `blocked_domains: optional array of string or null` + - `"url_too_long"` - List of domains to block fetching from + - `"url_not_allowed"` - - `cache_control: optional CacheControlEphemeral or null` + - `"url_not_in_prior_context"` - Create a cache control breakpoint at this content block. + - `"url_not_accessible"` - - `type: "ephemeral"` + - `"unsupported_content_type"` - - `"ephemeral"` + - `"too_many_requests"` - - `ttl: optional "5m" or "1h"` + - `"max_uses_exceeded"` - The time-to-live for the cache control breakpoint. + - `"unavailable"` - This may be one the following values: +### Web Search Result Block - - `5m`: 5 minutes - - `1h`: 1 hour +- `WebSearchResultBlock object { encrypted_content, page_age, title, 2 more }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `encrypted_content: string` - - `"5m"` + - `page_age: string or null` - - `"1h"` + - `title: string` - - `citations: optional CitationsConfigParam or null` + - `type: "web_search_result"` - Citations configuration for fetched documents. Citations are disabled by default. + - `"web_search_result"` - - `enabled: optional boolean` + - `url: string` - - `defer_loading: optional boolean` +### Web Search Result Block Param - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. +- `WebSearchResultBlockParam object { encrypted_content, title, type, 2 more }` - - `max_content_tokens: optional number or null` + - `encrypted_content: string` - 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. + - `title: string` - - `max_uses: optional number or null` + - `type: "web_search_result"` - Maximum number of times the tool can be used in the API request. + - `"web_search_result"` - - `strict: optional boolean` + - `url: string` - When true, guarantees schema validation on tool names and inputs + - `page_age: optional string or null` -### Web Fetch Tool 20260209 +### Web Search Tool 20250305 -- `WebFetchTool20260209 object { name, type, allowed_callers, 8 more }` +- `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` - - `name: "web_fetch"` + - `name: "web_search"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"web_fetch"` + - `"web_search"` - - `type: "web_fetch_20260209"` + - `type: "web_search_20250305"` - - `"web_fetch_20260209"` + - `"web_search_20250305"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -19691,11 +26408,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `allowed_domains: optional array of string or null` - List of domains to allow fetching from + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - `blocked_domains: optional array of string or null` - List of domains to block fetching from + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - `cache_control: optional CacheControlEphemeral or null` @@ -19720,20 +26437,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `citations: optional CitationsConfigParam or null` - - Citations configuration for fetched documents. Citations are disabled by default. - - - `enabled: optional boolean` - - `defer_loading: optional boolean` If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `max_content_tokens: optional number or null` - - 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. - - `max_uses: optional number or null` Maximum number of times the tool can be used in the API request. @@ -19742,23 +26449,45 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs -### Web Fetch Tool 20260309 + - `user_location: optional UserLocation or null` -- `WebFetchTool20260309 object { name, type, allowed_callers, 9 more }` + Parameters for the user's location. Used to provide more relevant search results. - Web fetch tool with use_cache parameter for bypassing cached content. + - `type: "approximate"` - - `name: "web_fetch"` + - `"approximate"` + + - `city: optional string or null` + + The city of the user. + + - `country: optional string or null` + + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + + - `region: optional string or null` + + The region of the user. + + - `timezone: optional string or null` + + The [IANA timezone](https://nodatime.org/TimeZones) of the user. + +### Web Search Tool 20260209 + +- `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + + - `name: "web_search"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"web_fetch"` + - `"web_search"` - - `type: "web_fetch_20260309"` + - `type: "web_search_20260209"` - - `"web_fetch_20260309"` + - `"web_search_20260209"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -19772,11 +26501,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `allowed_domains: optional array of string or null` - List of domains to allow fetching from + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - `blocked_domains: optional array of string or null` - List of domains to block fetching from + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - `cache_control: optional CacheControlEphemeral or null` @@ -19801,20 +26530,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `citations: optional CitationsConfigParam or null` - - Citations configuration for fetched documents. Citations are disabled by default. - - - `enabled: optional boolean` - - `defer_loading: optional boolean` If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `max_content_tokens: optional number or null` - - 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. - - `max_uses: optional number or null` Maximum number of times the tool can be used in the API request. @@ -19823,25 +26542,45 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs - - `use_cache: optional boolean` + - `user_location: optional UserLocation or null` - 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. + Parameters for the user's location. Used to provide more relevant search results. -### Web Fetch Tool 20260318 + - `type: "approximate"` -- `WebFetchTool20260318 object { name, type, allowed_callers, 10 more }` + - `"approximate"` - - `name: "web_fetch"` + - `city: optional string or null` + + The city of the user. + + - `country: optional string or null` + + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + + - `region: optional string or null` + + The region of the user. + + - `timezone: optional string or null` + + The [IANA timezone](https://nodatime.org/TimeZones) of the user. + +### Web Search Tool 20260318 + +- `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + + - `name: "web_search"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. - - `"web_fetch"` + - `"web_search"` - - `type: "web_fetch_20260318"` + - `type: "web_search_20260318"` - - `"web_fetch_20260318"` + - `"web_search_20260318"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -19855,11 +26594,11 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `allowed_domains: optional array of string or null` - List of domains to allow fetching from + If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. - `blocked_domains: optional array of string or null` - List of domains to block fetching from + If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. - `cache_control: optional CacheControlEphemeral or null` @@ -19884,20 +26623,10 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ - `"1h"` - - `citations: optional CitationsConfigParam or null` - - Citations configuration for fetched documents. Citations are disabled by default. - - - `enabled: optional boolean` - - `defer_loading: optional boolean` If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `max_content_tokens: optional number or null` - - 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. - - `max_uses: optional number or null` Maximum number of times the tool can be used in the API request. @@ -19914,2507 +26643,2485 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ When true, guarantees schema validation on tool names and inputs - - `use_cache: optional boolean` - - 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. - -### Web Fetch Tool Result Block - -- `WebFetchToolResultBlock object { caller, content, tool_use_id, type }` - - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - Tool invocation directly from the model. - - - `DirectCaller object { type }` - - Tool invocation directly from the model. - - - `type: "direct"` - - - `"direct"` - - - `ServerToolCaller object { tool_id, type }` - - Tool invocation generated by a server-side tool. - - - `tool_id: string` - - - `type: "code_execution_20250825"` - - - `"code_execution_20250825"` - - - `ServerToolCaller20260120 object { tool_id, type }` - - - `tool_id: string` - - - `type: "code_execution_20260120"` - - - `"code_execution_20260120"` + - `user_location: optional UserLocation or null` - - `content: WebFetchToolResultErrorBlock or WebFetchBlock` + Parameters for the user's location. Used to provide more relevant search results. - - `WebFetchToolResultErrorBlock object { error_code, type }` + - `type: "approximate"` - - `error_code: WebFetchToolResultErrorCode` + - `"approximate"` - - `"invalid_tool_input"` + - `city: optional string or null` - - `"url_too_long"` + The city of the user. - - `"url_not_allowed"` + - `country: optional string or null` - - `"url_not_in_prior_context"` + The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. - - `"url_not_accessible"` + - `region: optional string or null` - - `"unsupported_content_type"` + The region of the user. - - `"too_many_requests"` + - `timezone: optional string or null` - - `"max_uses_exceeded"` + The [IANA timezone](https://nodatime.org/TimeZones) of the user. - - `"unavailable"` +### Web Search Tool Request Error - - `type: "web_fetch_tool_result_error"` +- `WebSearchToolRequestError object { error_code, type }` - - `"web_fetch_tool_result_error"` + - `error_code: WebSearchToolResultErrorCode` - - `WebFetchBlock object { content, retrieved_at, type, url }` + - `"invalid_tool_input"` - - `content: DocumentBlock` + - `"unavailable"` - - `citations: CitationsConfig or null` + - `"max_uses_exceeded"` - Citation configuration for the document + - `"too_many_requests"` - - `enabled: boolean` + - `"query_too_long"` - - `source: Base64PDFSource or PlainTextSource` + - `"request_too_large"` - - `Base64PDFSource object { data, media_type, type }` + - `type: "web_search_tool_result_error"` - - `data: string` + - `"web_search_tool_result_error"` - - `media_type: "application/pdf"` +### Web Search Tool Result Block - - `"application/pdf"` +- `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` - - `type: "base64"` + - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"base64"` + Tool invocation directly from the model. - - `PlainTextSource object { data, media_type, type }` + - `DirectCaller object { type }` - - `data: string` + Tool invocation directly from the model. - - `media_type: "text/plain"` + - `type: "direct"` - - `"text/plain"` + - `"direct"` - - `type: "text"` + - `ServerToolCaller object { tool_id, type }` - - `"text"` + Tool invocation generated by a server-side tool. - - `title: string or null` + - `tool_id: string` - The title of the document + - `type: "code_execution_20250825"` - - `type: "document"` + - `"code_execution_20250825"` - - `"document"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `retrieved_at: string or null` + - `tool_id: string` - ISO 8601 timestamp when the content was retrieved + - `type: "code_execution_20260120"` - - `type: "web_fetch_result"` + - `"code_execution_20260120"` - - `"web_fetch_result"` + - `content: WebSearchToolResultBlockContent` - - `url: string` + - `WebSearchToolResultError object { error_code, type }` - Fetched content URL + - `error_code: WebSearchToolResultErrorCode` - - `tool_use_id: string` + - `"invalid_tool_input"` - - `type: "web_fetch_tool_result"` + - `"unavailable"` - - `"web_fetch_tool_result"` + - `"max_uses_exceeded"` -### Web Fetch Tool Result Block Param + - `"too_many_requests"` -- `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `"query_too_long"` - - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + - `"request_too_large"` - - `WebFetchToolResultErrorBlockParam object { error_code, type }` + - `type: "web_search_tool_result_error"` - - `error_code: WebFetchToolResultErrorCode` + - `"web_search_tool_result_error"` - - `"invalid_tool_input"` + - `array of WebSearchResultBlock` - - `"url_too_long"` + - `encrypted_content: string` - - `"url_not_allowed"` + - `page_age: string or null` - - `"url_not_in_prior_context"` + - `title: string` - - `"url_not_accessible"` + - `type: "web_search_result"` - - `"unsupported_content_type"` + - `"web_search_result"` - - `"too_many_requests"` + - `url: string` - - `"max_uses_exceeded"` + - `tool_use_id: string` - - `"unavailable"` + - `type: "web_search_tool_result"` - - `type: "web_fetch_tool_result_error"` + - `"web_search_tool_result"` - - `"web_fetch_tool_result_error"` +### Web Search Tool Result Block Content - - `WebFetchBlockParam object { content, type, url, retrieved_at }` +- `WebSearchToolResultBlockContent = WebSearchToolResultError or array of WebSearchResultBlock` - - `content: DocumentBlockParam` + - `WebSearchToolResultError object { error_code, type }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `error_code: WebSearchToolResultErrorCode` - - `Base64PDFSource object { data, media_type, type }` + - `"invalid_tool_input"` - - `data: string` + - `"unavailable"` - - `media_type: "application/pdf"` + - `"max_uses_exceeded"` - - `"application/pdf"` + - `"too_many_requests"` - - `type: "base64"` + - `"query_too_long"` - - `"base64"` + - `"request_too_large"` - - `PlainTextSource object { data, media_type, type }` + - `type: "web_search_tool_result_error"` - - `data: string` + - `"web_search_tool_result_error"` - - `media_type: "text/plain"` + - `array of WebSearchResultBlock` - - `"text/plain"` + - `encrypted_content: string` - - `type: "text"` + - `page_age: string or null` - - `"text"` + - `title: string` - - `ContentBlockSource object { content, type }` + - `type: "web_search_result"` - - `content: string or array of ContentBlockSourceContent` + - `"web_search_result"` - - `string` + - `url: string` - - `ContentBlockSourceContent = array of ContentBlockSourceContent` +### Web Search Tool Result Block Param - - `TextBlockParam object { text, type, cache_control, citations }` +- `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `text: string` + - `content: WebSearchToolResultBlockParamContent` - - `type: "text"` + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` - - `"text"` + - `encrypted_content: string` - - `cache_control: optional CacheControlEphemeral or null` + - `title: string` - Create a cache control breakpoint at this content block. + - `type: "web_search_result"` - - `type: "ephemeral"` + - `"web_search_result"` - - `"ephemeral"` + - `url: string` - - `ttl: optional "5m" or "1h"` + - `page_age: optional string or null` - The time-to-live for the cache control breakpoint. + - `WebSearchToolRequestError object { error_code, type }` - This may be one the following values: + - `error_code: WebSearchToolResultErrorCode` - - `5m`: 5 minutes - - `1h`: 1 hour + - `"invalid_tool_input"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"unavailable"` - - `"5m"` + - `"max_uses_exceeded"` - - `"1h"` + - `"too_many_requests"` - - `citations: optional array of TextCitationParam or null` + - `"query_too_long"` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"request_too_large"` - - `cited_text: string` + - `type: "web_search_tool_result_error"` - - `document_index: number` + - `"web_search_tool_result_error"` - - `document_title: string or null` + - `tool_use_id: string` - - `end_char_index: number` + - `type: "web_search_tool_result"` - - `start_char_index: number` + - `"web_search_tool_result"` - - `type: "char_location"` + - `cache_control: optional CacheControlEphemeral or null` - - `"char_location"` + Create a cache control breakpoint at this content block. - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `type: "ephemeral"` - - `cited_text: string` + - `"ephemeral"` - - `document_index: number` + - `ttl: optional "5m" or "1h"` - - `document_title: string or null` + The time-to-live for the cache control breakpoint. - - `end_page_number: number` + This may be one the following values: - - `start_page_number: number` + - `5m`: 5 minutes + - `1h`: 1 hour - - `type: "page_location"` + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. - - `"page_location"` + - `"5m"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `"1h"` - - `cited_text: string` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - The full text of the cited block range, concatenated. + Tool invocation directly from the model. - 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. + - `DirectCaller object { type }` - - `document_index: number` + Tool invocation directly from the model. - - `document_title: string or null` + - `type: "direct"` - - `end_block_index: number` + - `"direct"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `ServerToolCaller object { tool_id, type }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + Tool invocation generated by a server-side tool. - - `start_block_index: number` + - `tool_id: string` - 0-based index of the first cited block in the source's `content` array. + - `type: "code_execution_20250825"` - - `type: "content_block_location"` + - `"code_execution_20250825"` - - `"content_block_location"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `tool_id: string` - - `cited_text: string` + - `type: "code_execution_20260120"` - - `encrypted_index: string` + - `"code_execution_20260120"` - - `title: string or null` +### Web Search Tool Result Block Param Content - - `type: "web_search_result_location"` +- `WebSearchToolResultBlockParamContent = array of WebSearchResultBlockParam or WebSearchToolRequestError` - - `"web_search_result_location"` + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` - - `url: string` + - `encrypted_content: string` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `title: string` - - `cited_text: string` + - `type: "web_search_result"` - The full text of the cited block range, concatenated. + - `"web_search_result"` - 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. + - `url: string` - - `end_block_index: number` + - `page_age: optional string or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `WebSearchToolRequestError object { error_code, type }` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `error_code: WebSearchToolResultErrorCode` - - `search_result_index: number` + - `"invalid_tool_input"` - 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. + - `"unavailable"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `"max_uses_exceeded"` - - `source: string` + - `"too_many_requests"` - - `start_block_index: number` + - `"query_too_long"` - 0-based index of the first cited block in the source's `content` array. + - `"request_too_large"` - - `title: string or null` + - `type: "web_search_tool_result_error"` - - `type: "search_result_location"` + - `"web_search_tool_result_error"` - - `"search_result_location"` +### Web Search Tool Result Error - - `ImageBlockParam object { source, type, cache_control }` +- `WebSearchToolResultError object { error_code, type }` - - `source: Base64ImageSource or URLImageSource` + - `error_code: WebSearchToolResultErrorCode` - - `Base64ImageSource object { data, media_type, type }` + - `"invalid_tool_input"` - - `data: string` + - `"unavailable"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `"max_uses_exceeded"` - - `"image/jpeg"` + - `"too_many_requests"` - - `"image/png"` + - `"query_too_long"` - - `"image/gif"` + - `"request_too_large"` - - `"image/webp"` + - `type: "web_search_tool_result_error"` - - `type: "base64"` + - `"web_search_tool_result_error"` - - `"base64"` +### Web Search Tool Result Error Code - - `URLImageSource object { type, url }` +- `WebSearchToolResultErrorCode = "invalid_tool_input" or "unavailable" or "max_uses_exceeded" or 3 more` - - `type: "url"` + - `"invalid_tool_input"` - - `"url"` + - `"unavailable"` - - `url: string` + - `"max_uses_exceeded"` - - `type: "image"` + - `"too_many_requests"` - - `"image"` + - `"query_too_long"` - - `cache_control: optional CacheControlEphemeral or null` + - `"request_too_large"` - Create a cache control breakpoint at this content block. +# Batches - - `type: "content"` +## Create a Message Batch - - `"content"` +**post** `/v1/messages/batches` - - `URLPDFSource object { type, url }` +Send a batch of Message creation requests. - - `type: "url"` +The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete. - - `"url"` +Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing) - - `url: string` +### Header Parameters - - `type: "document"` +- `"anthropic-user-profile-id": optional string` - - `"document"` + The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored. - - `cache_control: optional CacheControlEphemeral or null` +### Body Parameters - Create a cache control breakpoint at this content block. +- `requests: array of object { custom_id, params }` - - `citations: optional CitationsConfigParam or null` + List of requests for prompt completion. Each is an individual request to create a Message. - - `enabled: optional boolean` + - `custom_id: string` - - `context: optional string or null` + Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order. - - `title: optional string or null` + Must be unique for each request within the Message Batch. - - `type: "web_fetch_result"` + - `params: object { max_tokens, messages, model, 15 more }` - - `"web_fetch_result"` + Messages API creation parameters for the individual request. - - `url: string` + See the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters. - Fetched content URL + - `max_tokens: number` - - `retrieved_at: optional string or null` + The maximum number of tokens to generate before stopping. - ISO 8601 timestamp when the content was retrieved + Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. - - `tool_use_id: string` + 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. - - `type: "web_fetch_tool_result"` + Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details. - - `"web_fetch_tool_result"` + - `messages: array of MessageParam` - - `cache_control: optional CacheControlEphemeral or null` + Input messages. - Create a cache control breakpoint at this content block. + 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. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + 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. - Tool invocation directly from the model. + 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. - - `DirectCaller object { type }` + Example with a single `user` message: - Tool invocation directly from the model. + ```json + [{"role": "user", "content": "Hello, Claude"}] + ``` - - `type: "direct"` + Example with multiple conversational turns: - - `"direct"` + ```json + [ + {"role": "user", "content": "Hello there."}, + {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, + {"role": "user", "content": "Can you explain LLMs in plain English?"}, + ] + ``` - - `ServerToolCaller object { tool_id, type }` + Example with a partially-filled response from Claude: - Tool invocation generated by a server-side tool. + ```json + [ + {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, + {"role": "assistant", "content": "The best answer is ("}, + ] + ``` - - `tool_id: string` + 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: - - `type: "code_execution_20250825"` + ```json + {"role": "user", "content": "Hello, Claude"} + ``` - - `"code_execution_20250825"` + ```json + {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} + ``` - - `ServerToolCaller20260120 object { tool_id, type }` + See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). - - `tool_id: string` + 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. - - `type: "code_execution_20260120"` + There is a limit of 100,000 messages in a single request. - - `"code_execution_20260120"` + - `content: string or array of ContentBlockParam` -### Web Fetch Tool Result Error Block + - `string` -- `WebFetchToolResultErrorBlock object { error_code, type }` + - `array of ContentBlockParam` - - `error_code: WebFetchToolResultErrorCode` + - `TextBlockParam object { text, type, cache_control, citations }` - - `"invalid_tool_input"` + - `text: string` - - `"url_too_long"` + - `type: "text"` - - `"url_not_allowed"` + - `"text"` - - `"url_not_in_prior_context"` + - `cache_control: optional CacheControlEphemeral or null` - - `"url_not_accessible"` + Create a cache control breakpoint at this content block. - - `"unsupported_content_type"` + - `type: "ephemeral"` - - `"too_many_requests"` + - `"ephemeral"` - - `"max_uses_exceeded"` + - `ttl: optional "5m" or "1h"` - - `"unavailable"` + The time-to-live for the cache control breakpoint. - - `type: "web_fetch_tool_result_error"` + This may be one the following values: - - `"web_fetch_tool_result_error"` + - `5m`: 5 minutes + - `1h`: 1 hour -### Web Fetch Tool Result Error Block Param + Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. -- `WebFetchToolResultErrorBlockParam object { error_code, type }` + - `"5m"` - - `error_code: WebFetchToolResultErrorCode` + - `"1h"` - - `"invalid_tool_input"` + - `citations: optional array of TextCitationParam or null` - - `"url_too_long"` + - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"url_not_allowed"` + - `cited_text: string` - - `"url_not_in_prior_context"` + - `document_index: number` - - `"url_not_accessible"` + - `document_title: string or null` - - `"unsupported_content_type"` + - `end_char_index: number` - - `"too_many_requests"` + - `start_char_index: number` - - `"max_uses_exceeded"` + - `type: "char_location"` - - `"unavailable"` + - `"char_location"` - - `type: "web_fetch_tool_result_error"` + - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"web_fetch_tool_result_error"` + - `cited_text: string` -### Web Fetch Tool Result Error Code + - `document_index: number` -- `WebFetchToolResultErrorCode = "invalid_tool_input" or "url_too_long" or "url_not_allowed" or 6 more` + - `document_title: string or null` - - `"invalid_tool_input"` + - `end_page_number: number` - - `"url_too_long"` + - `start_page_number: number` - - `"url_not_allowed"` + - `type: "page_location"` - - `"url_not_in_prior_context"` + - `"page_location"` - - `"url_not_accessible"` + - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` - - `"unsupported_content_type"` + - `cited_text: string` - - `"too_many_requests"` + The full text of the cited block range, concatenated. - - `"max_uses_exceeded"` + 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. - - `"unavailable"` + - `document_index: number` -### Web Search Result Block + - `document_title: string or null` -- `WebSearchResultBlock object { encrypted_content, page_age, title, 2 more }` + - `end_block_index: number` - - `encrypted_content: string` + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `page_age: string or null` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `title: string` + - `start_block_index: number` - - `type: "web_search_result"` + 0-based index of the first cited block in the source's `content` array. - - `"web_search_result"` + - `type: "content_block_location"` - - `url: string` + - `"content_block_location"` -### Web Search Result Block Param + - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` -- `WebSearchResultBlockParam object { encrypted_content, title, type, 2 more }` + - `cited_text: string` - - `encrypted_content: string` + - `encrypted_index: string` - - `title: string` + - `title: string or null` - - `type: "web_search_result"` + - `type: "web_search_result_location"` - - `"web_search_result"` + - `"web_search_result_location"` - - `url: string` + - `url: string` - - `page_age: optional string or null` + - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` -### Web Search Tool 20250305 + - `cited_text: string` -- `WebSearchTool20250305 object { name, type, allowed_callers, 7 more }` + The full text of the cited block range, concatenated. - - `name: "web_search"` + 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. - Name of the tool. + - `end_block_index: number` - This is how the tool will be called by the model and in `tool_use` blocks. + Exclusive 0-based end index of the cited block range in the source's `content` array. - - `"web_search"` + Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. - - `type: "web_search_20250305"` + - `search_result_index: number` - - `"web_search_20250305"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + Counted separately from `document_index`; server-side web search results are not included in this count. - - `"direct"` + - `source: string` - - `"code_execution_20250825"` + - `start_block_index: number` - - `"code_execution_20260120"` + 0-based index of the first cited block in the source's `content` array. - - `"code_execution_20260521"` + - `title: string or null` - - `allowed_domains: optional array of string or null` + - `type: "search_result_location"` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `"search_result_location"` - - `blocked_domains: optional array of string or null` + - `ImageBlockParam object { source, type, cache_control, transformations }` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `source: Base64ImageSource or URLImageSource or FileImageSource` - - `cache_control: optional CacheControlEphemeral or null` + - `Base64ImageSource object { data, media_type, type }` - Create a cache control breakpoint at this content block. + - `data: string` - - `type: "ephemeral"` + - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` - - `"ephemeral"` + - `"image/jpeg"` - - `ttl: optional "5m" or "1h"` + - `"image/png"` - The time-to-live for the cache control breakpoint. + - `"image/gif"` - This may be one the following values: + - `"image/webp"` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "base64"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"base64"` - - `"5m"` + - `URLImageSource object { type, url }` - - `"1h"` + - `type: "url"` - - `defer_loading: optional boolean` + - `"url"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `url: string` - - `max_uses: optional number or null` + - `FileImageSource object { file_id, type }` - Maximum number of times the tool can be used in the API request. + - `file_id: string` - - `strict: optional boolean` + - `type: "file"` - When true, guarantees schema validation on tool names and inputs + - `"file"` - - `user_location: optional UserLocation or null` + - `type: "image"` - Parameters for the user's location. Used to provide more relevant search results. + - `"image"` - - `type: "approximate"` + - `cache_control: optional CacheControlEphemeral or null` - - `"approximate"` + Create a cache control breakpoint at this content block. - - `city: optional string or null` + - `transformations: optional ImageTransformationsParam or null` - The city of the user. + 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. - - `country: optional string or null` + - `oversized_image: optional "downsize" or "error"` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + 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. - - `region: optional string or null` + - `"downsize"` - The region of the user. + - `"error"` - - `timezone: optional string or null` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` -### Web Search Tool 20260209 + - `Base64PDFSource object { data, media_type, type }` -- `WebSearchTool20260209 object { name, type, allowed_callers, 7 more }` + - `data: string` - - `name: "web_search"` + - `media_type: "application/pdf"` - Name of the tool. + - `"application/pdf"` - This is how the tool will be called by the model and in `tool_use` blocks. + - `type: "base64"` - - `"web_search"` + - `"base64"` - - `type: "web_search_20260209"` + - `PlainTextSource object { data, media_type, type }` - - `"web_search_20260209"` + - `data: string` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `media_type: "text/plain"` - - `"direct"` + - `"text/plain"` - - `"code_execution_20250825"` + - `type: "text"` - - `"code_execution_20260120"` + - `"text"` - - `"code_execution_20260521"` + - `ContentBlockSource object { content, type }` - - `allowed_domains: optional array of string or null` + - `content: string or array of ContentBlockSourceContent` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + - `string` - - `blocked_domains: optional array of string or null` + - `ContentBlockSourceContent = array of ContentBlockSourceContent` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `TextBlockParam object { text, type, cache_control, citations }` - - `cache_control: optional CacheControlEphemeral or null` + - `ImageBlockParam object { source, type, cache_control, transformations }` - Create a cache control breakpoint at this content block. + - `type: "content"` - - `type: "ephemeral"` + - `"content"` - - `"ephemeral"` + - `URLPDFSource object { type, url }` - - `ttl: optional "5m" or "1h"` + - `type: "url"` - The time-to-live for the cache control breakpoint. + - `"url"` - This may be one the following values: + - `url: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `FileDocumentSource object { file_id, type }` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `file_id: string` - - `"5m"` + - `type: "file"` - - `"1h"` + - `"file"` - - `defer_loading: optional boolean` + - `type: "document"` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `"document"` - - `max_uses: optional number or null` + - `cache_control: optional CacheControlEphemeral or null` - Maximum number of times the tool can be used in the API request. + Create a cache control breakpoint at this content block. - - `strict: optional boolean` + - `citations: optional CitationsConfigParam or null` - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean` - - `user_location: optional UserLocation or null` + - `context: optional string or null` - Parameters for the user's location. Used to provide more relevant search results. + - `title: optional string or null` - - `type: "approximate"` + - `SearchResultBlockParam object { content, source, title, 3 more }` - - `"approximate"` + - `content: array of TextBlockParam` - - `city: optional string or null` + - `text: string` - The city of the user. + - `type: "text"` - - `country: optional string or null` + - `cache_control: optional CacheControlEphemeral or null` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + Create a cache control breakpoint at this content block. - - `region: optional string or null` + - `citations: optional array of TextCitationParam or null` - The region of the user. + - `source: string` - - `timezone: optional string or null` + - `title: string` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `type: "search_result"` -### Web Search Tool 20260318 + - `"search_result"` -- `WebSearchTool20260318 object { name, type, allowed_callers, 8 more }` + - `cache_control: optional CacheControlEphemeral or null` - - `name: "web_search"` + Create a cache control breakpoint at this content block. - Name of the tool. + - `citations: optional CitationsConfigParam` - This is how the tool will be called by the model and in `tool_use` blocks. + - `ThinkingBlockParam object { signature, thinking, type }` - - `"web_search"` + - `signature: string` - - `type: "web_search_20260318"` + 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. - - `"web_search_20260318"` + Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `thinking: string` - - `"direct"` + The `thinking` text of this block as returned by the API. - - `"code_execution_20250825"` + - `type: "thinking"` - - `"code_execution_20260120"` + - `"thinking"` - - `"code_execution_20260521"` + - `RedactedThinkingBlockParam object { data, type }` - - `allowed_domains: optional array of string or null` + - `data: string` - If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + 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. - - `blocked_domains: optional array of string or null` + - `type: "redacted_thinking"` - If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + - `"redacted_thinking"` - - `cache_control: optional CacheControlEphemeral or null` + - `ToolUseBlockParam object { id, input, name, 4 more }` - Create a cache control breakpoint at this content block. + - `id: string` - - `type: "ephemeral"` + - `input: map[unknown]` - - `"ephemeral"` + - `name: string` - - `ttl: optional "5m" or "1h"` + - `type: "tool_use"` - The time-to-live for the cache control breakpoint. + - `"tool_use"` - This may be one the following values: + - `cache_control: optional CacheControlEphemeral or null` - - `5m`: 5 minutes - - `1h`: 1 hour + Create a cache control breakpoint at this content block. - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"5m"` + Tool invocation directly from the model. - - `"1h"` + - `DirectCaller object { type }` - - `defer_loading: optional boolean` + Tool invocation directly from the model. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `type: "direct"` - - `max_uses: optional number or null` + - `"direct"` - Maximum number of times the tool can be used in the API request. + - `ServerToolCaller object { tool_id, type }` - - `response_inclusion: optional "full" or "excluded"` + Tool invocation generated by a server-side tool. - 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. + - `tool_id: string` - - `"full"` + - `type: "code_execution_20250825"` - - `"excluded"` + - `"code_execution_20250825"` - - `strict: optional boolean` + - `ServerToolCaller20260120 object { tool_id, type }` - When true, guarantees schema validation on tool names and inputs + - `tool_id: string` - - `user_location: optional UserLocation or null` + - `type: "code_execution_20260120"` - Parameters for the user's location. Used to provide more relevant search results. + - `"code_execution_20260120"` - - `type: "approximate"` + - `toolset_name: optional string or null` - - `"approximate"` + For a toolset member tool_use, the toolset family this member belongs to. - - `city: optional string or null` + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - The city of the user. + - `tool_use_id: string` - - `country: optional string or null` + - `type: "tool_result"` - The two letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the user. + - `"tool_result"` - - `region: optional string or null` + - `cache_control: optional CacheControlEphemeral or null` - The region of the user. + Create a cache control breakpoint at this content block. - - `timezone: optional string or null` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - The [IANA timezone](https://nodatime.org/TimeZones) of the user. + - `string` -### Web Search Tool Request Error + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` -- `WebSearchToolRequestError object { error_code, type }` + - `TextBlockParam object { text, type, cache_control, citations }` - - `error_code: WebSearchToolResultErrorCode` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `"invalid_tool_input"` + - `SearchResultBlockParam object { content, source, title, 3 more }` - - `"unavailable"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `"max_uses_exceeded"` + - `ToolReferenceBlockParam object { tool_name, type, cache_control }` - - `"too_many_requests"` + Tool reference block that can be included in tool_result content. - - `"query_too_long"` + - `tool_name: string` - - `"request_too_large"` + - `type: "tool_reference"` - - `type: "web_search_tool_result_error"` + - `"tool_reference"` - - `"web_search_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` -### Web Search Tool Result Block + Create a cache control breakpoint at this content block. -- `WebSearchToolResultBlock object { caller, content, tool_use_id, type }` + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` - - `caller: DirectCaller or ServerToolCaller or ServerToolCaller20260120` + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. - Tool invocation directly from the model. + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. - - `DirectCaller object { type }` + - `tabs: array of BrowserStateTabEntry` - Tool invocation directly from the model. + 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`. - - `type: "direct"` + - `tab_id: string` - - `"direct"` + The caller-assigned identifier for this tab, unique within the inventory. - - `ServerToolCaller object { tool_id, type }` + - `title: string` - Tool invocation generated by a server-side tool. + The title of the page the tab is showing. May be empty. - - `tool_id: string` + - `url: string` - - `type: "code_execution_20250825"` + The URL of the page the tab is showing. May be empty. - - `"code_execution_20250825"` + - `active: optional boolean` - - `ServerToolCaller20260120 object { tool_id, type }` + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. - - `tool_id: string` + - `type: "browser_state"` - - `type: "code_execution_20260120"` + - `"browser_state"` - - `"code_execution_20260120"` + - `cache_control: optional CacheControlEphemeral or null` - - `content: WebSearchToolResultBlockContent` + Create a cache control breakpoint at this content block. - - `WebSearchToolResultError object { error_code, type }` + - `state_changes: optional array of BrowserStateChange or null` - - `error_code: WebSearchToolResultErrorCode` + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. - - `"invalid_tool_input"` + - `BrowserStateChangeTabOpened object { tab_id, type }` - - `"unavailable"` + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. - - `"max_uses_exceeded"` + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. - - `"too_many_requests"` + - `tab_id: string` - - `"query_too_long"` + The `tab_id` of the opened tab, present in `tabs`. - - `"request_too_large"` + - `type: "tab_opened"` - - `type: "web_search_tool_result_error"` + - `"tab_opened"` - - `"web_search_tool_result_error"` + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` - - `array of WebSearchResultBlock` + A file download that started during this call. - - `encrypted_content: string` + - `download_id: string` - - `page_age: string or null` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `title: string` + - `type: "download_started"` - - `type: "web_search_result"` + - `"download_started"` - - `"web_search_result"` + - `url: string` - - `url: string` + The final post-redirect URL the download was served from. - - `tool_use_id: string` + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` - - `type: "web_search_tool_result"` + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). - - `"web_search_tool_result"` + - `download_id: string` -### Web Search Tool Result Block Content + The caller-assigned identifier for this download, stable across the state changes reporting it. -- `WebSearchToolResultBlockContent = WebSearchToolResultError or array of WebSearchResultBlock` + - `type: "download_completed"` - - `WebSearchToolResultError object { error_code, type }` + - `"download_completed"` - - `error_code: WebSearchToolResultErrorCode` + - `url: string` - - `"invalid_tool_input"` + The final post-redirect URL the download was served from. - - `"unavailable"` + - `path: optional string or null` - - `"max_uses_exceeded"` + 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. - - `"too_many_requests"` + - `size_bytes: optional number or null` - - `"query_too_long"` + The completed download's size. - - `"request_too_large"` + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` - - `type: "web_search_tool_result_error"` + A file download that failed — or was cancelled — during this call. - - `"web_search_tool_result_error"` + - `download_id: string` - - `array of WebSearchResultBlock` + The caller-assigned identifier for this download, stable across the state changes reporting it. - - `encrypted_content: string` + - `type: "download_failed"` - - `page_age: string or null` + - `"download_failed"` - - `title: string` + - `url: string` - - `type: "web_search_result"` + The final post-redirect URL the download was served from. - - `"web_search_result"` + - `error: optional string or null` - - `url: string` + The failure or cancellation detail, when known. -### Web Search Tool Result Block Param + - `is_error: optional boolean` -- `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `toolset_name: optional string or null` - - `content: WebSearchToolResultBlockParamContent` + For a toolset member tool_result, the toolset family of the paired tool_use. - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - - `encrypted_content: string` + - `id: string` - - `title: string` + - `input: map[unknown]` - - `type: "web_search_result"` + - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` - - `"web_search_result"` + - `"web_search"` - - `url: string` + - `"web_fetch"` - - `page_age: optional string or null` + - `"code_execution"` - - `WebSearchToolRequestError object { error_code, type }` + - `"bash_code_execution"` - - `error_code: WebSearchToolResultErrorCode` + - `"text_editor_code_execution"` - - `"invalid_tool_input"` + - `"tool_search_tool_regex"` - - `"unavailable"` + - `"tool_search_tool_bm25"` - - `"max_uses_exceeded"` + - `type: "server_tool_use"` - - `"too_many_requests"` + - `"server_tool_use"` - - `"query_too_long"` + - `cache_control: optional CacheControlEphemeral or null` - - `"request_too_large"` + Create a cache control breakpoint at this content block. - - `type: "web_search_tool_result_error"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"web_search_tool_result_error"` + Tool invocation directly from the model. - - `tool_use_id: string` + - `DirectCaller object { type }` - - `type: "web_search_tool_result"` + Tool invocation directly from the model. - - `"web_search_tool_result"` + - `ServerToolCaller object { tool_id, type }` - - `cache_control: optional CacheControlEphemeral or null` + Tool invocation generated by a server-side tool. - Create a cache control breakpoint at this content block. + - `ServerToolCaller20260120 object { tool_id, type }` - - `type: "ephemeral"` + - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `"ephemeral"` + - `content: WebSearchToolResultBlockParamContent` - - `ttl: optional "5m" or "1h"` + - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` - The time-to-live for the cache control breakpoint. + - `encrypted_content: string` - This may be one the following values: + - `title: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "web_search_result"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"web_search_result"` - - `"5m"` + - `url: string` - - `"1h"` + - `page_age: optional string or null` - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `WebSearchToolRequestError object { error_code, type }` - Tool invocation directly from the model. + - `error_code: WebSearchToolResultErrorCode` - - `DirectCaller object { type }` + - `"invalid_tool_input"` - Tool invocation directly from the model. + - `"unavailable"` - - `type: "direct"` + - `"max_uses_exceeded"` - - `"direct"` + - `"too_many_requests"` - - `ServerToolCaller object { tool_id, type }` + - `"query_too_long"` - Tool invocation generated by a server-side tool. + - `"request_too_large"` - - `tool_id: string` + - `type: "web_search_tool_result_error"` - - `type: "code_execution_20250825"` + - `"web_search_tool_result_error"` - - `"code_execution_20250825"` + - `tool_use_id: string` - - `ServerToolCaller20260120 object { tool_id, type }` + - `type: "web_search_tool_result"` - - `tool_id: string` + - `"web_search_tool_result"` - - `type: "code_execution_20260120"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_20260120"` + Create a cache control breakpoint at this content block. -### Web Search Tool Result Block Param Content + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` -- `WebSearchToolResultBlockParamContent = array of WebSearchResultBlockParam or WebSearchToolRequestError` + Tool invocation directly from the model. - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + - `DirectCaller object { type }` - - `encrypted_content: string` + Tool invocation directly from the model. - - `title: string` + - `ServerToolCaller object { tool_id, type }` - - `type: "web_search_result"` + Tool invocation generated by a server-side tool. - - `"web_search_result"` + - `ServerToolCaller20260120 object { tool_id, type }` - - `url: string` + - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` - - `page_age: optional string or null` + - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` - - `WebSearchToolRequestError object { error_code, type }` + - `WebFetchToolResultErrorBlockParam object { error_code, type }` - - `error_code: WebSearchToolResultErrorCode` + - `error_code: WebFetchToolResultErrorCode` - - `"invalid_tool_input"` + - `"invalid_tool_input"` - - `"unavailable"` + - `"url_too_long"` - - `"max_uses_exceeded"` + - `"url_not_allowed"` - - `"too_many_requests"` + - `"url_not_in_prior_context"` - - `"query_too_long"` + - `"url_not_accessible"` - - `"request_too_large"` + - `"unsupported_content_type"` - - `type: "web_search_tool_result_error"` + - `"too_many_requests"` - - `"web_search_tool_result_error"` + - `"max_uses_exceeded"` -### Web Search Tool Result Error + - `"unavailable"` -- `WebSearchToolResultError object { error_code, type }` + - `type: "web_fetch_tool_result_error"` - - `error_code: WebSearchToolResultErrorCode` + - `"web_fetch_tool_result_error"` - - `"invalid_tool_input"` + - `WebFetchBlockParam object { content, type, url, retrieved_at }` - - `"unavailable"` + - `content: DocumentBlockParam` - - `"max_uses_exceeded"` + - `type: "web_fetch_result"` - - `"too_many_requests"` + - `"web_fetch_result"` - - `"query_too_long"` + - `url: string` - - `"request_too_large"` + Fetched content URL - - `type: "web_search_tool_result_error"` + - `retrieved_at: optional string or null` - - `"web_search_tool_result_error"` + ISO 8601 timestamp when the content was retrieved -### Web Search Tool Result Error Code + - `tool_use_id: string` -- `WebSearchToolResultErrorCode = "invalid_tool_input" or "unavailable" or "max_uses_exceeded" or 3 more` + - `type: "web_fetch_tool_result"` - - `"invalid_tool_input"` + - `"web_fetch_tool_result"` - - `"unavailable"` + - `cache_control: optional CacheControlEphemeral or null` - - `"max_uses_exceeded"` + Create a cache control breakpoint at this content block. - - `"too_many_requests"` + - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` - - `"query_too_long"` + Tool invocation directly from the model. - - `"request_too_large"` + - `DirectCaller object { type }` -# Batches + Tool invocation directly from the model. -## Create a Message Batch + - `ServerToolCaller object { tool_id, type }` -**post** `/v1/messages/batches` + Tool invocation generated by a server-side tool. -Send a batch of Message creation requests. + - `ServerToolCaller20260120 object { tool_id, type }` -The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete. + - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` -Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing) + - `content: CodeExecutionToolResultBlockParamContent` -### Header Parameters + Code execution result with encrypted stdout for PFC + web_search results. -- `"anthropic-user-profile-id": optional string` + - `CodeExecutionToolResultErrorParam object { error_code, type }` - The user profile ID to attribute the requests in this batch to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header. Applies to every request in the batch; an individual request whose `user_profile_id` body field conflicts with this header is errored. + - `error_code: CodeExecutionToolResultErrorCode` -### Body Parameters + - `"invalid_tool_input"` -- `requests: array of object { custom_id, params }` + - `"unavailable"` - List of requests for prompt completion. Each is an individual request to create a Message. + - `"too_many_requests"` - - `custom_id: string` + - `"execution_time_exceeded"` - Developer-provided ID created for each request in a Message Batch. Useful for matching results to requests, as results may be given out of request order. + - `type: "code_execution_tool_result_error"` - Must be unique for each request within the Message Batch. + - `"code_execution_tool_result_error"` - - `params: object { max_tokens, messages, model, 15 more }` + - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - Messages API creation parameters for the individual request. + - `content: array of CodeExecutionOutputBlockParam` - See the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters. + - `file_id: string` - - `max_tokens: number` + - `type: "code_execution_output"` - The maximum number of tokens to generate before stopping. + - `"code_execution_output"` - Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate. + - `return_code: number` - 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. + - `stderr: string` - Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details. + - `stdout: string` - - `messages: array of MessageParam` + - `type: "code_execution_result"` - Input messages. + - `"code_execution_result"` - 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. + - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` - 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. + Code execution result with encrypted stdout for PFC + web_search results. - 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. + - `content: array of CodeExecutionOutputBlockParam` - Example with a single `user` message: + - `file_id: string` - ```json - [{"role": "user", "content": "Hello, Claude"}] - ``` + - `type: "code_execution_output"` - Example with multiple conversational turns: + - `encrypted_stdout: string` - ```json - [ - {"role": "user", "content": "Hello there."}, - {"role": "assistant", "content": "Hi, I'm Claude. How can I help you?"}, - {"role": "user", "content": "Can you explain LLMs in plain English?"}, - ] - ``` + - `return_code: number` - Example with a partially-filled response from Claude: + - `stderr: string` - ```json - [ - {"role": "user", "content": "What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun"}, - {"role": "assistant", "content": "The best answer is ("}, - ] - ``` + - `type: "encrypted_code_execution_result"` - 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: + - `"encrypted_code_execution_result"` - ```json - {"role": "user", "content": "Hello, Claude"} - ``` + - `tool_use_id: string` - ```json - {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} - ``` + - `type: "code_execution_tool_result"` - See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). + - `"code_execution_tool_result"` - 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. + - `cache_control: optional CacheControlEphemeral or null` - There is a limit of 100,000 messages in a single request. + Create a cache control breakpoint at this content block. - - `content: string or array of ContentBlockParam` + - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `string` + - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` - - `array of ContentBlockParam` + - `BashCodeExecutionToolResultErrorParam object { error_code, type }` - - `TextBlockParam object { text, type, cache_control, citations }` + - `error_code: BashCodeExecutionToolResultErrorCode` - - `text: string` + - `"invalid_tool_input"` - - `type: "text"` + - `"unavailable"` - - `"text"` + - `"too_many_requests"` - - `cache_control: optional CacheControlEphemeral or null` + - `"execution_time_exceeded"` - Create a cache control breakpoint at this content block. + - `"output_file_too_large"` - - `type: "ephemeral"` + - `type: "bash_code_execution_tool_result_error"` - - `"ephemeral"` + - `"bash_code_execution_tool_result_error"` - - `ttl: optional "5m" or "1h"` + - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` - The time-to-live for the cache control breakpoint. + - `content: array of BashCodeExecutionOutputBlockParam` - This may be one the following values: + - `file_id: string` - - `5m`: 5 minutes - - `1h`: 1 hour + - `type: "bash_code_execution_output"` - Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details. + - `"bash_code_execution_output"` - - `"5m"` + - `return_code: number` - - `"1h"` + - `stderr: string` - - `citations: optional array of TextCitationParam or null` + - `stdout: string` - - `CitationCharLocationParam object { cited_text, document_index, document_title, 3 more }` + - `type: "bash_code_execution_result"` - - `cited_text: string` + - `"bash_code_execution_result"` - - `document_index: number` + - `tool_use_id: string` - - `document_title: string or null` + - `type: "bash_code_execution_tool_result"` - - `end_char_index: number` + - `"bash_code_execution_tool_result"` - - `start_char_index: number` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "char_location"` + Create a cache control breakpoint at this content block. - - `"char_location"` + - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` - - `CitationPageLocationParam object { cited_text, document_index, document_title, 3 more }` + - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` - - `cited_text: string` + - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` - - `document_index: number` + - `error_code: TextEditorCodeExecutionToolResultErrorCode` - - `document_title: string or null` + - `"invalid_tool_input"` - - `end_page_number: number` + - `"unavailable"` - - `start_page_number: number` + - `"too_many_requests"` - - `type: "page_location"` + - `"execution_time_exceeded"` - - `"page_location"` + - `"file_not_found"` - - `CitationContentBlockLocationParam object { cited_text, document_index, document_title, 3 more }` + - `type: "text_editor_code_execution_tool_result_error"` - - `cited_text: string` + - `"text_editor_code_execution_tool_result_error"` - The full text of the cited block range, concatenated. + - `error_message: optional string or null` - 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. + - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` - - `document_index: number` + - `content: string` - - `document_title: string or null` + - `file_type: "text" or "image" or "pdf"` - - `end_block_index: number` + - `"text"` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `"image"` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `"pdf"` - - `start_block_index: number` + - `type: "text_editor_code_execution_view_result"` - 0-based index of the first cited block in the source's `content` array. + - `"text_editor_code_execution_view_result"` - - `type: "content_block_location"` + - `num_lines: optional number or null` - - `"content_block_location"` + - `start_line: optional number or null` - - `CitationWebSearchResultLocationParam object { cited_text, encrypted_index, title, 2 more }` + - `total_lines: optional number or null` - - `cited_text: string` + - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` - - `encrypted_index: string` + - `is_file_update: boolean` - - `title: string or null` + - `type: "text_editor_code_execution_create_result"` - - `type: "web_search_result_location"` + - `"text_editor_code_execution_create_result"` - - `"web_search_result_location"` + - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` - - `url: string` + - `type: "text_editor_code_execution_str_replace_result"` - - `CitationSearchResultLocationParam object { cited_text, end_block_index, search_result_index, 4 more }` + - `"text_editor_code_execution_str_replace_result"` - - `cited_text: string` + - `lines: optional array of string or null` - The full text of the cited block range, concatenated. + - `new_lines: optional number or null` - 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. + - `new_start: optional number or null` - - `end_block_index: number` + - `old_lines: optional number or null` - Exclusive 0-based end index of the cited block range in the source's `content` array. + - `old_start: optional number or null` - Always greater than `start_block_index`; a single-block citation has `end_block_index = start_block_index + 1`. + - `tool_use_id: string` - - `search_result_index: number` + - `type: "text_editor_code_execution_tool_result"` - 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. + - `"text_editor_code_execution_tool_result"` - Counted separately from `document_index`; server-side web search results are not included in this count. + - `cache_control: optional CacheControlEphemeral or null` - - `source: string` + Create a cache control breakpoint at this content block. - - `start_block_index: number` + - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` - 0-based index of the first cited block in the source's `content` array. + - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` - - `title: string or null` + - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` - - `type: "search_result_location"` + - `error_code: ToolSearchToolResultErrorCode` - - `"search_result_location"` + - `"invalid_tool_input"` - - `ImageBlockParam object { source, type, cache_control }` + - `"unavailable"` - - `source: Base64ImageSource or URLImageSource` + - `"too_many_requests"` - - `Base64ImageSource object { data, media_type, type }` + - `"execution_time_exceeded"` - - `data: string` + - `type: "tool_search_tool_result_error"` - - `media_type: "image/jpeg" or "image/png" or "image/gif" or "image/webp"` + - `"tool_search_tool_result_error"` - - `"image/jpeg"` + - `error_message: optional string or null` - - `"image/png"` + - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` - - `"image/gif"` + - `tool_references: array of ToolReferenceBlockParam` - - `"image/webp"` + - `tool_name: string` - - `type: "base64"` + - `type: "tool_reference"` - - `"base64"` + - `cache_control: optional CacheControlEphemeral or null` - - `URLImageSource object { type, url }` + Create a cache control breakpoint at this content block. - - `type: "url"` + - `type: "tool_search_tool_search_result"` - - `"url"` + - `"tool_search_tool_search_result"` - - `url: string` + - `tool_use_id: string` - - `type: "image"` + - `type: "tool_search_tool_result"` - - `"image"` + - `"tool_search_tool_result"` - `cache_control: optional CacheControlEphemeral or null` Create a cache control breakpoint at this content block. - - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` - - - `Base64PDFSource object { data, media_type, type }` - - - `data: string` + - `ContainerUploadBlockParam object { file_id, type, cache_control }` - - `media_type: "application/pdf"` + A content block that represents a file to be uploaded to the container + Files uploaded via this block will be available in the container's input directory. - - `"application/pdf"` + - `file_id: string` - - `type: "base64"` + - `type: "container_upload"` - - `"base64"` + - `"container_upload"` - - `PlainTextSource object { data, media_type, type }` + - `cache_control: optional CacheControlEphemeral or null` - - `data: string` + Create a cache control breakpoint at this content block. - - `media_type: "text/plain"` + - `role: "user" or "assistant" or "system"` - - `"text/plain"` + - `"user"` - - `type: "text"` + - `"assistant"` - - `"text"` + - `"system"` - - `ContentBlockSource object { content, type }` + - `model: Model` - - `content: string or array of ContentBlockSourceContent` + The model that will complete your prompt. - - `string` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `ContentBlockSourceContent = array of ContentBlockSourceContent` + - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` - - `TextBlockParam object { text, type, cache_control, citations }` + The model that will complete your prompt. - - `ImageBlockParam object { source, type, cache_control }` + See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. - - `type: "content"` + - `"claude-sonnet-5"` - - `"content"` + High-performance model for coding and agents - - `URLPDFSource object { type, url }` + - `"claude-fable-5"` - - `type: "url"` + Next generation of intelligence for the hardest knowledge work and coding problems - - `"url"` + - `"claude-mythos-5"` - - `url: string` + Most capable model for cybersecurity and biology research - - `type: "document"` + - `"claude-opus-5"` - - `"document"` + Powerful intelligence for long-running agents and coding - - `cache_control: optional CacheControlEphemeral or null` + - `"claude-opus-4-8"` - Create a cache control breakpoint at this content block. + Powerful intelligence for long-running agents and coding - - `citations: optional CitationsConfigParam or null` + - `"claude-opus-4-7"` - - `enabled: optional boolean` + Powerful intelligence for long-running agents and coding - - `context: optional string or null` + - `"claude-mythos-preview"` - - `title: optional string or null` + New class of intelligence, strongest in coding and cybersecurity - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `"claude-opus-4-6"` - - `content: array of TextBlockParam` + Powerful intelligence for long-running agents and coding - - `text: string` + - `"claude-sonnet-4-6"` - - `type: "text"` + Best combination of speed and intelligence - - `cache_control: optional CacheControlEphemeral or null` + - `"claude-haiku-4-5"` - Create a cache control breakpoint at this content block. + Fastest model with near-frontier intelligence - - `citations: optional array of TextCitationParam or null` + - `"claude-haiku-4-5-20251001"` - - `source: string` + Fastest model with near-frontier intelligence - - `title: string` + - `"claude-opus-4-5"` - - `type: "search_result"` + Powerful intelligence for long-running agents and coding - - `"search_result"` + - `"claude-opus-4-5-20251101"` - - `cache_control: optional CacheControlEphemeral or null` + Powerful intelligence for long-running agents and coding - Create a cache control breakpoint at this content block. + - `"claude-sonnet-4-5"` - - `citations: optional CitationsConfigParam` + High-performance model for agents and coding - - `ThinkingBlockParam object { signature, thinking, type }` + - `"claude-sonnet-4-5-20250929"` - - `signature: string` + High-performance model for agents and coding - 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. + - `string` - Thinking blocks must be passed back unmodified and in their original order; a modified block results in a 400 `invalid_request_error`. + - `cache_control: optional CacheControlEphemeral or null` - - `thinking: string` + Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. - The `thinking` text of this block as returned by the API. + - `container: optional MessageCreateParamsContainer or null` - - `type: "thinking"` + Container identifier for reuse across requests. - - `"thinking"` + - `ContainerParams object { id, skills }` - - `RedactedThinkingBlockParam object { data, type }` + Container parameters with skills to be loaded. - - `data: string` + - `id: optional string or null` - 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. + Container id - - `type: "redacted_thinking"` + - `skills: optional array of SkillParams or null` - - `"redacted_thinking"` + List of skills to load in the container - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `skill_id: string` - - `id: string` + Skill ID - - `input: map[unknown]` + - `type: "anthropic" or "custom"` - - `name: string` + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) - - `type: "tool_use"` + - `"anthropic"` - - `"tool_use"` + - `"custom"` - - `cache_control: optional CacheControlEphemeral or null` + - `version: optional string` - Create a cache control breakpoint at this content block. + Skill version or 'latest' for most recent version - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `string` - Tool invocation directly from the model. + - `inference_geo: optional string or null` - - `DirectCaller object { type }` + Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. - Tool invocation directly from the model. + - `metadata: optional Metadata` - - `type: "direct"` + An object describing metadata about the request. - - `"direct"` + - `user_id: optional string or null` - - `ServerToolCaller object { tool_id, type }` + An external identifier for the user who is associated with the request. - Tool invocation generated by a server-side tool. + 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. - - `tool_id: string` + - `output_config: optional OutputConfig` - - `type: "code_execution_20250825"` + Configuration options for the model's output, such as the output format. - - `"code_execution_20250825"` + - `effort: optional "low" or "medium" or "high" or 2 more or null` - - `ServerToolCaller20260120 object { tool_id, type }` + All possible effort levels. - - `tool_id: string` + - `"low"` - - `type: "code_execution_20260120"` + - `"medium"` - - `"code_execution_20260120"` + - `"high"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `"xhigh"` - - `tool_use_id: string` + - `"max"` - - `type: "tool_result"` + - `format: optional JSONOutputFormat or null` - - `"tool_result"` + A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) - - `cache_control: optional CacheControlEphemeral or null` + - `schema: map[unknown]` - Create a cache control breakpoint at this content block. + The JSON schema of the format - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `type: "json_schema"` - - `string` + - `"json_schema"` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `service_tier: optional "auto" or "standard_only"` - - `TextBlockParam object { text, type, cache_control, citations }` + Determines whether to use priority capacity (if available) or standard capacity for this request. - - `ImageBlockParam object { source, type, cache_control }` + Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. - - `SearchResultBlockParam object { content, source, title, 3 more }` + - `"auto"` - - `DocumentBlockParam object { source, type, cache_control, 3 more }` + - `"standard_only"` - - `ToolReferenceBlockParam object { tool_name, type, cache_control }` + - `stop_sequences: optional array of string` - Tool reference block that can be included in tool_result content. + Custom text sequences that will cause the model to stop generating. - - `tool_name: string` + Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`. - - `type: "tool_reference"` + 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. - - `"tool_reference"` + - `stream: optional boolean` - - `cache_control: optional CacheControlEphemeral or null` + Whether to incrementally stream the response using server-sent events. - Create a cache control breakpoint at this content block. + See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details. - - `is_error: optional boolean` + - `system: optional string or array of TextBlockParam` - - `ServerToolUseBlockParam object { id, input, name, 3 more }` + System prompt. - - `id: string` + 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). - - `input: map[unknown]` + - `string` - - `name: "web_search" or "web_fetch" or "code_execution" or 4 more` + - `array of TextBlockParam` - - `"web_search"` + - `text: string` - - `"web_fetch"` + - `type: "text"` - - `"code_execution"` + - `cache_control: optional CacheControlEphemeral or null` - - `"bash_code_execution"` + Create a cache control breakpoint at this content block. - - `"text_editor_code_execution"` + - `citations: optional array of TextCitationParam or null` - - `"tool_search_tool_regex"` + - `temperature: optional number` - - `"tool_search_tool_bm25"` + Amount of randomness injected into the response. - - `type: "server_tool_use"` + 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. - - `"server_tool_use"` + Note that even with `temperature` of `0.0`, the results will not be fully deterministic. - - `cache_control: optional CacheControlEphemeral or null` + - `thinking: optional ThinkingConfigParam` - Create a cache control breakpoint at this content block. + Configuration for enabling Claude's extended thinking. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + 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. - Tool invocation directly from the model. + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `DirectCaller object { type }` + - `ThinkingConfigEnabled object { budget_tokens, type, display }` - Tool invocation directly from the model. + - `budget_tokens: number` - - `ServerToolCaller object { tool_id, type }` + 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. - Tool invocation generated by a server-side tool. + Must be ≥1024 and less than `max_tokens`. - - `ServerToolCaller20260120 object { tool_id, type }` + See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. - - `WebSearchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + - `type: "enabled"` - - `content: WebSearchToolResultBlockParamContent` + - `"enabled"` - - `WebSearchToolResultBlockItem = array of WebSearchResultBlockParam` + - `display: optional "summarized" or "omitted" or null` - - `encrypted_content: string` + 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`. - - `title: string` + - `"summarized"` - - `type: "web_search_result"` + - `"omitted"` - - `"web_search_result"` + - `ThinkingConfigDisabled object { type }` - - `url: string` + - `type: "disabled"` - - `page_age: optional string or null` + - `"disabled"` - - `WebSearchToolRequestError object { error_code, type }` + - `ThinkingConfigAdaptive object { type, display }` - - `error_code: WebSearchToolResultErrorCode` + - `type: "adaptive"` - - `"invalid_tool_input"` + - `"adaptive"` - - `"unavailable"` + - `display: optional "summarized" or "omitted" or null` - - `"max_uses_exceeded"` + 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`. - - `"too_many_requests"` + - `"summarized"` - - `"query_too_long"` + - `"omitted"` - - `"request_too_large"` + - `tool_choice: optional ToolChoice` - - `type: "web_search_tool_result_error"` + 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. - - `"web_search_tool_result_error"` + - `ToolChoiceAuto object { type, disable_parallel_tool_use }` - - `tool_use_id: string` + The model will automatically decide whether to use tools. - - `type: "web_search_tool_result"` + - `type: "auto"` - - `"web_search_tool_result"` + - `"auto"` - - `cache_control: optional CacheControlEphemeral or null` + - `disable_parallel_tool_use: optional boolean` - Create a cache control breakpoint at this content block. + Whether to disable parallel tool use. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + Defaults to `false`. If set to `true`, the model will output at most one tool use. - Tool invocation directly from the model. + - `ToolChoiceAny object { type, disable_parallel_tool_use }` - - `DirectCaller object { type }` + The model will use any available tools. - Tool invocation directly from the model. + - `type: "any"` - - `ServerToolCaller object { tool_id, type }` + - `"any"` - Tool invocation generated by a server-side tool. + - `disable_parallel_tool_use: optional boolean` - - `ServerToolCaller20260120 object { tool_id, type }` + Whether to disable parallel tool use. - - `WebFetchToolResultBlockParam object { content, tool_use_id, type, 2 more }` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `content: WebFetchToolResultErrorBlockParam or WebFetchBlockParam` + - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` - - `WebFetchToolResultErrorBlockParam object { error_code, type }` + The model will use the specified tool with `tool_choice.name`. - - `error_code: WebFetchToolResultErrorCode` + - `name: string` - - `"invalid_tool_input"` + The name of the tool to use. - - `"url_too_long"` + - `type: "tool"` - - `"url_not_allowed"` + - `"tool"` - - `"url_not_in_prior_context"` + - `disable_parallel_tool_use: optional boolean` - - `"url_not_accessible"` + Whether to disable parallel tool use. - - `"unsupported_content_type"` + Defaults to `false`. If set to `true`, the model will output exactly one tool use. - - `"too_many_requests"` + - `ToolChoiceNone object { type }` - - `"max_uses_exceeded"` + The model will not be allowed to use tools. - - `"unavailable"` + - `type: "none"` - - `type: "web_fetch_tool_result_error"` + - `"none"` - - `"web_fetch_tool_result_error"` + - `tools: optional array of ToolUnion` - - `WebFetchBlockParam object { content, type, url, retrieved_at }` + Definitions of tools that the model may use. - - `content: DocumentBlockParam` + 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. - - `type: "web_fetch_result"` + 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)). - - `"web_fetch_result"` + Each tool definition includes: - - `url: string` + * `name`: Name of the tool. + * `description`: Optional, but strongly-recommended description of the tool. + * `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. - Fetched content URL + For example, if you defined `tools` as: - - `retrieved_at: optional string or null` + ```json + [ + { + "name": "get_stock_price", + "description": "Get the current stock price for a given ticker symbol.", + "input_schema": { + "type": "object", + "properties": { + "ticker": { + "type": "string", + "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." + } + }, + "required": ["ticker"] + } + } + ] + ``` - ISO 8601 timestamp when the content was retrieved + 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: - - `tool_use_id: string` + ```json + [ + { + "type": "tool_use", + "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "name": "get_stock_price", + "input": { "ticker": "^GSPC" } + } + ] + ``` - - `type: "web_fetch_tool_result"` + 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: - - `"web_fetch_tool_result"` + ```json + [ + { + "type": "tool_result", + "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", + "content": "259.75 USD" + } + ] + ``` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. - - `caller: optional DirectCaller or ServerToolCaller or ServerToolCaller20260120` + - `Tool object { input_schema, name, allowed_callers, 7 more }` - Tool invocation directly from the model. + - `input_schema: object { type, properties, required }` - - `DirectCaller object { type }` + [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. - Tool invocation directly from the model. + This defines the shape of the `input` that your tool accepts and that the model will produce. - - `ServerToolCaller object { tool_id, type }` + - `type: "object"` - Tool invocation generated by a server-side tool. + - `"object"` - - `ServerToolCaller20260120 object { tool_id, type }` + - `properties: optional map[unknown] or null` - - `CodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `required: optional array of string or null` - - `content: CodeExecutionToolResultBlockParamContent` + - `name: string` - Code execution result with encrypted stdout for PFC + web_search results. + Name of the tool. - - `CodeExecutionToolResultErrorParam object { error_code, type }` + This is how the tool will be called by the model and in `tool_use` blocks. - - `error_code: CodeExecutionToolResultErrorCode` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"invalid_tool_input"` + - `"direct"` - - `"unavailable"` + - `"code_execution_20250825"` - - `"too_many_requests"` + - `"code_execution_20260120"` - - `"execution_time_exceeded"` + - `"code_execution_20260521"` - - `type: "code_execution_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` - - `"code_execution_tool_result_error"` + Create a cache control breakpoint at this content block. - - `CodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `defer_loading: optional boolean` - - `content: array of CodeExecutionOutputBlockParam` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `file_id: string` + - `description: optional string` - - `type: "code_execution_output"` + Description of what this tool does. - - `"code_execution_output"` + 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. - - `return_code: number` + - `eager_input_streaming: optional boolean or null` - - `stderr: string` + 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. - - `stdout: string` + - `input_examples: optional array of map[unknown]` - - `type: "code_execution_result"` + - `strict: optional boolean` - - `"code_execution_result"` + When true, guarantees schema validation on tool names and inputs - - `EncryptedCodeExecutionResultBlockParam object { content, encrypted_stdout, return_code, 2 more }` + - `type: optional "custom" or null` - Code execution result with encrypted stdout for PFC + web_search results. + - `"custom"` - - `content: array of CodeExecutionOutputBlockParam` + - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` - - `file_id: string` + - `name: "bash"` - - `type: "code_execution_output"` + Name of the tool. - - `encrypted_stdout: string` + This is how the tool will be called by the model and in `tool_use` blocks. - - `return_code: number` + - `"bash"` - - `stderr: string` + - `type: "bash_20250124"` - - `type: "encrypted_code_execution_result"` + - `"bash_20250124"` - - `"encrypted_code_execution_result"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `tool_use_id: string` + - `"direct"` - - `type: "code_execution_tool_result"` + - `"code_execution_20250825"` - - `"code_execution_tool_result"` + - `"code_execution_20260120"` - - `cache_control: optional CacheControlEphemeral or null` + - `"code_execution_20260521"` - Create a cache control breakpoint at this content block. + - `cache_control: optional CacheControlEphemeral or null` - - `BashCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + Create a cache control breakpoint at this content block. - - `content: BashCodeExecutionToolResultErrorParam or BashCodeExecutionResultBlockParam` + - `defer_loading: optional boolean` - - `BashCodeExecutionToolResultErrorParam object { error_code, type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `error_code: BashCodeExecutionToolResultErrorCode` + - `input_examples: optional array of map[unknown]` - - `"invalid_tool_input"` + - `strict: optional boolean` - - `"unavailable"` + When true, guarantees schema validation on tool names and inputs - - `"too_many_requests"` + - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` - - `"execution_time_exceeded"` + - `name: "code_execution"` - - `"output_file_too_large"` + Name of the tool. - - `type: "bash_code_execution_tool_result_error"` + This is how the tool will be called by the model and in `tool_use` blocks. - - `"bash_code_execution_tool_result_error"` + - `"code_execution"` - - `BashCodeExecutionResultBlockParam object { content, return_code, stderr, 2 more }` + - `type: "code_execution_20250522"` - - `content: array of BashCodeExecutionOutputBlockParam` + - `"code_execution_20250522"` - - `file_id: string` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "bash_code_execution_output"` + - `"direct"` - - `"bash_code_execution_output"` + - `"code_execution_20250825"` - - `return_code: number` + - `"code_execution_20260120"` - - `stderr: string` + - `"code_execution_20260521"` - - `stdout: string` + - `cache_control: optional CacheControlEphemeral or null` - - `type: "bash_code_execution_result"` + Create a cache control breakpoint at this content block. - - `"bash_code_execution_result"` + - `defer_loading: optional boolean` - - `tool_use_id: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `type: "bash_code_execution_tool_result"` + - `strict: optional boolean` - - `"bash_code_execution_tool_result"` + When true, guarantees schema validation on tool names and inputs - - `cache_control: optional CacheControlEphemeral or null` + - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` - Create a cache control breakpoint at this content block. + - `name: "code_execution"` - - `TextEditorCodeExecutionToolResultBlockParam object { content, tool_use_id, type, cache_control }` + Name of the tool. - - `content: TextEditorCodeExecutionToolResultErrorParam or TextEditorCodeExecutionViewResultBlockParam or TextEditorCodeExecutionCreateResultBlockParam or TextEditorCodeExecutionStrReplaceResultBlockParam` + This is how the tool will be called by the model and in `tool_use` blocks. - - `TextEditorCodeExecutionToolResultErrorParam object { error_code, type, error_message }` + - `"code_execution"` - - `error_code: TextEditorCodeExecutionToolResultErrorCode` + - `type: "code_execution_20250825"` - - `"invalid_tool_input"` + - `"code_execution_20250825"` - - `"unavailable"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"too_many_requests"` + - `"direct"` - - `"execution_time_exceeded"` + - `"code_execution_20250825"` - - `"file_not_found"` + - `"code_execution_20260120"` - - `type: "text_editor_code_execution_tool_result_error"` + - `"code_execution_20260521"` - - `"text_editor_code_execution_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` - - `error_message: optional string or null` + Create a cache control breakpoint at this content block. - - `TextEditorCodeExecutionViewResultBlockParam object { content, file_type, type, 3 more }` + - `defer_loading: optional boolean` - - `content: string` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `file_type: "text" or "image" or "pdf"` + - `strict: optional boolean` - - `"text"` + When true, guarantees schema validation on tool names and inputs - - `"image"` + - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` - - `"pdf"` + Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). - - `type: "text_editor_code_execution_view_result"` + - `name: "code_execution"` - - `"text_editor_code_execution_view_result"` + Name of the tool. - - `num_lines: optional number or null` + This is how the tool will be called by the model and in `tool_use` blocks. - - `start_line: optional number or null` + - `"code_execution"` - - `total_lines: optional number or null` + - `type: "code_execution_20260120"` - - `TextEditorCodeExecutionCreateResultBlockParam object { is_file_update, type }` + - `"code_execution_20260120"` - - `is_file_update: boolean` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `type: "text_editor_code_execution_create_result"` + - `"direct"` - - `"text_editor_code_execution_create_result"` + - `"code_execution_20250825"` - - `TextEditorCodeExecutionStrReplaceResultBlockParam object { type, lines, new_lines, 3 more }` + - `"code_execution_20260120"` - - `type: "text_editor_code_execution_str_replace_result"` + - `"code_execution_20260521"` - - `"text_editor_code_execution_str_replace_result"` + - `cache_control: optional CacheControlEphemeral or null` - - `lines: optional array of string or null` + Create a cache control breakpoint at this content block. - - `new_lines: optional number or null` + - `defer_loading: optional boolean` - - `new_start: optional number or null` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `old_lines: optional number or null` + - `strict: optional boolean` - - `old_start: optional number or null` + When true, guarantees schema validation on tool names and inputs - - `tool_use_id: string` + - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` - - `type: "text_editor_code_execution_tool_result"` + Code execution tool with REPL state persistence. - - `"text_editor_code_execution_tool_result"` + - `name: "code_execution"` - - `cache_control: optional CacheControlEphemeral or null` + Name of the tool. - Create a cache control breakpoint at this content block. + This is how the tool will be called by the model and in `tool_use` blocks. - - `ToolSearchToolResultBlockParam object { content, tool_use_id, type, cache_control }` + - `"code_execution"` - - `content: ToolSearchToolResultErrorParam or ToolSearchToolSearchResultBlockParam` + - `type: "code_execution_20260521"` - - `ToolSearchToolResultErrorParam object { error_code, type, error_message }` + - `"code_execution_20260521"` - - `error_code: ToolSearchToolResultErrorCode` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `"invalid_tool_input"` + - `"direct"` - - `"unavailable"` + - `"code_execution_20250825"` - - `"too_many_requests"` + - `"code_execution_20260120"` - - `"execution_time_exceeded"` + - `"code_execution_20260521"` - - `type: "tool_search_tool_result_error"` + - `cache_control: optional CacheControlEphemeral or null` - - `"tool_search_tool_result_error"` + Create a cache control breakpoint at this content block. - - `error_message: optional string or null` + - `defer_loading: optional boolean` - - `ToolSearchToolSearchResultBlockParam object { tool_references, type }` + If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `tool_references: array of ToolReferenceBlockParam` + - `strict: optional boolean` - - `tool_name: string` + When true, guarantees schema validation on tool names and inputs - - `type: "tool_reference"` + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `cache_control: optional CacheControlEphemeral or null` + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. - Create a cache control breakpoint at this content block. + - `type: "browser_toolset_20260801"` - - `type: "tool_search_tool_search_result"` + - `"browser_toolset_20260801"` - - `"tool_search_tool_search_result"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - - `tool_use_id: string` + - `"direct"` - - `type: "tool_search_tool_result"` + - `"code_execution_20250825"` - - `"tool_search_tool_result"` + - `"code_execution_20260120"` - - `cache_control: optional CacheControlEphemeral or null` + - `"code_execution_20260521"` - Create a cache control breakpoint at this content block. + - `cache_control: optional CacheControlEphemeral or null` - - `ContainerUploadBlockParam object { file_id, type, cache_control }` + Create a cache control breakpoint at this content block. - A content block that represents a file to be uploaded to the container - Files uploaded via this block will be available in the container's input directory. + - `configs: optional BrowserToolsetConfigs or null` - - `file_id: string` + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `type: "container_upload"` + - `close_tab: optional BrowserCloseTabConfig or null` - - `"container_upload"` + `close_tab`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `MidConversationSystemBlockParam object { content, type, cache_control }` + - `enabled: optional boolean or null` - System instructions that appear mid-conversation. + 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. - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. + - `double_click: optional BrowserDoubleClickConfig or null` - - `content: array of TextBlockParam` + `double_click`'s config overrides. - System instruction text blocks. + - `defer_loading: optional boolean or null` - - `text: string` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "text"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `file_upload: optional BrowserFileUploadConfig or null` - - `citations: optional array of TextCitationParam or null` + `file_upload`'s config overrides. - - `type: "mid_conv_system"` + - `defer_loading: optional boolean or null` - - `"mid_conv_system"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `role: "user" or "assistant" or "system"` + - `find: optional BrowserFindConfig or null` - - `"user"` + `find`'s config overrides. - - `"assistant"` + - `defer_loading: optional boolean or null` - - `"system"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `model: Model` + - `enabled: optional boolean or null` - The model that will complete your prompt. + 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. - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + - `form_input: optional BrowserFormInputConfig or null` - - `"claude-sonnet-5" or "claude-fable-5" or "claude-mythos-5" or 12 more` + `form_input`'s config overrides. - The model that will complete your prompt. + - `defer_loading: optional boolean or null` - See [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"claude-sonnet-5"` + - `enabled: optional boolean or null` - High-performance model for coding and agents + 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. - - `"claude-fable-5"` + - `get_page_text: optional BrowserGetPageTextConfig or null` - Next generation of intelligence for the hardest knowledge work and coding problems + `get_page_text`'s config overrides. - - `"claude-mythos-5"` + - `defer_loading: optional boolean or null` - Most capable model for cybersecurity and biology research + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"claude-opus-5"` + - `enabled: optional boolean or null` - Powerful intelligence for long-running agents and coding + 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. - - `"claude-opus-4-8"` + - `hold_key: optional BrowserHoldKeyConfig or null` - Powerful intelligence for long-running agents and coding + `hold_key`'s config overrides. - - `"claude-opus-4-7"` + - `defer_loading: optional boolean or null` - Powerful intelligence for long-running agents and coding + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"claude-mythos-preview"` + - `enabled: optional boolean or null` - New class of intelligence, strongest in coding and cybersecurity + 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. - - `"claude-opus-4-6"` + - `hover: optional BrowserHoverConfig or null` - Powerful intelligence for long-running agents and coding + `hover`'s config overrides. - - `"claude-sonnet-4-6"` + - `defer_loading: optional boolean or null` - Best combination of speed and intelligence + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"claude-haiku-4-5"` + - `enabled: optional boolean or null` - Fastest model with near-frontier intelligence + 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. - - `"claude-haiku-4-5-20251001"` + - `javascript_exec: optional BrowserJavascriptExecConfig or null` - Fastest model with near-frontier intelligence + `javascript_exec`'s config overrides. - - `"claude-opus-4-5"` + - `defer_loading: optional boolean or null` - Powerful intelligence for long-running agents and coding + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"claude-opus-4-5-20251101"` + - `enabled: optional boolean or null` - Powerful intelligence for long-running agents and coding + 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. - - `"claude-sonnet-4-5"` + - `key: optional BrowserKeyConfig or null` - High-performance model for agents and coding + `key`'s config overrides. - - `"claude-sonnet-4-5-20250929"` + - `defer_loading: optional boolean or null` - High-performance model for agents and coding + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `string` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. + - `left_click: optional BrowserLeftClickConfig or null` - - `container: optional string or null` + `left_click`'s config overrides. - Container identifier for reuse across requests. + - `defer_loading: optional boolean or null` - - `inference_geo: optional string or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. + - `enabled: optional boolean or null` - - `metadata: optional Metadata` + 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. - An object describing metadata about the request. + - `left_click_drag: optional BrowserLeftClickDragConfig or null` - - `user_id: optional string or null` + `left_click_drag`'s config overrides. - An external identifier for the user who is associated with the request. + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `output_config: optional OutputConfig` + - `enabled: optional boolean or null` - Configuration options for the model's output, such as the output format. + 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. - - `effort: optional "low" or "medium" or "high" or 2 more or null` + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` - All possible effort levels. + `left_mouse_down`'s config overrides. - - `"low"` + - `defer_loading: optional boolean or null` - - `"medium"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"high"` + - `enabled: optional boolean or null` - - `"xhigh"` + 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. - - `"max"` + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` - - `format: optional JSONOutputFormat or null` + `left_mouse_up`'s config overrides. - A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) + - `defer_loading: optional boolean or null` - - `schema: map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - The JSON schema of the format + - `enabled: optional boolean or null` - - `type: "json_schema"` + 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. - - `"json_schema"` + - `list_tabs: optional BrowserListTabsConfig or null` - - `service_tier: optional "auto" or "standard_only"` + `list_tabs`'s config overrides. - Determines whether to use priority capacity (if available) or standard capacity for this request. + - `defer_loading: optional boolean or null` - Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"auto"` + - `enabled: optional boolean or null` - - `"standard_only"` + 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. - - `stop_sequences: optional array of string` + - `middle_click: optional BrowserMiddleClickConfig or null` - Custom text sequences that will cause the model to stop generating. + `middle_click`'s config overrides. - Our models will normally stop when they have naturally completed their turn, which will result in a response `stop_reason` of `"end_turn"`. + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `stream: optional boolean` + - `enabled: optional boolean or null` - Whether to incrementally stream the response using server-sent events. + 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. - See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details. + - `mouse_move: optional BrowserMouseMoveConfig or null` - - `system: optional string or array of TextBlockParam` + `mouse_move`'s config overrides. - System prompt. + - `defer_loading: optional boolean or null` - 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). + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `string` + - `enabled: optional boolean or null` - - `array of TextBlockParam` + 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. - - `text: string` + - `navigate: optional BrowserNavigateConfig or null` - - `type: "text"` + `navigate`'s config overrides. - - `cache_control: optional CacheControlEphemeral or null` + - `defer_loading: optional boolean or null` - Create a cache control breakpoint at this content block. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `citations: optional array of TextCitationParam or null` + - `enabled: optional boolean or null` - - `temperature: optional number` + 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. - Amount of randomness injected into the response. + - `new_tab: optional BrowserNewTabConfig or null` - 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. + `new_tab`'s config overrides. - Note that even with `temperature` of `0.0`, the results will not be fully deterministic. + - `defer_loading: optional boolean or null` - - `thinking: optional ThinkingConfigParam` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Configuration for enabling Claude's extended thinking. + - `enabled: optional boolean or null` - 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. + 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. - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + - `read_console: optional BrowserReadConsoleConfig or null` - - `ThinkingConfigEnabled object { budget_tokens, type, display }` + `read_console`'s config overrides. - - `budget_tokens: number` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Must be ≥1024 and less than `max_tokens`. + - `enabled: optional boolean or null` - See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details. + 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. - - `type: "enabled"` + - `read_network: optional BrowserReadNetworkConfig or null` - - `"enabled"` + `read_network`'s config overrides. - - `display: optional "summarized" or "omitted" or null` + - `defer_loading: optional boolean or null` - 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`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"summarized"` + - `enabled: optional boolean or null` - - `"omitted"` + 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. - - `ThinkingConfigDisabled object { type }` + - `read_page: optional BrowserReadPageConfig or null` - - `type: "disabled"` + `read_page`'s config overrides. - - `"disabled"` + - `defer_loading: optional boolean or null` - - `ThinkingConfigAdaptive object { type, display }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "adaptive"` + - `enabled: optional boolean or null` - - `"adaptive"` + 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. - - `display: optional "summarized" or "omitted" or null` + - `right_click: optional BrowserRightClickConfig or null` - 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`. + `right_click`'s config overrides. - - `"summarized"` + - `defer_loading: optional boolean or null` - - `"omitted"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `tool_choice: optional ToolChoice` + - `enabled: optional boolean or null` - 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. + 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. - - `ToolChoiceAuto object { type, disable_parallel_tool_use }` + - `screenshot: optional BrowserScreenshotConfig or null` - The model will automatically decide whether to use tools. + `screenshot`'s config overrides. - - `type: "auto"` + - `defer_loading: optional boolean or null` - - `"auto"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `disable_parallel_tool_use: optional boolean` + - `enabled: optional boolean or null` - Whether to disable parallel tool use. + 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. - Defaults to `false`. If set to `true`, the model will output at most one tool use. + - `scroll: optional BrowserScrollConfig or null` - - `ToolChoiceAny object { type, disable_parallel_tool_use }` + `scroll`'s config overrides. - The model will use any available tools. + - `defer_loading: optional boolean or null` - - `type: "any"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"any"` + - `enabled: optional boolean or null` - - `disable_parallel_tool_use: optional boolean` + 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. - Whether to disable parallel tool use. + - `scroll_to: optional BrowserScrollToConfig or null` - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + `scroll_to`'s config overrides. - - `ToolChoiceTool object { name, type, disable_parallel_tool_use }` + - `defer_loading: optional boolean or null` - The model will use the specified tool with `tool_choice.name`. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: string` + - `enabled: optional boolean or null` - The name of the tool to use. + 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. - - `type: "tool"` + - `switch_tab: optional BrowserSwitchTabConfig or null` - - `"tool"` + `switch_tab`'s config overrides. - - `disable_parallel_tool_use: optional boolean` + - `defer_loading: optional boolean or null` - Whether to disable parallel tool use. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Defaults to `false`. If set to `true`, the model will output exactly one tool use. + - `enabled: optional boolean or null` - - `ToolChoiceNone object { type }` + 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. - The model will not be allowed to use tools. + - `triple_click: optional BrowserTripleClickConfig or null` - - `type: "none"` + `triple_click`'s config overrides. - - `"none"` + - `defer_loading: optional boolean or null` - - `tools: optional array of ToolUnion` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Definitions of tools that the model may use. + - `enabled: optional boolean or null` - 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. + 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. - 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)). + - `type: optional BrowserTypeConfig or null` - Each tool definition includes: + `type`'s config overrides. - * `name`: Name of the tool. - * `description`: Optional, but strongly-recommended description of the tool. - * `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. + - `defer_loading: optional boolean or null` - For example, if you defined `tools` as: + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - ```json - [ - { - "name": "get_stock_price", - "description": "Get the current stock price for a given ticker symbol.", - "input_schema": { - "type": "object", - "properties": { - "ticker": { - "type": "string", - "description": "The stock ticker symbol, e.g. AAPL for Apple Inc." - } - }, - "required": ["ticker"] - } - } - ] - ``` + - `enabled: optional boolean or null` - 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: + 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. - ```json - [ - { - "type": "tool_use", - "id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", - "name": "get_stock_price", - "input": { "ticker": "^GSPC" } - } - ] - ``` + - `wait: optional BrowserWaitConfig or null` - 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: + `wait`'s config overrides. - ```json - [ - { - "type": "tool_result", - "tool_use_id": "toolu_01D7FLrfh4GYq7yT1ULFeyMV", - "content": "259.75 USD" - } - ] - ``` + - `defer_loading: optional boolean or null` - 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. + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details. + - `enabled: optional boolean or null` - - `Tool object { input_schema, name, allowed_callers, 7 more }` + 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. - - `input_schema: object { type, properties, required }` + - `zoom: optional BrowserZoomConfig or null` - [JSON schema](https://json-schema.org/draft/2020-12) for this tool's input. + `zoom`'s config overrides. - This defines the shape of the `input` that your tool accepts and that the model will produce. + - `defer_loading: optional boolean or null` - - `type: "object"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"object"` + - `enabled: optional boolean or null` - - `properties: optional map[unknown] or null` + 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. - - `required: optional array of string or null` + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - - `name: string` + - `name: "memory"` Name of the tool. This is how the tool will be called by the model and in `tool_use` blocks. + - `"memory"` + + - `type: "memory_20250818"` + + - `"memory_20250818"` + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` - `"direct"` @@ -22433,39 +29140,26 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. - - `description: optional string` - - Description of what this tool does. - - 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. - - - `eager_input_streaming: optional boolean or null` - - 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. - - `input_examples: optional array of map[unknown]` - `strict: optional boolean` When true, guarantees schema validation on tool names and inputs - - `type: optional "custom" or null` - - - `"custom"` - - - `ToolBash20250124 object { name, type, allowed_callers, 4 more }` - - - `name: "bash"` - - Name of the tool. - - This is how the tool will be called by the model and in `tool_use` blocks. + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` - - `"bash"` + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. - - `type: "bash_20250124"` + - `type: "computer_toolset_20260801"` - - `"bash_20250124"` + - `"computer_toolset_20260801"` - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` @@ -22481,201 +29175,218 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `defer_loading: optional boolean` + - `configs: optional ComputerToolsetConfigs or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. - - `input_examples: optional array of map[unknown]` + - `cursor_position: optional ComputerCursorPositionConfig or null` - - `strict: optional boolean` + `cursor_position`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `CodeExecutionTool20250522 object { name, type, allowed_callers, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "code_execution"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `double_click: optional ComputerDoubleClickConfig or null` - - `"code_execution"` + `double_click`'s config overrides. - - `type: "code_execution_20250522"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250522"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `hold_key: optional ComputerHoldKeyConfig or null` - - `"code_execution_20260120"` + `hold_key`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `key: optional ComputerKeyConfig or null` - - `strict: optional boolean` + `key`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `CodeExecutionTool20250825 object { name, type, allowed_callers, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `name: "code_execution"` + - `enabled: optional boolean or null` - Name of the tool. + 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. - This is how the tool will be called by the model and in `tool_use` blocks. + - `left_click: optional ComputerLeftClickConfig or null` - - `"code_execution"` + `left_click`'s config overrides. - - `type: "code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20250825"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"direct"` + 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. - - `"code_execution_20250825"` + - `left_click_drag: optional ComputerLeftClickDragConfig or null` - - `"code_execution_20260120"` + `left_click_drag`'s config overrides. - - `"code_execution_20260521"` + - `defer_loading: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Create a cache control breakpoint at this content block. + - `enabled: optional boolean or null` - - `defer_loading: optional boolean` + 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. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` - - `strict: optional boolean` + `left_mouse_down`'s config overrides. - When true, guarantees schema validation on tool names and inputs + - `defer_loading: optional boolean or null` - - `CodeExecutionTool20260120 object { name, type, allowed_callers, 3 more }` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - Code execution tool with REPL state persistence (daemon mode + gVisor checkpoint). + - `enabled: optional boolean or null` - - `name: "code_execution"` + 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. - Name of the tool. + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` - This is how the tool will be called by the model and in `tool_use` blocks. + `left_mouse_up`'s config overrides. - - `"code_execution"` + - `defer_loading: optional boolean or null` - - `type: "code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260120"` + - `enabled: optional boolean or null` - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + 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. - - `"direct"` + - `middle_click: optional ComputerMiddleClickConfig or null` - - `"code_execution_20250825"` + `middle_click`'s config overrides. - - `"code_execution_20260120"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260521"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `cache_control: optional CacheControlEphemeral or null` + - `enabled: optional boolean or null` - Create a cache control breakpoint at this content block. + 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. - - `defer_loading: optional boolean` + - `mouse_move: optional ComputerMouseMoveConfig or null` - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + `mouse_move`'s config overrides. - - `strict: optional boolean` + - `defer_loading: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `CodeExecutionTool20260521 object { name, type, allowed_callers, 3 more }` + - `enabled: optional boolean or null` - Code execution tool with REPL state persistence. + 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. - - `name: "code_execution"` + - `right_click: optional ComputerRightClickConfig or null` - Name of the tool. + `right_click`'s config overrides. - This is how the tool will be called by the model and in `tool_use` blocks. + - `defer_loading: optional boolean or null` - - `"code_execution"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "code_execution_20260521"` + - `enabled: optional boolean or null` - - `"code_execution_20260521"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `screenshot: optional ComputerScreenshotConfig or null` - - `"direct"` + `screenshot`'s config overrides. - - `"code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `scroll: optional ComputerScrollConfig or null` - - `defer_loading: optional boolean` + `scroll`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `strict: optional boolean` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - When true, guarantees schema validation on tool names and inputs + - `enabled: optional boolean or null` - - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` + 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. - - `name: "memory"` + - `triple_click: optional ComputerTripleClickConfig or null` - Name of the tool. + `triple_click`'s config overrides. - This is how the tool will be called by the model and in `tool_use` blocks. + - `defer_loading: optional boolean or null` - - `"memory"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `type: "memory_20250818"` + - `enabled: optional boolean or null` - - `"memory_20250818"` + 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. - - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + - `type: optional ComputerTypeConfig or null` - - `"direct"` + `type`'s config overrides. - - `"code_execution_20250825"` + - `defer_loading: optional boolean or null` - - `"code_execution_20260120"` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `"code_execution_20260521"` + - `enabled: optional boolean or null` - - `cache_control: optional CacheControlEphemeral or null` + 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. - Create a cache control breakpoint at this content block. + - `wait: optional ComputerWaitConfig or null` - - `defer_loading: optional boolean` + `wait`'s config overrides. - If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + - `defer_loading: optional boolean or null` - - `input_examples: optional array of map[unknown]` + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. - - `strict: optional boolean` + - `enabled: optional boolean or null` - When true, guarantees schema validation on tool names and inputs + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` @@ -23422,7 +30133,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] @@ -23995,6 +30706,26 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -24180,7 +30911,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -24222,6 +30953,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -25286,6 +32021,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -25471,7 +32226,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -25513,6 +32268,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -26377,6 +33136,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -26562,7 +33341,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -26604,6 +33383,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -27430,6 +34213,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -27615,7 +34418,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -27657,6 +34460,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` diff --git a/content/en/api/messages/batches.md b/content/en/api/messages/batches.md index 8c8090504e..5141676466 100644 --- a/content/en/api/messages/batches.md +++ b/content/en/api/messages/batches.md @@ -243,9 +243,9 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `source: Base64ImageSource or URLImageSource` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }` @@ -273,6 +273,14 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"` @@ -281,9 +289,21 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }` @@ -319,7 +339,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -333,6 +353,14 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"` @@ -403,7 +431,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -449,7 +477,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -461,15 +493,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }` @@ -489,8 +521,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -934,35 +1093,6 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"` @@ -1049,10 +1179,40 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. - - `container: optional string or null` + - `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` + - `inference_geo: optional string or null` Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. @@ -1567,6 +1727,412 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"` @@ -1605,6 +2171,248 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -2350,7 +3158,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] @@ -2923,6 +3731,26 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -3108,7 +3936,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -3150,6 +3978,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -4214,6 +5046,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -4399,7 +5251,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -4441,6 +5293,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -5305,6 +6161,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -5490,7 +6366,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -5532,6 +6408,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -6358,6 +7238,26 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -6543,7 +7443,7 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -6585,6 +7485,10 @@ curl https://api.anthropic.com/v1/messages/batches/$MESSAGE_BATCH_ID/results \ - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` diff --git a/content/en/api/messages/batches/create.md b/content/en/api/messages/batches/create.md index 0b2cd9598d..8bad025ab1 100644 --- a/content/en/api/messages/batches/create.md +++ b/content/en/api/messages/batches/create.md @@ -241,9 +241,9 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `source: Base64ImageSource or URLImageSource` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }` @@ -271,6 +271,14 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"` @@ -279,9 +287,21 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }` @@ -317,7 +337,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -331,6 +351,14 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"` @@ -401,7 +429,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -447,7 +475,11 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -459,15 +491,15 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }` @@ -487,8 +519,135 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -932,35 +1091,6 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"` @@ -1047,10 +1177,40 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. - - `container: optional string or null` + - `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` + - `inference_geo: optional string or null` Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. @@ -1565,6 +1725,412 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"` @@ -1603,6 +2169,248 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl When true, guarantees schema validation on tool names and inputs + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -2348,7 +3156,7 @@ curl https://api.anthropic.com/v1/messages/batches \ "role": "user" } ], - "model": "claude-opus-4-6" + "model": "claude-opus-5" } } ] diff --git a/content/en/api/messages/batches/results.md b/content/en/api/messages/batches/results.md index 6e80f56dc4..30ae6ed338 100644 --- a/content/en/api/messages/batches/results.md +++ b/content/en/api/messages/batches/results.md @@ -59,6 +59,26 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -244,7 +264,7 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -286,6 +306,10 @@ Learn more about the Message Batches API in our [user guide](https://platform.cl - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` diff --git a/content/en/api/messages/count_tokens.md b/content/en/api/messages/count_tokens.md index cc6144c1d8..61e4f86ee2 100644 --- a/content/en/api/messages/count_tokens.md +++ b/content/en/api/messages/count_tokens.md @@ -215,9 +215,9 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `source: Base64ImageSource or URLImageSource` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }` @@ -245,6 +245,14 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"` @@ -253,9 +261,21 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }` @@ -291,7 +311,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -305,6 +325,14 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"` @@ -375,7 +403,7 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -421,7 +449,11 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ - `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -433,15 +465,15 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }` @@ -461,8 +493,135 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -906,35 +1065,6 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"` @@ -1489,6 +1619,412 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"` @@ -1527,6 +2063,248 @@ Learn more about token counting in our [user guide](https://platform.claude.com/ When true, guarantees schema validation on tool names and inputs + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -2169,7 +2947,7 @@ curl https://api.anthropic.com/v1/messages/count_tokens \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "system": [ { "text": "Today'\''s date is 2024-06-01.", diff --git a/content/en/api/messages/create.md b/content/en/api/messages/create.md index c0f35a612a..2f6b393a9c 100644 --- a/content/en/api/messages/create.md +++ b/content/en/api/messages/create.md @@ -225,9 +225,9 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"search_result_location"` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - - `source: Base64ImageSource or URLImageSource` + - `source: Base64ImageSource or URLImageSource or FileImageSource` - `Base64ImageSource object { data, media_type, type }` @@ -255,6 +255,14 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `url: string` + - `FileImageSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "image"` - `"image"` @@ -263,9 +271,21 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `transformations: optional ImageTransformationsParam or null` + + 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. + + - `oversized_image: optional "downsize" or "error"` + + 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. + + - `"downsize"` + + - `"error"` + - `DocumentBlockParam object { source, type, cache_control, 3 more }` - - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or URLPDFSource` + - `source: Base64PDFSource or PlainTextSource or ContentBlockSource or 2 more` - `Base64PDFSource object { data, media_type, type }` @@ -301,7 +321,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `type: "content"` @@ -315,6 +335,14 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `url: string` + - `FileDocumentSource object { file_id, type }` + + - `file_id: string` + + - `type: "file"` + + - `"file"` + - `type: "document"` - `"document"` @@ -385,7 +413,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `ToolUseBlockParam object { id, input, name, 3 more }` + - `ToolUseBlockParam object { id, input, name, 4 more }` - `id: string` @@ -431,7 +459,11 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"code_execution_20260120"` - - `ToolResultBlockParam object { tool_use_id, type, cache_control, 2 more }` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family this member belongs to. + + - `ToolResultBlockParam object { tool_use_id, type, cache_control, 3 more }` - `tool_use_id: string` @@ -443,15 +475,15 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `content: optional string or array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `string` - - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 2 more` + - `array of TextBlockParam or ImageBlockParam or SearchResultBlockParam or 3 more` - `TextBlockParam object { text, type, cache_control, citations }` - - `ImageBlockParam object { source, type, cache_control }` + - `ImageBlockParam object { source, type, cache_control, transformations }` - `SearchResultBlockParam object { content, source, title, 3 more }` @@ -471,8 +503,135 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. + - `BrowserStateBlockParam object { tabs, type, cache_control, state_changes }` + + The caller's browser state after a browser toolset member call — + the full inventory of open tabs, which tab is active, and any side + effects (tabs opened, download state changes) the call produced. + + At most one per `tool_result`, only on a non-error result answering a + browser toolset member `tool_use`. The server renders the + model-visible text from it; the model never sees the raw fields. + + - `tabs: array of BrowserStateTabEntry` + + 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`. + + - `tab_id: string` + + The caller-assigned identifier for this tab, unique within the inventory. + + - `title: string` + + The title of the page the tab is showing. May be empty. + + - `url: string` + + The URL of the page the tab is showing. May be empty. + + - `active: optional boolean` + + Whether this tab is the active tab after this call. Whenever `tabs` is non-empty, exactly one entry is marked `active: true`. + + - `type: "browser_state"` + + - `"browser_state"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `state_changes: optional array of BrowserStateChange or null` + + Tabs opened and download state changes during this call. "Nothing to report" is expressed by omitting the field, never by an empty list. + + - `BrowserStateChangeTabOpened object { tab_id, type }` + + A tab this call's execution opened that remains open at its end — + the creation delta of the `tabs` inventory, not an event log. + + Carries only the `tab_id`; the tab's `title` and `url` live on its + `tabs` entry, which must include the same `tab_id`. A tab opened + during a failed call gets no deferred `tab_opened`; it simply appears + in the next result's `tabs` inventory. + + - `tab_id: string` + + The `tab_id` of the opened tab, present in `tabs`. + + - `type: "tab_opened"` + + - `"tab_opened"` + + - `BrowserStateChangeDownloadStarted object { download_id, type, url }` + + A file download that started during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_started"` + + - `"download_started"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `BrowserStateChangeDownloadCompleted object { download_id, type, url, 2 more }` + + A file download that finished during this call, reported with the + same `download_id` as its `download_started` — or without a prior + `download_started`, when the download finished during the call that + started it (at most one state change per `download_id` per result). + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_completed"` + + - `"download_completed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `path: optional string or null` + + 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. + + - `size_bytes: optional number or null` + + The completed download's size. + + - `BrowserStateChangeDownloadFailed object { download_id, type, url, error }` + + A file download that failed — or was cancelled — during this call. + + - `download_id: string` + + The caller-assigned identifier for this download, stable across the state changes reporting it. + + - `type: "download_failed"` + + - `"download_failed"` + + - `url: string` + + The final post-redirect URL the download was served from. + + - `error: optional string or null` + + The failure or cancellation detail, when known. + - `is_error: optional boolean` + - `toolset_name: optional string or null` + + For a toolset member tool_result, the toolset family of the paired tool_use. + - `ServerToolUseBlockParam object { id, input, name, 3 more }` - `id: string` @@ -916,35 +1075,6 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Create a cache control breakpoint at this content block. - - `MidConversationSystemBlockParam object { content, type, cache_control }` - - System instructions that appear mid-conversation. - - Use this block to provide or update system-level instructions at a specific - point in the conversation, rather than only via the top-level `system` parameter. - - - `content: array of TextBlockParam` - - System instruction text blocks. - - - `text: string` - - - `type: "text"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - - `citations: optional array of TextCitationParam or null` - - - `type: "mid_conv_system"` - - - `"mid_conv_system"` - - - `cache_control: optional CacheControlEphemeral or null` - - Create a cache control breakpoint at this content block. - - `role: "user" or "assistant" or "system"` - `"user"` @@ -1031,10 +1161,40 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request. -- `container: optional string or null` +- `container: optional MessageCreateParamsContainer or null` Container identifier for reuse across requests. + - `ContainerParams object { id, skills }` + + Container parameters with skills to be loaded. + + - `id: optional string or null` + + Container id + + - `skills: optional array of SkillParams or null` + + List of skills to load in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: optional string` + + Skill version or 'latest' for most recent version + + - `string` + - `inference_geo: optional string or null` Specifies the geographic region for inference processing. If not specified, the workspace's `default_inference_geo` is used. @@ -1549,6 +1709,412 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `BrowserToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The browser toolset: a single `tools[]` entry (carrying no + `name`) that declares the browser tool family. The model is served + the family's tool with any members disabled via `configs` removed + from its schema. + + - `type: "browser_toolset_20260801"` + + - `"browser_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional BrowserToolsetConfigs or null` + + Per-member configuration for `browser_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `close_tab: optional BrowserCloseTabConfig or null` + + `close_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional BrowserDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `file_upload: optional BrowserFileUploadConfig or null` + + `file_upload`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `find: optional BrowserFindConfig or null` + + `find`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `form_input: optional BrowserFormInputConfig or null` + + `form_input`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `get_page_text: optional BrowserGetPageTextConfig or null` + + `get_page_text`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional BrowserHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hover: optional BrowserHoverConfig or null` + + `hover`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `javascript_exec: optional BrowserJavascriptExecConfig or null` + + `javascript_exec`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional BrowserKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional BrowserLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional BrowserLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional BrowserLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional BrowserLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `list_tabs: optional BrowserListTabsConfig or null` + + `list_tabs`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional BrowserMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional BrowserMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `navigate: optional BrowserNavigateConfig or null` + + `navigate`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `new_tab: optional BrowserNewTabConfig or null` + + `new_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_console: optional BrowserReadConsoleConfig or null` + + `read_console`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_network: optional BrowserReadNetworkConfig or null` + + `read_network`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `read_page: optional BrowserReadPageConfig or null` + + `read_page`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional BrowserRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional BrowserScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional BrowserScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll_to: optional BrowserScrollToConfig or null` + + `scroll_to`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `switch_tab: optional BrowserSwitchTabConfig or null` + + `switch_tab`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional BrowserTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional BrowserTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional BrowserWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional BrowserZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `MemoryTool20250818 object { name, type, allowed_callers, 4 more }` - `name: "memory"` @@ -1587,6 +2153,248 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co When true, guarantees schema validation on tool names and inputs + - `ComputerToolset20260801 object { type, allowed_callers, cache_control, configs }` + + The computer toolset: a single `tools[]` entry (carrying no + `name`) that declares the computer tool family. The model is + served the family's tool with any members disabled via `configs` + removed from its schema. Every member is enabled by default, zoom + included. The single-tool options `display_number` and + `enable_zoom` are not fields of a toolset entry — it carries only + `type`, `configs`, and `cache_control`; zoom is controlled + via `configs.zoom.enabled`. + + - `type: "computer_toolset_20260801"` + + - `"computer_toolset_20260801"` + + - `allowed_callers: optional array of "direct" or "code_execution_20250825" or "code_execution_20260120" or "code_execution_20260521"` + + - `"direct"` + + - `"code_execution_20250825"` + + - `"code_execution_20260120"` + + - `"code_execution_20260521"` + + - `cache_control: optional CacheControlEphemeral or null` + + Create a cache control breakpoint at this content block. + + - `configs: optional ComputerToolsetConfigs or null` + + Per-member configuration for `computer_toolset_20260801`: one + optional field per member tool, keyed by the member name — the same + name the member's `tool_use` blocks carry. Every member is an + accepted key, and a member's defaults apply wherever its key is + absent. Unknown keys are rejected: the field set is this toolset + version's complete member set. + + - `cursor_position: optional ComputerCursorPositionConfig or null` + + `cursor_position`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `double_click: optional ComputerDoubleClickConfig or null` + + `double_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `hold_key: optional ComputerHoldKeyConfig or null` + + `hold_key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `key: optional ComputerKeyConfig or null` + + `key`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click: optional ComputerLeftClickConfig or null` + + `left_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_click_drag: optional ComputerLeftClickDragConfig or null` + + `left_click_drag`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_down: optional ComputerLeftMouseDownConfig or null` + + `left_mouse_down`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `left_mouse_up: optional ComputerLeftMouseUpConfig or null` + + `left_mouse_up`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `middle_click: optional ComputerMiddleClickConfig or null` + + `middle_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `mouse_move: optional ComputerMouseMoveConfig or null` + + `mouse_move`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `right_click: optional ComputerRightClickConfig or null` + + `right_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `screenshot: optional ComputerScreenshotConfig or null` + + `screenshot`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `scroll: optional ComputerScrollConfig or null` + + `scroll`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `triple_click: optional ComputerTripleClickConfig or null` + + `triple_click`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `type: optional ComputerTypeConfig or null` + + `type`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `wait: optional ComputerWaitConfig or null` + + `wait`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + + - `zoom: optional ComputerZoomConfig or null` + + `zoom`'s config overrides. + + - `defer_loading: optional boolean or null` + + Defer loading for this member. Must resolve to the same value on every enabled member of the toolset. + + - `enabled: optional boolean or null` + + 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. + - `ToolTextEditor20250124 object { name, type, allowed_callers, 4 more }` - `name: "str_replace_editor"` @@ -2245,6 +3053,26 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co The time at which the container will expire. + - `skills: array of ContainerSkill or null` + + Skills loaded in the container + + - `skill_id: string` + + Skill ID + + - `type: "anthropic" or "custom"` + + Type of skill - either 'anthropic' (built-in) or 'custom' (user-defined) + + - `"anthropic"` + + - `"custom"` + + - `version: string` + + Skill version or 'latest' for most recent version + - `content: array of ContentBlock` Content generated by the model. @@ -2430,7 +3258,7 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"redacted_thinking"` - - `ToolUseBlock object { id, caller, input, 2 more }` + - `ToolUseBlock object { id, caller, input, 3 more }` - `id: string` @@ -2472,6 +3300,10 @@ Learn more about the Messages API in our [user guide](https://platform.claude.co - `"tool_use"` + - `toolset_name: optional string or null` + + For a toolset member tool_use, the toolset family. + - `ServerToolUseBlock object { id, caller, input, 2 more }` - `id: string` @@ -3186,7 +4018,7 @@ curl https://api.anthropic.com/v1/messages \ "role": "user" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "stream": false, "system": [ { @@ -3225,7 +4057,14 @@ curl https://api.anthropic.com/v1/messages \ "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF", "container": { "id": "container_011CpZohnwH4vuy7gazohgSP", - "expires_at": "2019-12-27T18:11:19.117Z" + "expires_at": "2019-12-27T18:11:19.117Z", + "skills": [ + { + "skill_id": "pdf", + "type": "anthropic", + "version": "latest" + } + ] }, "content": [ { @@ -3244,7 +4083,7 @@ curl https://api.anthropic.com/v1/messages \ "type": "text" } ], - "model": "claude-opus-4-6", + "model": "claude-opus-5", "role": "assistant", "stop_details": { "category": "cyber", diff --git a/content/en/api/models.md b/content/en/api/models.md index 7f7df54ae9..7268949feb 100644 --- a/content/en/api/models.md +++ b/content/en/api/models.md @@ -37,7 +37,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -83,6 +83,8 @@ The Models API response can be used to determine which models are available for - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -263,7 +265,7 @@ curl https://api.anthropic.com/v1/models \ { "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true @@ -325,8 +327,8 @@ curl https://api.anthropic.com/v1/models \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" @@ -360,7 +362,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -406,6 +408,8 @@ The Models API response can be used to determine information about a specific mo - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -572,7 +576,7 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ ```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true @@ -634,8 +638,8 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/models/list.md b/content/en/api/models/list.md index 32bf64fcab..e7de2b53ad 100644 --- a/content/en/api/models/list.md +++ b/content/en/api/models/list.md @@ -35,7 +35,7 @@ The Models API response can be used to determine which models are available for - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -81,6 +81,8 @@ The Models API response can be used to determine which models are available for - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -261,7 +263,7 @@ curl https://api.anthropic.com/v1/models \ { "data": [ { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true @@ -323,8 +325,8 @@ curl https://api.anthropic.com/v1/models \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/models/retrieve.md b/content/en/api/models/retrieve.md index f406373025..253903344d 100644 --- a/content/en/api/models/retrieve.md +++ b/content/en/api/models/retrieve.md @@ -25,7 +25,7 @@ The Models API response can be used to determine information about a specific mo - `string` - - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more` + - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more` - `"message-batches-2024-09-24"` @@ -71,6 +71,8 @@ The Models API response can be used to determine information about a specific mo - `"user-profiles-2026-03-24"` + - `"user-profiles-2026-08-18"` + - `"advisor-tool-2026-03-01"` - `"managed-agents-2026-04-01"` @@ -237,7 +239,7 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ ```json { - "id": "claude-opus-4-6", + "id": "claude-opus-5", "capabilities": { "batch": { "supported": true @@ -299,8 +301,8 @@ curl https://api.anthropic.com/v1/models/$MODEL_ID \ } } }, - "created_at": "2026-02-04T00:00:00Z", - "display_name": "Claude Opus 4.6", + "created_at": "2026-07-24T00:00:00Z", + "display_name": "Claude Opus 5", "max_input_tokens": 0, "max_tokens": 0, "type": "model" diff --git a/content/en/api/overview.md b/content/en/api/overview.md index e7daa5da86..6cddee7806 100644 --- a/content/en/api/overview.md +++ b/content/en/api/overview.md @@ -29,8 +29,8 @@ The Claude API includes the following APIs: * **[Message Batches API](https://platform.claude.com/docs/en/api/messages/batches/create)**: Process large volumes of Messages requests asynchronously with 50% cost reduction (`POST /v1/messages/batches`) * **[Token Counting API](https://platform.claude.com/docs/en/api/messages-count-tokens)**: Count tokens in a message before sending to manage costs and rate limits (`POST /v1/messages/count_tokens`) * **[Models API](https://platform.claude.com/docs/en/api/models/list)**: List available Claude models and their details (`GET /v1/models`) -* **[Files API](https://platform.claude.com/docs/en/api/beta/files/upload)**: Upload and manage files for use across multiple API calls (`POST /v1/files`, `GET /v1/files`) -* **[Skills API](https://platform.claude.com/docs/en/api/skills/create-skill)**: Create and manage custom agent skills (`POST /v1/skills`, `GET /v1/skills`) +* **[Files API](https://platform.claude.com/docs/en/api/files/upload)**: Upload and manage files for use across multiple API calls (`POST /v1/files`, `GET /v1/files`) +* **[Skills API](https://platform.claude.com/docs/en/api/skills/create)**: Create and manage custom agent skills (`POST /v1/skills`, `GET /v1/skills`) **Beta:** @@ -152,7 +152,7 @@ To go back a page, pass `prev_page` as the `page` parameter. `prev_page` is `nul Every SDK provides an auto-paginating iterator that follows `next_page` for you. In Python and TypeScript, you get it by iterating the list result directly. The other SDKs provide the iterator through a separate method. SDK auto-pagination is forward-only; to go back a page, read `prev_page` from the response and pass it back as the `page` parameter yourself. See [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) for language-specific details. - Some list endpoints use a different cursor scheme. The [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Models API](https://platform.claude.com/docs/en/api/models/list), and several [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) endpoints take `after_id` and `before_id` query parameters instead of `page`. Their responses return `has_more`, `first_id`, and `last_id` instead of `next_page`. The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) also uses that scheme when a request includes the `files-api-2025-04-14` beta header; without the header, `GET /v1/files` takes `page` and returns `next_page`. Some endpoints that use the `page` scheme, such as `GET /v1/skills`, also return a `has_more` Boolean alongside `next_page`. See the reference page for each endpoint for its exact pagination fields. + Some list endpoints use a different cursor scheme. The [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing), the [Models API](https://platform.claude.com/docs/en/api/models/list), and several [Admin API](https://platform.claude.com/docs/en/manage-claude/admin-api) endpoints take `after_id` and `before_id` query parameters instead of `page`. Their responses return `has_more`, `first_id`, and `last_id` instead of `next_page`. See the reference page for each endpoint for its exact pagination fields. ## Rate limits and availability diff --git a/content/en/api/rate-limits.md b/content/en/api/rate-limits.md index d23e3767b7..22ba654ae3 100644 --- a/content/en/api/rate-limits.md +++ b/content/en/api/rate-limits.md @@ -29,10 +29,10 @@ The API enforces service-configured limits at the organization level, but you ma ## Spend limits - **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** Spend limits work differently on Claude Platform on AWS. See [Spend limits on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits) for how spend caps and self-set spend limits apply to your organization. + **[Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws):** The same monthly spend caps apply, and requests stop at the cap in the same way. Billing and tier increases work differently; see [Spend limits on Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). -Each of the Start, Build, and Scale tiers carries a monthly spend cap, which is the maximum your organization can spend on the API each calendar month. Once you reach your tier's spend cap, API usage pauses until the next month unless you request a higher limit. You can view your organization's monthly spend cap and set your own limit on the [Billing](https://platform.claude.com/settings/billing) page. +Each of the Start, Build, and Scale tiers carries a monthly spend cap, which is the maximum your organization can spend on the API each calendar month. You can view your organization's monthly spend cap and set your own limit on the [Billing](https://platform.claude.com/settings/billing) page. | Usage tier | Monthly spend cap | | ---------- | ----------------- | @@ -42,6 +42,28 @@ Each of the Start, Build, and Scale tiers carries a monthly spend cap, which is Organizations on the Custom tier have no monthly spend cap; limits are arranged with their account team. +### Reaching your spend cap + +Once you reach your tier's spend cap, API usage pauses until 00UTC on the first day of the next month, unless you request a higher limit sooner. While usage is paused, API requests return HTTP 429: + +```json +{ + "type": "error", + "error": { + "type": "rate_limit_error", + "message": "You have reached your API usage limits: your organization has crossed its monthly API usage threshold, set based on your organization's API tier. You will regain access on 2026-09-01 at 00:00 UTC.", + "details": { "error_code": "enforced_spend_limit_reached" } + }, + "request_id": "req_018EeWyXxfu5pfWkrYcMdjWG" +} +``` + +* The error type is `rate_limit_error`, the same as for a rate limit, but the response has no `retry-after` header. Retrying, including the SDKs' automatic retries, fails until access resumes. +* On the Messages API, `error.details.error_code` is `enforced_spend_limit_reached`. Use it to tell this response apart from a rate limit. +* Moving to a higher tier restores access; see [Requesting higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits). + +### Setting your own spend limit + You can also set your own spend limit below your tier's cap to control costs: @@ -58,6 +80,10 @@ You can also set your own spend limit below your tier's cap to control costs: +When usage reaches a spend limit you set, requests return HTTP 400 with error type `invalid_request_error`. The message begins `You have reached your specified API usage limits`, or `You have reached your specified workspace API usage limits` for a workspace limit, and states when access resumes. Raise or remove the limit to restore access sooner. + +Limits on the [Claude Code workspace](https://platform.claude.com/docs/en/manage-claude/workspaces#claude-code-workspace) are checked separately: Claude Code requests over that workspace's limit can instead receive a 429 that carries a `retry-after` header. + ## Rate limits The rate limits for the Messages API are measured in requests per minute (RPM), input tokens per minute (ITPM), and output tokens per minute (OTPM) for each model class. If you exceed any of the rate limits you will get a [429 error](https://platform.claude.com/docs/en/api/errors) describing which rate limit was exceeded, along with a `retry-after` header indicating how long to wait. @@ -251,26 +277,26 @@ The API response includes headers that show you the rate limit enforced, current The following headers are returned: -| Header | Description | -| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | -| `retry-after` | The number of seconds to wait until you can retry the request. Earlier retries will fail. | -| `anthropic-ratelimit-requests-limit` | The maximum number of requests allowed within any rate limit period. | -| `anthropic-ratelimit-requests-remaining` | The number of requests remaining before being rate limited. | -| `anthropic-ratelimit-requests-reset` | The time when the request rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-tokens-limit` | The maximum number of tokens allowed within any rate limit period. | -| `anthropic-ratelimit-tokens-remaining` | The number of tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-tokens-reset` | The time when the token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-input-tokens-limit` | The maximum number of input tokens allowed within any rate limit period. | -| `anthropic-ratelimit-input-tokens-remaining` | The number of input tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-input-tokens-reset` | The time when the input token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-ratelimit-output-tokens-limit` | The maximum number of output tokens allowed within any rate limit period. | -| `anthropic-ratelimit-output-tokens-remaining` | The number of output tokens remaining (rounded to the nearest thousand) before being rate limited. | -| `anthropic-ratelimit-output-tokens-reset` | The time when the output token rate limit will be fully replenished, provided in RFC 3339 format. | -| `anthropic-priority-input-tokens-limit` | The maximum number of Priority Tier input tokens allowed within any rate limit period. (Priority Tier only) | -| `anthropic-priority-input-tokens-remaining` | The number of Priority Tier input tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | -| `anthropic-priority-input-tokens-reset` | The time when the Priority Tier input token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | -| `anthropic-priority-output-tokens-limit` | The maximum number of Priority Tier output tokens allowed within any rate limit period. (Priority Tier only) | -| `anthropic-priority-output-tokens-remaining` | The number of Priority Tier output tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | -| `anthropic-priority-output-tokens-reset` | The time when the Priority Tier output token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | +| Header | Description | +| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `retry-after` | The number of seconds to wait until you can retry the request. Earlier retries will fail. Not sent with the spend-cap 429 (see [Reaching your spend cap](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap)). | +| `anthropic-ratelimit-requests-limit` | The maximum number of requests allowed within any rate limit period. | +| `anthropic-ratelimit-requests-remaining` | The number of requests remaining before being rate limited. | +| `anthropic-ratelimit-requests-reset` | The time when the request rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-tokens-limit` | The maximum number of tokens allowed within any rate limit period. | +| `anthropic-ratelimit-tokens-remaining` | The number of tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-tokens-reset` | The time when the token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-input-tokens-limit` | The maximum number of input tokens allowed within any rate limit period. | +| `anthropic-ratelimit-input-tokens-remaining` | The number of input tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-input-tokens-reset` | The time when the input token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-ratelimit-output-tokens-limit` | The maximum number of output tokens allowed within any rate limit period. | +| `anthropic-ratelimit-output-tokens-remaining` | The number of output tokens remaining (rounded to the nearest thousand) before being rate limited. | +| `anthropic-ratelimit-output-tokens-reset` | The time when the output token rate limit will be fully replenished, provided in RFC 3339 format. | +| `anthropic-priority-input-tokens-limit` | The maximum number of Priority Tier input tokens allowed within any rate limit period. (Priority Tier only) | +| `anthropic-priority-input-tokens-remaining` | The number of Priority Tier input tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | +| `anthropic-priority-input-tokens-reset` | The time when the Priority Tier input token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | +| `anthropic-priority-output-tokens-limit` | The maximum number of Priority Tier output tokens allowed within any rate limit period. (Priority Tier only) | +| `anthropic-priority-output-tokens-remaining` | The number of Priority Tier output tokens remaining (rounded to the nearest thousand) before being rate limited. (Priority Tier only) | +| `anthropic-priority-output-tokens-reset` | The time when the Priority Tier output token rate limit will be fully replenished, provided in RFC 3339 format. (Priority Tier only) | The `anthropic-ratelimit-tokens-*` headers display the values for the most restrictive limit currently in effect. For instance, if you have exceeded the Workspace per-minute token limit, the headers will contain the Workspace per-minute token rate limit values. If Workspace limits do not apply, the headers will return the total tokens remaining, where total is the sum of input and output tokens. This approach ensures that you have visibility into the most relevant constraint on your current API usage. To see which Workspace a request counted against, read the `anthropic-workspace-id` [response header](https://platform.claude.com/docs/en/api/overview#response-headers), which carries the ID of the Workspace that your API key or access token resolved to. diff --git a/content/en/api/skills.md b/content/en/api/skills.md new file mode 100644 index 0000000000..102ea50cee --- /dev/null +++ b/content/en/api/skills.md @@ -0,0 +1,873 @@ +--- +title: Skills +url: https://platform.claude.com/docs/en/api/skills +--- + +# Skills + +## Create Skill + +**post** `/v1/skills` + +Create Skill + +### Returns + +- `Skill object { id, created_at, display_name, 4 more }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +### Example + +```http +curl https://api.anthropic.com/v1/skills \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F files='["Example data"]' +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" +} +``` + +## List Skills + +**get** `/v1/skills` + +List Skills + +### Query Parameters + +- `limit: optional number` + + Number of results to return per page. + + Ranges from `1` to `1000`. Defaults to `20`. + +- `page: optional string` + + Pagination token for fetching a specific page of results. + + Pass the value from a previous response's `next_page` field to get the next page of results. + +- `source: optional string` + + Filter skills by source. + + If provided, only skills from the specified source will be returned: + + * `"custom"`: only return user-created skills + * `"anthropic"`: only return Anthropic-created skills + +### Returns + +- `data: array of Skill` + + List of skills. + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +- `next_page: string or null` + + Token for fetching the next page of results. + + If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page. + +### Example + +```http +curl https://api.anthropic.com/v1/skills \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" + } + ], + "next_page": "next_page" +} +``` + +## Get Skill + +**get** `/v1/skills/{skill_id}` + +Get Skill + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `Skill object { id, created_at, display_name, 4 more }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" +} +``` + +## Delete Skill + +**delete** `/v1/skills/{skill_id}` + +Delete Skill + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `DeletedSkill object { id, type }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_deleted"` + + Deleted object type. + + For Skills, this is always `"skill_deleted"`. + + - `"skill_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_deleted" +} +``` + +## Domain Types + +### Deleted Skill + +- `DeletedSkill object { id, type }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_deleted"` + + Deleted object type. + + For Skills, this is always `"skill_deleted"`. + + - `"skill_deleted"` + +### Skill + +- `Skill object { id, created_at, display_name, 4 more }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +### Skill Source + +- `SkillSource object { type }` + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + +# Versions + +## Create Skill Version + +**post** `/v1/skills/{skill_id}/versions` + +Create Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F files='["Example data"]' +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` + +## List Skill Versions + +**get** `/v1/skills/{skill_id}/versions` + +List Skill Versions + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Query Parameters + +- `limit: optional number` + + Number of results to return per page. + + Ranges from `1` to `1000`. Defaults to `20`. + +- `page: optional string` + + Optionally set to the `next_page` token from the previous response. + +### Returns + +- `data: array of SkillVersion` + + List of skills. + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +- `next_page: string or null` + + Token for fetching the next page of results. + + If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page. + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" + } + ], + "next_page": "next_page" +} +``` + +## Get Skill Version + +**get** `/v1/skills/{skill_id}/versions/{version}` + +Get Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` + +## Delete Skill Version + +**delete** `/v1/skills/{skill_id}/versions/{version}` + +Delete Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `DeletedSkillVersion object { id, type }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `type: "skill_version_deleted"` + + Deleted object type. + + For Skill Versions, this is always `"skill_version_deleted"`. + + - `"skill_version_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "type": "skill_version_deleted" +} +``` + +## Domain Types + +### Deleted Skill Version + +- `DeletedSkillVersion object { id, type }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `type: "skill_version_deleted"` + + Deleted object type. + + For Skill Versions, this is always `"skill_version_deleted"`. + + - `"skill_version_deleted"` + +### Skill Version + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` diff --git a/content/en/api/skills/create.md b/content/en/api/skills/create.md new file mode 100644 index 0000000000..ca0a24d052 --- /dev/null +++ b/content/en/api/skills/create.md @@ -0,0 +1,102 @@ +--- +title: Create Skill +url: https://platform.claude.com/docs/en/api/skills/create +--- + +## Create Skill + +**post** `/v1/skills` + +Create Skill + +### Returns + +- `Skill object { id, created_at, display_name, 4 more }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +### Example + +```http +curl https://api.anthropic.com/v1/skills \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F files='["Example data"]' +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" +} +``` diff --git a/content/en/api/skills/delete.md b/content/en/api/skills/delete.md new file mode 100644 index 0000000000..deab875025 --- /dev/null +++ b/content/en/api/skills/delete.md @@ -0,0 +1,54 @@ +--- +title: Delete Skill +url: https://platform.claude.com/docs/en/api/skills/delete +--- + +## Delete Skill + +**delete** `/v1/skills/{skill_id}` + +Delete Skill + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `DeletedSkill object { id, type }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_deleted"` + + Deleted object type. + + For Skills, this is always `"skill_deleted"`. + + - `"skill_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_deleted" +} +``` diff --git a/content/en/api/skills/list.md b/content/en/api/skills/list.md new file mode 100644 index 0000000000..db38e8e040 --- /dev/null +++ b/content/en/api/skills/list.md @@ -0,0 +1,136 @@ +--- +title: List Skills +url: https://platform.claude.com/docs/en/api/skills/list +--- + +## List Skills + +**get** `/v1/skills` + +List Skills + +### Query Parameters + +- `limit: optional number` + + Number of results to return per page. + + Ranges from `1` to `1000`. Defaults to `20`. + +- `page: optional string` + + Pagination token for fetching a specific page of results. + + Pass the value from a previous response's `next_page` field to get the next page of results. + +- `source: optional string` + + Filter skills by source. + + If provided, only skills from the specified source will be returned: + + * `"custom"`: only return user-created skills + * `"anthropic"`: only return Anthropic-created skills + +### Returns + +- `data: array of Skill` + + List of skills. + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +- `next_page: string or null` + + Token for fetching the next page of results. + + If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page. + +### Example + +```http +curl https://api.anthropic.com/v1/skills \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" + } + ], + "next_page": "next_page" +} +``` diff --git a/content/en/api/skills/retrieve.md b/content/en/api/skills/retrieve.md new file mode 100644 index 0000000000..ed833b98e4 --- /dev/null +++ b/content/en/api/skills/retrieve.md @@ -0,0 +1,108 @@ +--- +title: Get Skill +url: https://platform.claude.com/docs/en/api/skills/retrieve +--- + +## Get Skill + +**get** `/v1/skills/{skill_id}` + +Get Skill + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `Skill object { id, created_at, display_name, 4 more }` + + - `id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `display_name: string` + + Human-readable, single-line label for the Skill. Maximum 255 characters. + Always set: derived from the SKILL.md frontmatter `name` when omitted at + creation. Not unique. + + - `latest_version_id: string` + + ID of the newest Skill Version — what `latest` references resolve to. Always set: a Skill holds at least one version. + + - `source: SkillSource` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `type: "custom" or "anthropic" or "anthropic_example" or "plugin"` + + Where the Skill comes from. + + Possible values: + + * `"custom"`: authored by the platform user; private to their workspace + * `"anthropic"`: published by Anthropic; shared and read-only + * `"anthropic_example"`: Anthropic-published sample Skill + * `"plugin"`: resolved from an installed plugin + + - `"custom"` + + - `"anthropic"` + + - `"anthropic_example"` + + - `"plugin"` + + - `type: "skill"` + + Object type. + + For Skills, this is always `"skill"`. + + - `"skill"` + + - `updated_at: string` + + ISO 8601 timestamp of when the skill was last updated. + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "skill_01JAbcdefghijklmnopqrstuvw", + "created_at": "2024-10-30T23:58:27.427722Z", + "display_name": "display_name", + "latest_version_id": "latest_version_id", + "source": { + "type": "custom" + }, + "type": "skill", + "updated_at": "2024-10-30T23:58:27.427722Z" +} +``` diff --git a/content/en/api/skills/versions.md b/content/en/api/skills/versions.md new file mode 100644 index 0000000000..d58ae6e452 --- /dev/null +++ b/content/en/api/skills/versions.md @@ -0,0 +1,378 @@ +--- +title: Versions +url: https://platform.claude.com/docs/en/api/skills/versions +--- + +# Versions + +## Create Skill Version + +**post** `/v1/skills/{skill_id}/versions` + +Create Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F files='["Example data"]' +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` + +## List Skill Versions + +**get** `/v1/skills/{skill_id}/versions` + +List Skill Versions + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Query Parameters + +- `limit: optional number` + + Number of results to return per page. + + Ranges from `1` to `1000`. Defaults to `20`. + +- `page: optional string` + + Optionally set to the `next_page` token from the previous response. + +### Returns + +- `data: array of SkillVersion` + + List of skills. + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +- `next_page: string or null` + + Token for fetching the next page of results. + + If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page. + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" + } + ], + "next_page": "next_page" +} +``` + +## Get Skill Version + +**get** `/v1/skills/{skill_id}/versions/{version}` + +Get Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` + +## Delete Skill Version + +**delete** `/v1/skills/{skill_id}/versions/{version}` + +Delete Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `DeletedSkillVersion object { id, type }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `type: "skill_version_deleted"` + + Deleted object type. + + For Skill Versions, this is always `"skill_version_deleted"`. + + - `"skill_version_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "type": "skill_version_deleted" +} +``` + +## Domain Types + +### Deleted Skill Version + +- `DeletedSkillVersion object { id, type }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `type: "skill_version_deleted"` + + Deleted object type. + + For Skill Versions, this is always `"skill_version_deleted"`. + + - `"skill_version_deleted"` + +### Skill Version + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` diff --git a/content/en/api/skills/versions/create.md b/content/en/api/skills/versions/create.md new file mode 100644 index 0000000000..3667ecdfdd --- /dev/null +++ b/content/en/api/skills/versions/create.md @@ -0,0 +1,81 @@ +--- +title: Create Skill Version +url: https://platform.claude.com/docs/en/api/skills/versions/create +--- + +## Create Skill Version + +**post** `/v1/skills/{skill_id}/versions` + +Create Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'Content-Type: multipart/form-data' \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" \ + -F files='["Example data"]' +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` diff --git a/content/en/api/skills/versions/delete.md b/content/en/api/skills/versions/delete.md new file mode 100644 index 0000000000..d05744bbf0 --- /dev/null +++ b/content/en/api/skills/versions/delete.md @@ -0,0 +1,59 @@ +--- +title: Delete Skill Version +url: https://platform.claude.com/docs/en/api/skills/versions/delete +--- + +## Delete Skill Version + +**delete** `/v1/skills/{skill_id}/versions/{version}` + +Delete Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `DeletedSkillVersion object { id, type }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `type: "skill_version_deleted"` + + Deleted object type. + + For Skill Versions, this is always `"skill_version_deleted"`. + + - `"skill_version_deleted"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -X DELETE \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "type": "skill_version_deleted" +} +``` diff --git a/content/en/api/skills/versions/list.md b/content/en/api/skills/versions/list.md new file mode 100644 index 0000000000..42dee9cf18 --- /dev/null +++ b/content/en/api/skills/versions/list.md @@ -0,0 +1,104 @@ +--- +title: List Skill Versions +url: https://platform.claude.com/docs/en/api/skills/versions/list +--- + +## List Skill Versions + +**get** `/v1/skills/{skill_id}/versions` + +List Skill Versions + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +### Query Parameters + +- `limit: optional number` + + Number of results to return per page. + + Ranges from `1` to `1000`. Defaults to `20`. + +- `page: optional string` + + Optionally set to the `next_page` token from the previous response. + +### Returns + +- `data: array of SkillVersion` + + List of skills. + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +- `next_page: string or null` + + Token for fetching the next page of results. + + If `null`, there are no more results available. Pass this value to the `page` parameter in the next request to get the next page. + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "data": [ + { + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" + } + ], + "next_page": "next_page" +} +``` diff --git a/content/en/api/skills/versions/retrieve.md b/content/en/api/skills/versions/retrieve.md new file mode 100644 index 0000000000..d70011f4ab --- /dev/null +++ b/content/en/api/skills/versions/retrieve.md @@ -0,0 +1,85 @@ +--- +title: Get Skill Version +url: https://platform.claude.com/docs/en/api/skills/versions/retrieve +--- + +## Get Skill Version + +**get** `/v1/skills/{skill_id}/versions/{version}` + +Get Skill Version + +### Path Parameters + +- `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + +- `version: string` + + Identifies the skill version: a version ID, or — where the endpoint accepts it — the literal `latest` for the skill's most recent version. + + Requests carrying the `skills-2025-10-02` beta header address versions by their Unix epoch timestamp instead (e.g., "1759178010641129"). + +### Returns + +- `SkillVersion object { id, created_at, description, 3 more }` + + - `id: string` + + Unique identifier for this Skill Version. The id addresses the version in + paths and pins it in references. + + - `created_at: string` + + ISO 8601 timestamp of when the skill was created. + + - `description: string` + + Description of the skill version. + + This is extracted from the SKILL.md file in the skill upload. + + - `name: string` + + The Skill's immutable kebab-case slug, set at creation from the first + upload's SKILL.md frontmatter `name` (or its enclosing directory). Every + later upload must resolve to the same value. Also the top-level directory + of the Skill's mounted files and the base name of a downloaded archive. + + - `skill_id: string` + + Unique identifier for the skill. + + The format and length of IDs may change over time. + + - `type: "skill_version"` + + Object type. + + For Skill Versions, this is always `"skill_version"`. + + - `"skill_version"` + +### Example + +```http +curl https://api.anthropic.com/v1/skills/$SKILL_ID/versions/$VERSION \ + -H 'anthropic-version: 2023-06-01' \ + -H "X-Api-Key: $ANTHROPIC_API_KEY" +``` + +#### Response + +```json +{ + "id": "id", + "created_at": "2024-10-30T23:58:27.427722Z", + "description": "description", + "name": "name", + "skill_id": "skill_01JAbcdefghijklmnopqrstuvw", + "type": "skill_version" +} +``` diff --git a/content/en/build-with-claude/citations.md b/content/en/build-with-claude/citations.md index 3102e31410..f0d394af39 100644 --- a/content/en/build-with-claude/citations.md +++ b/content/en/build-with-claude/citations.md @@ -739,16 +739,13 @@ Plain text documents are automatically chunked into sentences. You can provide t - - These examples reference the uploaded file as a `document` source. They use the SDK `beta` client path and send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but does not require. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. - + These examples reference a file uploaded through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) as a `document` source. ```bash cURL curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- < + Content = new List { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId }, + Source = new FileDocumentSource { FileID = fileId }, Title = "Document Title", Context = "Context about the document that will not be cited from", - Citations = new BetaCitationsConfigParam { Enabled = true }, + Citations = new CitationsConfigParam { Enabled = true }, }, - new BetaTextBlockParam { Text = "Summarize this document." }, + new TextBlockParam { Text = "Summarize this document." }, } } ] @@ -878,24 +872,23 @@ Plain text documents are automatically chunked into sentences. You can provide t ``` ```go Go - citedMsg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + citedMsg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.BetaContentBlockParamUnion{ - OfDocument: &anthropic.BetaRequestDocumentBlockParam{ - Source: anthropic.BetaRequestDocumentBlockSourceUnionParam{ - OfFile: &anthropic.BetaFileDocumentSourceParam{FileID: fileID}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{ + OfDocument: &anthropic.DocumentBlockParam{ + Source: anthropic.DocumentBlockParamSourceUnion{ + OfFile: &anthropic.FileDocumentSourceParam{FileID: fileID}, }, Title: anthropic.String("Document Title"), Context: anthropic.String("Context about the document that will not be cited from"), - Citations: anthropic.BetaCitationsConfigParam{Enabled: anthropic.Bool(true)}, + Citations: anthropic.CitationsConfigParam{Enabled: anthropic.Bool(true)}, }, }, - anthropic.NewBetaTextBlock("Summarize this document."), + anthropic.NewTextBlock("Summarize this document."), ), }, }) @@ -908,26 +901,26 @@ Plain text documents are automatically chunked into sentences. You can provide t ```java Java MessageCreateParams citedParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder().fileId(fileId).build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(BetaCitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder().enabled(true).build()) .build()), - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") .build()) )) .build(); - BetaMessage citedMessage = client.beta().messages().create(citedParams); + Message citedMessage = client.messages().create(citedParams); System.out.println(citedMessage); ``` ```php PHP + // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta. $citedResponse = $client->beta->messages->create( maxTokens: 1024, messages: [ @@ -953,10 +946,9 @@ Plain text documents are automatically chunked into sentences. You can provide t ``` ```ruby Ruby - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user", @@ -1570,16 +1562,13 @@ PDF documents can be provided as base64-encoded data, a URL, or by `file_id`. PD - - These examples reference the uploaded file as a `document` source. They use the SDK `beta` client path and send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but does not require. See [Files API](https://platform.claude.com/docs/en/build-with-claude/files) for upload details. - + These examples reference a file uploaded through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) as a `document` source. ```bash cURL curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- < + Content = new List { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId }, + Source = new FileDocumentSource { FileID = fileId }, Title = "Document Title", Context = "Context about the document that will not be cited from", - Citations = new BetaCitationsConfigParam { Enabled = true }, + Citations = new CitationsConfigParam { Enabled = true }, }, - new BetaTextBlockParam { Text = "Summarize this document." }, + new TextBlockParam { Text = "Summarize this document." }, } } ] @@ -1709,24 +1695,23 @@ PDF documents can be provided as base64-encoded data, a URL, or by `file_id`. PD ``` ```go Go - citedMsg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + citedMsg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.BetaContentBlockParamUnion{ - OfDocument: &anthropic.BetaRequestDocumentBlockParam{ - Source: anthropic.BetaRequestDocumentBlockSourceUnionParam{ - OfFile: &anthropic.BetaFileDocumentSourceParam{FileID: fileID}, + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.ContentBlockParamUnion{ + OfDocument: &anthropic.DocumentBlockParam{ + Source: anthropic.DocumentBlockParamSourceUnion{ + OfFile: &anthropic.FileDocumentSourceParam{FileID: fileID}, }, Title: anthropic.String("Document Title"), Context: anthropic.String("Context about the document that will not be cited from"), - Citations: anthropic.BetaCitationsConfigParam{Enabled: anthropic.Bool(true)}, + Citations: anthropic.CitationsConfigParam{Enabled: anthropic.Bool(true)}, }, }, - anthropic.NewBetaTextBlock("Summarize this document."), + anthropic.NewTextBlock("Summarize this document."), ), }, }) @@ -1739,26 +1724,26 @@ PDF documents can be provided as base64-encoded data, a URL, or by `file_id`. PD ```java Java MessageCreateParams citedParams = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder().fileId(fileId).build()) + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .title("Document Title") .context("Context about the document that will not be cited from") - .citations(BetaCitationsConfigParam.builder().enabled(true).build()) + .citations(CitationsConfigParam.builder().enabled(true).build()) .build()), - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + ContentBlockParam.ofText(TextBlockParam.builder() .text("Summarize this document.") .build()) )) .build(); - BetaMessage citedMessage = client.beta().messages().create(citedParams); + Message citedMessage = client.messages().create(citedParams); System.out.println(citedMessage); ``` ```php PHP + // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta. $citedResponse = $client->beta->messages->create( maxTokens: 1024, messages: [ @@ -1784,10 +1769,9 @@ PDF documents can be provided as base64-encoded data, a URL, or by `file_id`. PD ``` ```ruby Ruby - cited_response = client.beta.messages.create( + cited_response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user", diff --git a/content/en/build-with-claude/claude-in-amazon-bedrock.md b/content/en/build-with-claude/claude-in-amazon-bedrock.md index 4a1e7dd7f1..af97c1f632 100644 --- a/content/en/build-with-claude/claude-in-amazon-bedrock.md +++ b/content/en/build-with-claude/claude-in-amazon-bedrock.md @@ -102,7 +102,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```kotlin - implementation("com.anthropic:anthropic-java-bedrock:2.53.0") + implementation("com.anthropic:anthropic-java-bedrock:2.57.0") ``` @@ -111,7 +111,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries com.anthropic anthropic-java-bedrock - 2.53.0 + 2.57.0 ``` @@ -361,6 +361,7 @@ For the full feature list with Amazon Bedrock availability, see [Features overvi * API endpoints (Message Batches, Models, Admin, Compliance, Usage and Cost) * Claude Managed Agents * Server-side fallback (the [`fallbacks` parameter](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback); use the [client-side fallback pattern](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead) +* [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801` are not currently available on Amazon Bedrock; the beta computer use tool versions remain available) ## Regions diff --git a/content/en/build-with-claude/claude-in-microsoft-foundry.md b/content/en/build-with-claude/claude-in-microsoft-foundry.md index 74874c98e1..6a33bdac86 100644 --- a/content/en/build-with-claude/claude-in-microsoft-foundry.md +++ b/content/en/build-with-claude/claude-in-microsoft-foundry.md @@ -77,7 +77,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```kotlin - implementation("com.anthropic:anthropic-java-foundry:2.53.0") + implementation("com.anthropic:anthropic-java-foundry:2.57.0") // For Entra ID authentication, also add the Azure Identity library implementation("com.azure:azure-identity:1.18.3") @@ -89,7 +89,7 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries com.anthropic anthropic-java-foundry - 2.53.0 + 2.57.0 @@ -643,6 +643,7 @@ Claude Fable 5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6 * Models API * Message Batches API * Server-side fallback (the [`fallbacks` parameter](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback); use the [client-side fallback pattern](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead) +* [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801` are not currently available on Microsoft Foundry; the beta computer use tool versions remain available) ### Additional features not supported when hosted on Azure diff --git a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md index 59a6fc59a4..deb3a010b0 100644 --- a/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md +++ b/content/en/build-with-claude/claude-on-amazon-bedrock-legacy.md @@ -54,14 +54,14 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```groovy Gradle - implementation("com.anthropic:anthropic-java-bedrock:2.53.0") + implementation("com.anthropic:anthropic-java-bedrock:2.57.0") ``` ```xml Maven com.anthropic anthropic-java-bedrock - 2.53.0 + 2.57.0 ``` @@ -737,6 +737,7 @@ For the full feature list with Amazon Bedrock availability, see [Features overvi * Claude Managed Agents * Server-side fallback (the [`fallbacks` parameter](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback); use the [client-side fallback pattern](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead) * Automatic prompt caching (the [top-level `cache_control` field](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#automatic-caching); use [explicit cache breakpoints](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#explicit-cache-breakpoints) instead) +* [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801` are not currently available on Amazon Bedrock; the beta computer use tool versions remain available) ### PDF support on Bedrock diff --git a/content/en/build-with-claude/claude-on-vertex-ai.md b/content/en/build-with-claude/claude-on-vertex-ai.md index 76ab78a4b0..a25a233969 100644 --- a/content/en/build-with-claude/claude-on-vertex-ai.md +++ b/content/en/build-with-claude/claude-on-vertex-ai.md @@ -45,20 +45,20 @@ First, install Anthropic's [client SDK](https://platform.claude.com/docs/en/cli- ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.53.0") - implementation("com.anthropic:anthropic-java-vertex:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") + implementation("com.anthropic:anthropic-java-vertex:2.57.0") ``` ```xml Maven com.anthropic anthropic-java - 2.53.0 + 2.57.0 com.anthropic anthropic-java-vertex - 2.53.0 + 2.57.0 ``` @@ -362,6 +362,7 @@ For the full feature list with Google Cloud availability, see [Features overview * API endpoints (Message Batches, Models, Admin, Compliance, Usage and Cost) * Claude Managed Agents * Server-side fallback (the [`fallbacks` parameter](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback); use the [client-side fallback pattern](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#client-side-fallback) instead) +* [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) toolsets (`computer_toolset_20260801` and `browser_toolset_20260801` are not currently available on Google Cloud; the beta computer use tool versions remain available) ### Context window diff --git a/content/en/build-with-claude/claude-platform-on-aws.md b/content/en/build-with-claude/claude-platform-on-aws.md index 9bda1d7686..d425cc5e90 100644 --- a/content/en/build-with-claude/claude-platform-on-aws.md +++ b/content/en/build-with-claude/claude-platform-on-aws.md @@ -116,7 +116,7 @@ Plan a move from an existing organization as a cutover to a new one: Once the new organization is running, the differences are concentrated in billing and authentication, which are handled through AWS: -* **Billing** moves to AWS Marketplace: usage is billed in Claude Consumption Units rather than prepaid credits (see [Billing](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing)), and spend limits are managed on the Billing page rather than the Limits page (see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits)). During the transition, billing stays separate: the existing organization continues to be billed as it is today. +* **Billing** moves to AWS Marketplace: usage is billed in Claude Consumption Units rather than prepaid credits (see [Billing](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing)), and you set spend limits on the Billing page (see [Spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits)). During the transition, billing stays separate: the existing organization continues to be billed as it is today. * **Authentication and access** move to AWS: requests authenticate with AWS credentials or with API keys generated in the AWS Console, not the Claude Console (see [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#authentication)). Organization membership is managed through AWS IAM rather than the Claude Console (see [Available pages](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#available-pages)), and Anthropic's client SDKs provide platform-specific client classes (see [Install an SDK](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#install-an-sdk)). * **Day-to-day API usage** works the way it does on the first-party Claude API, except where noted in the [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported). Before shifting production traffic, check your rate limits: new organizations are placed on the Start tier, and limit increases go through your Anthropic account representative (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). @@ -305,14 +305,14 @@ Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries ```kotlin Gradle - implementation("com.anthropic:anthropic-java-aws:2.53.0") + implementation("com.anthropic:anthropic-java-aws:2.57.0") ``` ```xml Maven com.anthropic anthropic-java-aws - 2.53.0 + 2.57.0 ``` @@ -533,7 +533,7 @@ Claude Platform on AWS uses Claude API endpoints directly, which means you get f * **Feature access:** Because Anthropic operates both platforms, most new features and beta headers become available on Claude Platform on AWS without a separate integration step. See [feature limitations](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#features-not-supported) for exceptions. * **Beta features:** Pass the standard `anthropic-beta` header to access beta features, just as you would with the Claude API. -* **Agent Skills:** Use pre-built and custom [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) with the same `container.skills` parameter and beta headers as the Claude API. All pre-built Skills (PowerPoint, Excel, Word, PDF) work out of the box. +* **Agent Skills:** Use pre-built and custom [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) with the same `container.skills` parameter as the Claude API. All pre-built Skills (PowerPoint, Excel, Word, PDF) work out of the box. * **Code execution:** Run code in Anthropic's managed sandbox using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool). * **Tool use:** Computer use and all other [tool use capabilities](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) are available. * **Extended thinking:** Enable extended thinking with the same parameters as the Claude API. @@ -560,6 +560,7 @@ Session behavior on Claude Platform on AWS differs from first-party Claude Manag The following capabilities are not currently available on Claude Platform on AWS: * **HIPAA readiness:** Anthropic's HIPAA-ready program is not available. See [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention). +* **Computer use and browser use toolsets:** `computer_toolset_20260801` and `browser_toolset_20260801` are not currently available on Claude Platform on AWS. The beta [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#earlier-tool-versions) tool versions remain available. - **Admin API:** Workspace endpoints (create, get, list, update, and archive on `/v1/organizations/workspaces`) are available. Other Admin API endpoints (organization members, workspace members, invites, API keys, usage reports, cost reports, rate limit reports, and external keys) are not currently available. Manage [CMEK](https://platform.claude.com/docs/en/manage-claude/cmek) keys in the Claude Console instead. View usage and cost data in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#using-the-claude-console) instead. AWS IAM manages organization membership. - **Workspace member management:** Adding or removing users from individual workspaces is not available. AWS IAM policies on workspace ARNs control access. @@ -797,7 +798,7 @@ The **Through AWS gateway** column indicates whether the page reads and writes d | **Usage** | Yes | No | View token usage by model, workspace, and dimension. Data can take a few minutes to appear after a request. | | **Cost** | Yes | No | View cost breakdowns by model and workspace. AWS Cost Explorer shows the aggregated [Claude Consumption Unit (CCU)](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#billing) line item. | | **Rate limits** | Yes | No | View rate limits (read-only). Tier increases go through your Anthropic account representative; see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas). | -| **Workspaces** | Yes | No | View per-region workspaces (read-only). | +| **Workspaces** | Yes | No | View per-region workspaces (read-only) and set per-workspace [spend limits](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#spend-limits). | | **Files** | Yes | Yes | View and manage uploaded files. | | **Skills** | Yes | Yes | View and manage Agent Skills. | | **Batches** | Yes | Yes | View and manage batch processing jobs. | @@ -838,14 +839,16 @@ For the CCU price, conversion mechanics, discount application, and per-model tok ### Spend limits -The Start, Build, and Scale usage tiers each carry a monthly spend cap; see [the per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. The spend cap and rate limits belong to the same tier, so to raise the cap, request a tier increase through your Anthropic account representative or [support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). +The Start, Build, and Scale usage tiers each carry a monthly spend cap; see the [per-tier spend caps](https://platform.claude.com/docs/en/api/rate-limits#spend-limits) for current values. When your organization's usage for the calendar month reaches its tier's cap, API requests fail with the [spend-cap error](https://platform.claude.com/docs/en/api/rate-limits#reaching-your-spend-cap) until 00UTC on the first day of the next month, and retrying sooner doesn't succeed. The spend cap and rate limits belong to the same tier. To raise the cap, or to restore access after reaching it, request a tier increase through your Anthropic account representative or [Anthropic support](https://support.claude.com) (see [Rate limits and quotas](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#rate-limits-and-quotas)). -You can also set your own monthly spend limit to cap what your organization spends: +You can also set your own monthly spend limits below the cap, after adding at least one recipient under **Email notifications** on the Billing page: * **Organization spend limit:** Go to [Settings > Billing](https://platform.claude.com/settings/billing) in the [Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws#using-the-claude-console) to set a monthly spend limit. -* **Workspace spend limits:** Set monthly spend limits for individual workspaces from each workspace's **Spend limits** settings. +* **Workspace spend limits:** Select a workspace under [Settings > Workspaces](https://platform.claude.com/settings/workspaces) and open its **Spend limits** page. Workspace details are otherwise read-only in the Claude Console on Claude Platform on AWS. -The spend limits you set are soft limits: spend is calculated at list prices and can take about two hours to reflect recent usage. +When usage reaches a limit you set, requests fail with HTTP 400 (see the [spend limit error](https://platform.claude.com/docs/en/api/rate-limits#setting-your-own-spend-limit)) until 00UTC on the first day of the next month, or until you raise or remove the limit. + +Spend is calculated at list prices and can take about 2 hours to reflect recent usage, so usage can exceed the cap or a limit before requests start failing. The overshoot is billed. When the tier cap or an organization spend limit stops your requests, an email notice goes to the recipients listed under **Email notifications** on the Billing page. Role-based recipients, such as all admins, aren't available on Claude Platform on AWS. The tier-cap notice also goes to the email address used at AWS Marketplace sign-up. ## Monitoring and logging diff --git a/content/en/build-with-claude/files.md b/content/en/build-with-claude/files.md index 9a608b5087..ce89b2aa64 100644 --- a/content/en/build-with-claude/files.md +++ b/content/en/build-with-claude/files.md @@ -9,7 +9,7 @@ description: Upload files once, reference them by file_id in Messages requests, - Platforms: Claude API, Claude Platform on AWS (beta), Microsoft Foundry (beta) [1]; not available on Amazon Bedrock, Google Cloud 1. On [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry), the Files API requires a [Hosted on Anthropic deployment](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#additional-features-not-supported-when-hosted-on-azure). -The Files API lets you upload and manage files to use with the Claude API without re-uploading content with each request. This is particularly useful when using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to provide inputs (for example, datasets and documents) and then download outputs (for example, charts). You can [explore the API reference directly](https://platform.claude.com/docs/en/api/beta/files/upload), in addition to this guide. +The Files API lets you upload and manage files to use with the Claude API without re-uploading content with each request. This is particularly useful when using the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to provide inputs (for example, datasets and documents) and then download outputs (for example, charts). You can [explore the API reference directly](https://platform.claude.com/docs/en/api/files/upload), in addition to this guide. ## File type support @@ -32,13 +32,6 @@ The Files API provides a create-once, use-many-times approach for working with f ## How to use the Files API - - Requests to the Files API endpoints (`/v1/files`) don't need a beta header, and neither do Messages or Message Batches requests that reference an uploaded file. Two things to know about the `anthropic-beta: files-api-2025-04-14` header the examples on this page still send: - - * **Referencing a file from the Messages API.** Requests that use an uploaded file as a `document` or `image` source, or in a `container_upload` block for the code execution tool, work with or without the header. The SDK examples on this page still pass it through their `betas` parameter, which continues to work. - * **Sending the header on Files API requests.** The SDK `beta.files` methods and the CLI `ant beta:files` commands add the header automatically, and the cURL examples on this page include it. Those requests keep working and return the earlier response format: the list endpoint paginates with `before_id` and `after_id`, returns `has_more`, `first_id`, and `last_id` instead of `next_page`, and rejects the `page` and `ids[]` parameters as unknown fields. File objects returned under the header omit `expires_at` instead of returning `null` when no expiration is set. To use `page` and `ids[]` as described under [List files](https://platform.claude.com/docs/en/build-with-claude/files#list-files), send the request without the beta header. - - ### Uploading a file Upload a file to be referenced in future API calls: @@ -48,13 +41,12 @@ Upload a file to be referenced in future API calls: FILE_ID=$(curl -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "file=@/path/to/document.pdf" | jq -r '.id') echo "$FILE_ID" ``` ```bash CLI - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file /path/to/document.pdf \ --transform id \ --raw-output) @@ -62,7 +54,7 @@ Upload a file to be referenced in future API calls: ``` ```python Python - uploaded = client.beta.files.upload( + uploaded = client.files.upload( file=("document.pdf", open("/path/to/document.pdf", "rb"), "application/pdf"), ) file_id = uploaded.id @@ -70,7 +62,7 @@ Upload a file to be referenced in future API calls: ``` ```typescript TypeScript - const uploaded = await client.beta.files.upload({ + const uploaded = await client.files.upload({ file: await toFile( fs.createReadStream("/path/to/document.pdf"), undefined, @@ -81,7 +73,7 @@ Upload a file to be referenced in future API calls: ``` ```csharp C# - var uploaded = await client.Beta.Files.Upload( + var uploaded = await client.Files.Upload( new FileUploadParams { File = new BinaryContent @@ -103,8 +95,8 @@ Upload a file to be referenced in future API calls: } defer f.Close() - response, err := client.Beta.Files.Upload(context.Background(), - anthropic.BetaFileUploadParams{ + response, err := client.Files.Upload(context.Background(), + anthropic.FileUploadParams{ File: anthropic.File(f, "document.pdf", "application/pdf"), }) if err != nil { @@ -116,7 +108,7 @@ Upload a file to be referenced in future API calls: ``` ```java Java - FileMetadata file = client.beta().files().upload( + FileMetadata file = client.files().upload( FileUploadParams.builder() .file(MultipartField.builder() .value(Files.newInputStream(Path.of("/path/to/document.pdf"))) @@ -131,6 +123,7 @@ Upload a file to be referenced in future API calls: ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $file = $client->beta->files->upload( FileParam::fromResource(fopen('/path/to/document.pdf', 'rb'), contentType: 'application/pdf'), ); @@ -140,7 +133,7 @@ Upload a file to be referenced in future API calls: ``` ```ruby Ruby - file = client.beta.files.upload( + file = client.files.upload( file: Anthropic::FilePart.new( Pathname("/path/to/document.pdf"), content_type: "application/pdf" @@ -178,7 +171,6 @@ Once uploaded, reference the file by passing the `id` from the upload response a curl -X POST https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- < + Content = new List { - new BetaTextBlockParam { Text = "Please summarize this document for me." }, - new BetaRequestDocumentBlock + new TextBlockParam { Text = "Please summarize this document for me." }, + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileId } + Source = new FileDocumentSource { FileID = fileId } } } } @@ -302,15 +291,14 @@ Once uploaded, reference the file by passing the `id` from the upload response a ``` ```go Go - msg, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + msg, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaTextBlock("Please summarize this document for me."), - anthropic.NewBetaDocumentBlock(anthropic.BetaFileDocumentSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewTextBlock("Please summarize this document for me."), + anthropic.NewDocumentBlock(anthropic.FileDocumentSourceParam{ FileID: fileID, }), ), @@ -326,25 +314,23 @@ Once uploaded, reference the file by passing the `id` from the upload response a ```java Java MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta("files-api-2025-04-14") .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofText(BetaTextBlockParam.builder() + .addUserMessageOfBlockParams(List.of( + ContentBlockParam.ofText(TextBlockParam.builder() .text("Please summarize this document for me.") .build()), - BetaContentBlockParam.ofDocument(BetaRequestDocumentBlock.builder() - .source(BetaFileDocumentSource.builder() - .fileId(fileId) - .build()) + ContentBlockParam.ofDocument(DocumentBlockParam.builder() + .fileSource(fileId) .build()) )) .build(); - BetaMessage message = client.beta().messages().create(params); + Message message = client.messages().create(params); System.out.println(message); ``` ```php PHP + // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta. $response = $client->beta->messages->create( maxTokens: 1024, messages: [ @@ -370,10 +356,9 @@ Once uploaded, reference the file by passing the `id` from the upload response a ``` ```ruby Ruby - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user", @@ -699,44 +684,43 @@ The following examples read a text file and send its contents as plain text: #### List files -Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/beta/files/list). The SDKs return the first page and provide auto-pagination helpers. The CLI example bounds the total with `--max-items`: +Retrieve a list of your uploaded files. The endpoint is paginated: each request returns up to `limit` files (20 by default, and at most 1,000), and the response's `next_page` cursor fetches the next page when passed back as the `page` parameter. Files are ordered newest first. See the [List Files API reference](https://platform.claude.com/docs/en/api/files/list). The SDKs return the first page and provide auto-pagination helpers. The CLI example bounds the total with `--max-items`: ```bash cURL curl https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files list \ + ant files list \ --max-items 10 ``` ```python Python client = anthropic.Anthropic() - files = client.beta.files.list() + files = client.files.list() print(files) ``` ```typescript TypeScript const client = new Anthropic(); - const files = await client.beta.files.list(); + const files = await client.files.list(); console.log(files); ``` ```csharp C# AnthropicClient client = new(); - var files = await client.Beta.Files.List(); + var files = await client.Files.List(); Console.WriteLine(files); ``` ```go Go client := anthropic.NewClient() - files, err := client.Beta.Files.List(context.TODO(), anthropic.BetaFileListParams{}) + files, err := client.Files.List(context.TODO(), anthropic.FileListParams{}) if err != nil { log.Fatal(err) } @@ -744,17 +728,19 @@ Retrieve a list of your uploaded files. The endpoint is paginated: each request ``` ```java Java - import com.anthropic.models.beta.files.FileListPage; + import com.anthropic.models.files.FileListPage; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - FileListPage files = client.beta().files().list(); + FileListPage files = client.files().list(); System.out.println(files); } ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. + // list() paginates with afterID, beforeID, and limit; page and ids[] are not parameters here. $client = new Client(); $files = $client->beta->files->list(); @@ -764,15 +750,13 @@ Retrieve a list of your uploaded files. The endpoint is paginated: each request ```ruby Ruby client = Anthropic::Client.new - files = client.beta.files.list + files = client.files.list puts files ``` To check a known set of files in one request instead of paging, pass up to 100 file IDs as `ids[]` query parameters. An `ids[]` request always returns a single page (`next_page` is `null`), and any ID that does not resolve to a file in your workspace is silently omitted from `data`; compare the returned IDs against the requested IDs to detect misses. `ids[]` cannot be combined with `page` or `limit`. -The `page` parameter, the `next_page` cursor, and the `ids[]` filter apply to requests sent without the `anthropic-beta: files-api-2025-04-14` header. The preceding examples send it (the SDKs and CLI add it for `beta.files` calls), so they receive the earlier list format described in the note under [How to use the Files API](https://platform.claude.com/docs/en/build-with-claude/files#how-to-use-the-files-api). - #### Get file metadata Retrieve information about a specific file: @@ -781,36 +765,31 @@ Retrieve information about a specific file: ```bash cURL curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files retrieve-metadata \ + ant files retrieve-metadata \ --file-id "$FILE_ID" ``` ```python Python - file = client.beta.files.retrieve_metadata(file_id) + file = client.files.retrieve_metadata(file_id) print(file) ``` ```typescript TypeScript - const file = await client.beta.files.retrieveMetadata(uploaded.id); + const file = await client.files.retrieveMetadata(uploaded.id); console.log(file); ``` ```csharp C# - var file = await client.Beta.Files.RetrieveMetadata(fileId); + var file = await client.Files.RetrieveMetadata(fileId); Console.WriteLine(file); ``` ```go Go - metadata, err := client.Beta.Files.GetMetadata( - context.TODO(), - fileID, - anthropic.BetaFileGetMetadataParams{}, - ) + metadata, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) } @@ -819,18 +798,19 @@ Retrieve information about a specific file: ``` ```java Java - FileMetadata metadata = client.beta().files().retrieveMetadata(fileId); + FileMetadata metadata = client.files().retrieveMetadata(fileId); System.out.println(metadata); ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $file = $client->beta->files->retrieveMetadata($fileId); echo $file; ``` ```ruby Ruby - file = client.beta.files.retrieve_metadata(file_id) + file = client.files.retrieve_metadata(file_id) puts file ``` @@ -843,48 +823,44 @@ Remove a file from your workspace: ```bash cURL curl -X DELETE "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:files delete \ + ant files delete \ --file-id "$FILE_ID" ``` ```python Python - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` ```typescript TypeScript - await client.beta.files.delete(uploaded.id); + await client.files.delete(uploaded.id); ``` ```csharp C# - await client.Beta.Files.Delete(fileId); + await client.Files.Delete(fileId); ``` ```go Go - _, err = client.Beta.Files.Delete( - context.TODO(), - fileID, - anthropic.BetaFileDeleteParams{}, - ) + _, err = client.Files.Delete(context.TODO(), fileID) if err != nil { log.Fatal(err) } ``` ```java Java - client.beta().files().delete(fileId); + client.files().delete(fileId); ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $client->beta->files->delete($fileId); ``` ```ruby Ruby - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` @@ -897,31 +873,30 @@ Download files that were created by [skills](https://platform.claude.com/docs/en curl -X GET "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ --output downloaded_file.txt ``` ```bash CLI - ant beta:files download \ + ant files download \ --file-id "$FILE_ID" \ --output downloaded_file.txt ``` ```python Python - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) file_content.write_to_file("downloaded_file.txt") ``` ```typescript TypeScript - const content = await client.beta.files.download(uploaded.id); + const content = await client.files.download(uploaded.id); const bytes = Buffer.from(await content.arrayBuffer()); await fsp.writeFile("downloaded_file.txt", bytes); ``` ```csharp C# - using var fileContent = await client.Beta.Files.Download(fileId); + using var fileContent = await client.Files.Download(fileId); await using var source = await fileContent.ReadAsStream(); await using var destination = File.Create("downloaded_file.txt"); await source.CopyToAsync(destination); @@ -929,11 +904,7 @@ Download files that were created by [skills](https://platform.claude.com/docs/en ```go Go func downloadFile(client anthropic.Client, fileID string) error { - resp, err := client.Beta.Files.Download( - context.TODO(), - fileID, - anthropic.BetaFileDownloadParams{}, - ) + resp, err := client.Files.Download(context.TODO(), fileID) if err != nil { return err } @@ -952,7 +923,7 @@ Download files that were created by [skills](https://platform.claude.com/docs/en ``` ```java Java - try (HttpResponse response = client.beta().files().download(fileId)) { + try (HttpResponse response = client.files().download(fileId)) { try (InputStream body = response.body()) { Files.copy(body, Path.of("downloaded_file.txt"), StandardCopyOption.REPLACE_EXISTING); @@ -961,13 +932,14 @@ Download files that were created by [skills](https://platform.claude.com/docs/en ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $fileContent = $client->beta->files->download($fileId); file_put_contents("downloaded_file.txt", $fileContent); ``` ```ruby Ruby - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) File.binwrite("downloaded_file.txt", file_content.read) ``` diff --git a/content/en/build-with-claude/overview.md b/content/en/build-with-claude/overview.md index 0456cbf236..820458e500 100644 --- a/content/en/build-with-claude/overview.md +++ b/content/en/build-with-claude/overview.md @@ -69,12 +69,13 @@ Built-in tools that Claude invokes through `tool_use`. Server-side tools are run ### Client-side tools -| Feature | Description | ZDR | Availability | -| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | ------------------------------------------------------------------------------------------------- | -| [Bash](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | Execute bash commands and scripts to interact with the system shell and perform command-line operations. | ZDR eligible | | -| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | Control computer interfaces by taking screenshots and issuing mouse and keyboard commands. | ZDR eligible | | -| [Memory](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | Enable Claude to store and retrieve information across conversations. Build knowledge bases over time, maintain project context, and learn from past interactions. | ZDR eligible | | -| [Text editor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | Create and edit text files with a built-in text editor interface for file manipulation tasks. | ZDR eligible | | +| Feature | Description | ZDR | Availability | +| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------ | --------------------------------------------------------------------------------------------- | +| [Bash](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | Execute bash commands and scripts to interact with the system shell and perform command-line operations. | ZDR eligible | | +| [Browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | Navigate, read, and interact with webpages in your own browser environment. | ZDR eligible | | +| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | Control computer interfaces by taking screenshots and issuing mouse and keyboard commands. | ZDR eligible | | +| [Memory](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) | Enable Claude to store and retrieve information across conversations. Build knowledge bases over time, maintain project context, and learn from past interactions. | ZDR eligible | | +| [Text editor](https://platform.claude.com/docs/en/agents-and-tools/tool-use/text-editor-tool) | Create and edit text files with a built-in text editor interface for file manipulation tasks. | ZDR eligible | | ## Tool infrastructure diff --git a/content/en/build-with-claude/pdf-support.md b/content/en/build-with-claude/pdf-support.md index d242785be0..c3cbd8aeeb 100644 --- a/content/en/build-with-claude/pdf-support.md +++ b/content/en/build-with-claude/pdf-support.md @@ -704,7 +704,7 @@ If you need to send PDFs from your local system or when a URL isn't available: #### Option 3: Files API -For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). These examples send the `anthropic-beta: files-api-2025-04-14` header, which the API accepts but doesn't require: +For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): ```bash cURL @@ -712,7 +712,6 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use FILE_ID=$(curl -sS -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "file=@document.pdf" | jq -r '.id') # Then use the returned file_id in your message @@ -720,7 +719,6 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -d @- < + Content = new List { - new BetaRequestDocumentBlock + new DocumentBlockParam { - Source = new BetaFileDocumentSource { FileID = fileUpload.ID }, + Source = new FileDocumentSource { FileID = fileUpload.ID }, }, - new BetaTextBlockParam("What are the key findings in this document?"), + new TextBlockParam("What are the key findings in this document?"), }, }, ], @@ -891,7 +883,7 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use } defer pdfFile.Close() - fileUpload, err := client.Beta.Files.Upload(context.TODO(), anthropic.BetaFileUploadParams{ + fileUpload, err := client.Files.Upload(context.TODO(), anthropic.FileUploadParams{ File: anthropic.File(pdfFile, "document.pdf", "application/pdf"), }) if err != nil { @@ -899,16 +891,15 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use } // Use the uploaded file in a message - message, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaDocumentBlock(anthropic.BetaFileDocumentSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewDocumentBlock(anthropic.FileDocumentSourceParam{ FileID: fileUpload.ID, }), - anthropic.NewBetaTextBlock("What are the key findings in this document?"), + anthropic.NewTextBlock("What are the key findings in this document?"), ), }, }) @@ -924,28 +915,20 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use // Upload the PDF file FileMetadata file = client - .beta() .files() .upload(FileUploadParams.builder().file(Path.of("/path/to/document.pdf")).build()); // Use the uploaded file in a message MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) .maxTokens(1024) - .addUserMessageOfBetaContentBlockParams( + .addUserMessageOfBlockParams( List.of( - BetaContentBlockParam.ofDocument( - BetaRequestDocumentBlock.builder() - .source( - BetaFileDocumentSource.builder() - .fileId(file.id()) - .build() - ) - .build() + ContentBlockParam.ofDocument( + DocumentBlockParam.builder().fileSource(file.id()).build() ), - BetaContentBlockParam.ofText( - BetaTextBlockParam.builder() + ContentBlockParam.ofText( + TextBlockParam.builder() .text("What are the key findings in this document?") .build() ) @@ -953,11 +936,13 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use ) .build(); - BetaMessage message = client.beta().messages().create(params); + Message message = client.messages().create(params); System.out.println(message.content()); ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. + // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta. use Anthropic\Core\FileParam; $client = new Client(); @@ -1000,16 +985,15 @@ For PDFs you'll use repeatedly, or when you want to avoid encoding overhead, use # Upload the PDF file file_upload = File.open("/path/to/document.pdf", "rb") do |f| - anthropic.beta.files.upload( + anthropic.files.upload( file: Anthropic::FilePart.new(f, filename: "document.pdf", content_type: "application/pdf") ) end # Use the uploaded file in a message - message = anthropic.beta.messages.create( + message = anthropic.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user", diff --git a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md index 8d66f45640..08e482e45d 100644 --- a/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md +++ b/content/en/build-with-claude/prompt-engineering/claude-prompting-best-practices.md @@ -828,7 +828,7 @@ For tasks spanning multiple context windows: * "Review progress.txt, tests.json, and the git logs." * "Manually run through a fundamental integration test before moving on to implementing new features." -5. **Provide verification tools:** As the length of autonomous tasks grows, Claude needs to verify correctness without continuous human feedback. Tools like Playwright MCP server or computer use capabilities for testing UIs are helpful. +5. **Provide verification tools:** As the length of autonomous tasks grows, Claude needs to verify correctness without continuous human feedback. Tools that let Claude verify UI work are helpful, such as the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool), or a browser automation MCP server. 6. **Encourage complete usage of context:** Prompt Claude to efficiently complete components before moving on: diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md index 4f87ddc851..e64971bf0b 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-opus-4-8.md @@ -157,6 +157,6 @@ Iterate on prompts against a subset of your evals or test cases to validate reca ## Computer use -[Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. +On the Claude API, Claude Opus 4.8 supports the `computer_toolset_20260801` toolset and the earlier `computer_20251124` tool version. For tasks inside webpages, Claude Opus 4.8 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`). [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. For particularly cost-sensitive workloads, 720p or 1366×768 are lower-cost options with strong performance. Conduct your own testing to find the ideal settings for your use case; experimenting with effort settings can also help tune the model's behavior. diff --git a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md index 943b31b655..4df79b22cc 100644 --- a/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md +++ b/content/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5.md @@ -153,6 +153,6 @@ Iterate on prompts against a subset of your evals or test cases to validate reca ## Computer use -Claude Sonnet 5 supports the `computer_20251124` tool version. [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. +On the Claude API, Claude Sonnet 5 supports the `computer_toolset_20260801` toolset and the earlier `computer_20251124` tool version. For tasks inside webpages, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`). [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) capability works across resolutions, up to a maximum resolution of 2576px / 3.75MP. Internal computer use testing shows that sending images at 1080p provides a good balance of performance and cost. For particularly cost-sensitive workloads, 720p or 1366×768 are lower-cost options with strong performance. Conduct your own testing to find the ideal settings for your use case; experimenting with effort settings can also help tune the model's behavior. diff --git a/content/en/build-with-claude/search-results.md b/content/en/build-with-claude/search-results.md index 775100bd03..710482b2dd 100644 --- a/content/en/build-with-claude/search-results.md +++ b/content/en/build-with-claude/search-results.md @@ -2159,7 +2159,7 @@ When `citations.enabled` is set to `true`, Claude attaches citation references t Ground Claude's responses in your source documents. Citations return the exact passages that support each claim, so you can verify answers and surface sources to your users. - + Give Claude access to current web content with cited sources, optional dynamic filtering, and domain controls. diff --git a/content/en/build-with-claude/skills-guide.md b/content/en/build-with-claude/skills-guide.md index a199a5df7b..461b122fb9 100644 --- a/content/en/build-with-claude/skills-guide.md +++ b/content/en/build-with-claude/skills-guide.md @@ -9,8 +9,8 @@ Agent Skills extend Claude's capabilities through organized folders of instructi For complete API reference including request/response schemas and all parameters, see: - * [Skill Management API Reference](https://platform.claude.com/docs/en/api/beta/skills/list) - CRUD operations for Skills - * [Skill Versions API Reference](https://platform.claude.com/docs/en/api/beta/skills/versions/list) - Version management + * [Skill Management API Reference](https://platform.claude.com/docs/en/api/skills/list) - CRUD operations for Skills + * [Skill Versions API Reference](https://platform.claude.com/docs/en/api/skills/versions/list) - Version management @@ -43,15 +43,15 @@ Skills integrate identically in the Messages API regardless of source. You speci You can use Skills from two sources: -| Aspect | Anthropic Skills | Custom Skills | -| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------ | -| **Type value** | `anthropic` | `custom` | -| **Skill IDs** | Short names: `pptx`, `xlsx`, `docx`, `pdf` | Generated: `skill_01AbCdEfGhIjKlMnOpQrStUv` | -| **Version format** | Date-based: `20251013` or `latest` | Version ID: `skver_01AbCdEfGhIjKlMnOpQrStUv` or `latest` | -| **Management** | Pre-built and maintained by Anthropic | Upload and manage through the [Skills API](https://platform.claude.com/docs/en/api/beta/skills/create) | -| **Availability** | Available to all users | Private to your workspace | +| Aspect | Anthropic Skills | Custom Skills | +| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------- | +| **Type value** | `anthropic` | `custom` | +| **Skill IDs** | Short names: `pptx`, `xlsx`, `docx`, `pdf` | Generated: `skill_01AbCdEfGhIjKlMnOpQrStUv` | +| **Version format** | Date-based: `20251013` or `latest` | Version ID: `skver_01AbCdEfGhIjKlMnOpQrStUv` or `latest` | +| **Management** | Pre-built and maintained by Anthropic | Upload and manage through the [Skills API](https://platform.claude.com/docs/en/api/skills/create) | +| **Availability** | Available to all users | Private to your workspace | -Both skill sources are returned by the [List Skills endpoint](https://platform.claude.com/docs/en/api/beta/skills/list) (use the `source` parameter to filter). The integration shape and execution environment are identical. The only difference is where the Skills come from and how they're managed. +Both skill sources are returned by the [List Skills endpoint](https://platform.claude.com/docs/en/api/skills/list) (use the `source` parameter to filter). The integration shape and execution environment are identical. The only difference is where the Skills come from and how they're managed. ### Prerequisites @@ -60,8 +60,6 @@ To use Skills, you need: 1. **Claude API key** from the [Claude Console](https://platform.claude.com/settings/keys) 2. **[Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool)** enabled in your requests -Skills are generally available on the Claude API and don't require an `anthropic-beta` header, either for the Skills API or for `container.skills` in Messages requests. The examples in this guide still send the `skills-2025-10-02` beta header (plus `code-execution-2025-08-25` in Messages requests) and use the SDKs' `beta` namespace. Both headers remain valid opt-ins, so the examples work as written, and you can omit them in your own requests. - Skills require the code execution tool, so use a model from its [model compatibility list](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#model-compatibility). *** @@ -79,7 +77,6 @@ The structure is identical for both Anthropic and custom Skills. Specify the req curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -105,8 +102,7 @@ The structure is identical for both Anthropic and custom Skills. Specify the req ``` ```bash CLI - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container: @@ -126,10 +122,9 @@ The structure is identical for both Anthropic and custom Skills. Specify the req ```python Python client = anthropic.Anthropic() - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}] }, @@ -143,10 +138,9 @@ The structure is identical for both Anthropic and custom Skills. Specify the req ```typescript TypeScript const client = new Anthropic(); - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -178,53 +172,48 @@ The structure is identical for both Anthropic and custom Skills. Specify the req { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create a presentation about renewable energy" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var message = await client.Beta.Messages.Create(parameters); + var message = await client.Messages.Create(parameters); Console.WriteLine(message); ``` ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a presentation about renewable energy")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create a presentation about renewable energy")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -234,9 +223,9 @@ The structure is identical for both Anthropic and custom Skills. Specify the req ``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); @@ -244,25 +233,24 @@ The structure is identical for both Anthropic and custom Skills. Specify the req MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build()) .build()) .addUserMessage("Create a presentation about renewable energy") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $client = new Client(); $message = $client->beta->messages->create( @@ -292,10 +280,9 @@ The structure is identical for both Anthropic and custom Skills. Specify the req ```ruby Ruby client = Anthropic::Client.new - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -337,7 +324,6 @@ To provide input files for Skills to work on, [upload them with the Files API](h RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -363,14 +349,12 @@ To provide input files for Skills to work on, [upload them with the Files API](h # Step 3: Get filename from metadata FILENAME=$(curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" | jq -r '.filename') + -H "anthropic-version: 2023-06-01" | jq -r '.filename') # Step 4: Download the file using Files API curl "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ --output "$FILENAME" echo "Downloaded: $FILENAME" @@ -379,8 +363,7 @@ To provide input files for Skills to work on, [upload them with the Files API](h ```bash CLI # Step 1: Use the xlsx Skill to create a file # Step 2: Extract file_id from the response with --transform (GJSON path) - FILE_ID=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + FILE_ID=$(ant messages create \ --transform 'content.#.content.content.#.file_id|@flatten|0' \ --raw-output <<'YAML' model: claude-opus-5 @@ -400,13 +383,13 @@ To provide input files for Skills to work on, [upload them with the Files API](h ) # Step 3: Get the filename from file metadata - FILENAME=$(ant beta:files retrieve-metadata \ + FILENAME=$(ant files retrieve-metadata \ --file-id "$FILE_ID" \ --transform filename \ --raw-output) # Step 4: Download the file using Files API - ant beta:files download \ + ant files download \ --file-id "$FILE_ID" \ --output "$FILENAME" > /dev/null @@ -417,10 +400,9 @@ To provide input files for Skills to work on, [upload them with the Files API](h client = anthropic.Anthropic() # Step 1: Use a Skill to create a file - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}] }, @@ -449,8 +431,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h # Step 3: Download the file using Files API for file_id in extract_file_ids(response): - file_metadata = client.beta.files.retrieve_metadata(file_id=file_id) - file_content = client.beta.files.download(file_id=file_id) + file_metadata = client.files.retrieve_metadata(file_id=file_id) + file_content = client.files.download(file_id=file_id) # Step 4: Save to disk file_content.write_to_file(file_metadata.filename) @@ -463,10 +445,9 @@ To provide input files for Skills to work on, [upload them with the Files API](h const client = new Anthropic(); // Step 1: Use a Skill to create a file - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] }, @@ -494,8 +475,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h // Step 3: Download each file and save to disk for (const fileId of fileIds) { - const fileMetadata = await client.beta.files.retrieveMetadata(fileId); - const fileResponse = await client.beta.files.download(fileId); + const fileMetadata = await client.files.retrieveMetadata(fileId); + const fileResponse = await client.files.download(fileId); await writeFile(fileMetadata.filename, Buffer.from(await fileResponse.arrayBuffer())); console.log(`Downloaded: ${fileMetadata.filename}`); @@ -510,31 +491,30 @@ To provide input files for Skills to work on, [upload them with the Files API](h { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Create an Excel file with a simple budget spreadsheet" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); // Step 2: Extract file IDs from the response List fileIds = []; foreach (var block in response.Content) { if (block.TryPickBashCodeExecutionToolResult(out var toolResult) - && toolResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var result)) + && toolResult.Content.TryPickBashCodeExecutionResultBlock(out var result)) { foreach (var output in result.Content) { @@ -546,8 +526,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h // Step 3: Download each file and save to disk foreach (var fileId in fileIds) { - var fileMetadata = await client.Beta.Files.RetrieveMetadata(fileId); - using var download = await client.Beta.Files.Download(fileId); + var fileMetadata = await client.Files.RetrieveMetadata(fileId); + using var download = await client.Files.Download(fileId); using var downloadStream = await download.ReadAsStream(); using var outputFile = File.Create(fileMetadata.Filename); await downloadStream.CopyToAsync(outputFile); @@ -560,26 +540,25 @@ To provide input files for Skills to work on, [upload them with the Files API](h client := anthropic.NewClient() // Step 1: Use a Skill to create a file - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create an Excel file with a simple budget spreadsheet")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Create an Excel file with a simple budget spreadsheet")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -591,12 +570,12 @@ To provide input files for Skills to work on, [upload them with the Files API](h // Step 3: Download the file using Files API for _, fileID := range fileIDs { - fileMetadata, err := client.Beta.Files.GetMetadata(context.TODO(), fileID, anthropic.BetaFileGetMetadataParams{}) + fileMetadata, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) } - fileContent, err := client.Beta.Files.Download(context.TODO(), fileID, anthropic.BetaFileDownloadParams{}) + fileContent, err := client.Files.Download(context.TODO(), fileID) if err != nil { log.Fatal(err) } @@ -615,11 +594,11 @@ To provide input files for Skills to work on, [upload them with the Files API](h } } - func extractFileIDs(response *anthropic.BetaMessage) []string { + func extractFileIDs(response *anthropic.Message) []string { var fileIDs []string for _, item := range response.Content { switch v := item.AsAny().(type) { - case anthropic.BetaBashCodeExecutionToolResultBlock: + case anthropic.BashCodeExecutionToolResultBlock: if v.Content.Type == "bash_code_execution_result" { for _, output := range v.Content.Content { fileIDs = append(fileIDs, output.FileID) @@ -632,11 +611,11 @@ To provide input files for Skills to work on, [upload them with the Files API](h ``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.messages.BetaContentBlock; - import com.anthropic.models.beta.files.FileMetadata; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.messages.ContentBlock; + import com.anthropic.models.files.FileMetadata; import com.anthropic.core.http.HttpResponse; // ... void main() throws Exception { @@ -646,28 +625,26 @@ To provide input files for Skills to work on, [upload them with the Files API](h MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build()) .build()) .addUserMessage("Create an Excel file with a simple budget spreadsheet") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); // Step 2: Extract file IDs from the response List fileIds = new ArrayList<>(); - for (BetaContentBlock block : response.content()) { + for (ContentBlock block : response.content()) { if (block.isBashCodeExecutionToolResult()) { var content = block.asBashCodeExecutionToolResult().content(); - if (content.isBetaBashCodeExecutionResultBlock()) { - for (var outputBlock : content.asBetaBashCodeExecutionResultBlock().content()) { + if (content.isBashCodeExecutionResultBlock()) { + for (var outputBlock : content.asBashCodeExecutionResultBlock().content()) { fileIds.add(outputBlock.fileId()); } } @@ -676,8 +653,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h // Step 3: Download the file using Files API for (String fileId : fileIds) { - FileMetadata fileMetadata = client.beta().files().retrieveMetadata(fileId); - HttpResponse fileContent = client.beta().files().download(fileId); + FileMetadata fileMetadata = client.files().retrieveMetadata(fileId); + HttpResponse fileContent = client.files().download(fileId); // Step 4: Save to disk try (InputStream is = fileContent.body(); @@ -690,6 +667,8 @@ To provide input files for Skills to work on, [upload them with the Files API](h ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $client = new Client(); // Step 1: Use a Skill to create a file @@ -741,10 +720,9 @@ To provide input files for Skills to work on, [upload them with the Files API](h client = Anthropic::Client.new # Step 1: Use a Skill to create a file - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] }, @@ -775,9 +753,9 @@ To provide input files for Skills to work on, [upload them with the Files API](h # Step 3: Download the file using Files API extract_file_ids(response).each do |file_id| - file_metadata = client.beta.files.retrieve_metadata(file_id) + file_metadata = client.files.retrieve_metadata(file_id) - file_content = client.beta.files.download(file_id) + file_content = client.files.download(file_id) # Step 4: Save to disk File.binwrite(file_metadata.filename, file_content.read) @@ -793,51 +771,48 @@ To provide input files for Skills to work on, [upload them with the Files API](h # Get file metadata curl "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" # List all files curl "https://api.anthropic.com/v1/files" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" # Delete a file curl -X DELETE "https://api.anthropic.com/v1/files/$FILE_ID" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # Get file metadata - ant beta:files retrieve-metadata \ + ant files retrieve-metadata \ --file-id "$FILE_ID" \ --transform '{filename,size_bytes}' \ --format yaml # List all files - ant beta:files list \ + ant files list \ --transform '{filename,created_at}' \ --format yaml # Delete a file - ant beta:files delete --file-id "$FILE_ID" >/dev/null + ant files delete --file-id "$FILE_ID" >/dev/null ``` ```python Python client = anthropic.Anthropic() file_id = "file_011CNha8iCJcU1wXNR6q4V8w" # Get file metadata - file_info = client.beta.files.retrieve_metadata(file_id=file_id) + file_info = client.files.retrieve_metadata(file_id=file_id) print(f"Filename: {file_info.filename}, Size: {file_info.size_bytes} bytes") # List all files - for file in client.beta.files.list(): + for file in client.files.list(): print(f"{file.filename} - {file.created_at}") # Delete a file - client.beta.files.delete(file_id=file_id) + client.files.delete(file_id=file_id) ``` ```typescript TypeScript @@ -845,16 +820,16 @@ To provide input files for Skills to work on, [upload them with the Files API](h const fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - const fileInfo = await client.beta.files.retrieveMetadata(fileId); + const fileInfo = await client.files.retrieveMetadata(fileId); console.log(`Filename: ${fileInfo.filename}, Size: ${fileInfo.size_bytes} bytes`); // List all files - for await (const file of client.beta.files.list()) { + for await (const file of client.files.list()) { console.log(`${file.filename} - ${file.created_at}`); } // Delete a file - await client.beta.files.delete(fileId); + await client.files.delete(fileId); ``` ```csharp C# @@ -863,17 +838,17 @@ To provide input files for Skills to work on, [upload them with the Files API](h var fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - var fileInfo = await client.Beta.Files.RetrieveMetadata(fileId); + var fileInfo = await client.Files.RetrieveMetadata(fileId); Console.WriteLine($"Filename: {fileInfo.Filename}, Size: {fileInfo.SizeBytes} bytes"); // List files - await foreach (var file in (await client.Beta.Files.List()).Paginate()) + await foreach (var file in (await client.Files.List()).Paginate()) { Console.WriteLine($"{file.Filename} - {file.CreatedAt}"); } // Delete the file - await client.Beta.Files.Delete(fileId); + await client.Files.Delete(fileId); ``` ```go Go @@ -881,14 +856,14 @@ To provide input files for Skills to work on, [upload them with the Files API](h fileID := "file_011CNha8iCJcU1wXNR6q4V8w" // Get file metadata - fileInfo, err := client.Beta.Files.GetMetadata(context.TODO(), fileID, anthropic.BetaFileGetMetadataParams{}) + fileInfo, err := client.Files.GetMetadata(context.TODO(), fileID) if err != nil { log.Fatal(err) } fmt.Printf("Filename: %s, Size: %d bytes\n", fileInfo.Filename, fileInfo.SizeBytes) // List all files - files := client.Beta.Files.ListAutoPaging(context.TODO(), anthropic.BetaFileListParams{}) + files := client.Files.ListAutoPaging(context.TODO(), anthropic.FileListParams{}) for files.Next() { file := files.Current() fmt.Printf("%s - %s\n", file.Filename, file.CreatedAt) @@ -898,36 +873,37 @@ To provide input files for Skills to work on, [upload them with the Files API](h } // Delete a file - _, err = client.Beta.Files.Delete(context.TODO(), fileID, anthropic.BetaFileDeleteParams{}) + _, err = client.Files.Delete(context.TODO(), fileID) if err != nil { log.Fatal(err) } ``` ```java Java - import com.anthropic.models.beta.files.FileMetadata; - import com.anthropic.models.beta.files.FileListPage; + import com.anthropic.models.files.FileMetadata; + import com.anthropic.models.files.FileListPage; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); String fileId = "file_011CNha8iCJcU1wXNR6q4V8w"; // Get file metadata - FileMetadata fileInfo = client.beta().files().retrieveMetadata(fileId); + FileMetadata fileInfo = client.files().retrieveMetadata(fileId); System.out.println("Filename: " + fileInfo.filename() + ", Size: " + fileInfo.sizeBytes() + " bytes"); // List files (first page) - FileListPage files = client.beta().files().list(); + FileListPage files = client.files().list(); for (var file : files.data()) { System.out.println(file.filename() + " - " + file.createdAt()); } // Delete a file - client.beta().files().delete(fileId); + client.files().delete(fileId); } ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $client = new Client(); $fileId = 'file_011CNha8iCJcU1wXNR6q4V8w'; @@ -950,16 +926,16 @@ To provide input files for Skills to work on, [upload them with the Files API](h file_id = "file_011CNha8iCJcU1wXNR6q4V8w" # Get file metadata - file_info = client.beta.files.retrieve_metadata(file_id) + file_info = client.files.retrieve_metadata(file_id) puts "Filename: #{file_info.filename}, Size: #{file_info.size_bytes} bytes" # List all files - client.beta.files.list.auto_paging_each do |file| + client.files.list.auto_paging_each do |file| puts "#{file.filename} - #{file.created_at}" end # Delete a file - client.beta.files.delete(file_id) + client.files.delete(file_id) ``` @@ -981,8 +957,7 @@ The response's `container` object carries the container's `id` and `expires_at` ```bash CLI # First request creates container - CONTAINER_ID=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + CONTAINER_ID=$(ant messages create \ --transform container.id \ --raw-output <<'YAML' model: claude-opus-5 @@ -999,8 +974,7 @@ The response's `container` object carries the container's `id` and `expires_at` ) # Continue conversation with same container - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 < block.asText().text()) .collect(Collectors.joining("\n"))) .addUserMessage("What was the total revenue?") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response2 = client.beta().messages().create(params2); + Message response2 = client.messages().create(params2); System.out.println(response2); } ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $client = new Client(); $response1 = $client->beta->messages->create( @@ -1349,10 +1312,9 @@ The response's `container` object carries the container's `id` and `expires_at` ```ruby Ruby client = Anthropic::Client.new - response1 = client.beta.messages.create( + response1 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] }, @@ -1374,10 +1336,9 @@ The response's `container` object carries the container's `id` and `expires_at` { role: "user", content: "What was the total revenue?" } ] - response2 = client.beta.messages.create( + response2 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response1.container.id, skills: [ @@ -1404,7 +1365,6 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -1437,7 +1397,6 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s RESPONSE=$(curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\", @@ -1462,9 +1421,7 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s RESP=$(mktemp) # Initial request: capture the full JSON response to a temp file - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ - > "$RESP" <<'YAML' + ant messages create > "$RESP" <<'YAML' model: claude-opus-5 max_tokens: 4096 container: @@ -1485,9 +1442,7 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s # assistant turn. Repeat until stop_reason is no longer "pause_turn". CONTAINER_ID=$(jq -r '.container.id' "$RESP") - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ - > "$RESP" < "$RESP" < messages = + List messages = [ new() { Role = Role.User, Content = "Generate and process a large sample dataset" }, ]; var maxRetries = 10; string? containerId = null; - BetaMessage? response = null; + Message? response = null; for (var i = 0; i < maxRetries; i++) { @@ -1615,41 +1566,40 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], Container = containerId is null - ? new BetaContainerParams + ? new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], } - : new BetaContainerParams + : new ContainerParams { ID = containerId, Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = messages, - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - response = await client.Beta.Messages.Create(parameters); + response = await client.Messages.Create(parameters); containerId = response.Container!.ID; - if (response.StopReason != BetaStopReason.PauseTurn) + if (response.StopReason != StopReason.PauseTurn) { break; } @@ -1658,27 +1608,26 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s var assistantContent = JsonSerializer.SerializeToElement( response.Content.Select(block => block.Json).ToArray() ); - messages.Add(new() { Role = Role.Assistant, Content = new BetaMessageParamContent(assistantContent) }); + messages.Add(new() { Role = Role.Assistant, Content = new MessageParamContent(assistantContent) }); } ``` ```go Go client := anthropic.NewClient() - messages := []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate and process a large sample dataset")), + messages := []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Generate and process a large sample dataset")), } maxRetries := 10 - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, @@ -1686,8 +1635,8 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s }, }, Messages: messages, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -1695,22 +1644,21 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s } for i := 0; i < maxRetries; i++ { - if response.StopReason != anthropic.BetaStopReasonPauseTurn { + if response.StopReason != anthropic.StopReasonPauseTurn { break } messages = append(messages, response.ToParam()) - response, err = client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err = client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ ID: anthropic.String(response.Container.ID), // Reuse container - Skills: []anthropic.BetaSkillParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, @@ -1718,8 +1666,8 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s }, }, Messages: messages, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -1731,70 +1679,67 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s ``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; - import com.anthropic.models.beta.messages.BetaStopReason; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; + import com.anthropic.models.messages.StopReason; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - List messages = new ArrayList<>(); + List messages = new ArrayList<>(); messages.add( - BetaMessageParam.builder() - .role(BetaMessageParam.Role.USER) + MessageParam.builder() + .role(MessageParam.Role.USER) .content("Generate and process a large sample dataset") .build() ); int maxRetries = 10; - BetaMessage response = client.beta().messages().create( + Message response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .messages(messages) - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build()); for (int i = 0; i < maxRetries; i++) { if (!response.stopReason().isPresent() - || !response.stopReason().get().equals(BetaStopReason.PAUSE_TURN)) { + || !response.stopReason().get().equals(StopReason.PAUSE_TURN)) { break; } messages.add(response.toParam()); - response = client.beta().messages().create( + response = client.messages().create( MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .id(response.container().get().id()) - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .messages(messages) - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build()); } } ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $client = new Client(); $messages = [ @@ -1854,10 +1799,9 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s ] max_retries = 10 - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -1876,10 +1820,9 @@ Skills may perform operations that require multiple turns. Handle `pause_turn` s messages << { role: "assistant", content: response.content } - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { id: response.container.id, skills: [ @@ -1910,7 +1853,6 @@ Combine multiple Skills in a single request to handle complex workflows: curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -1946,8 +1888,7 @@ Combine multiple Skills in a single request to handle complex workflows: ``` ```bash CLI - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <<'YAML' + ant messages create <<'YAML' model: claude-opus-5 max_tokens: 4096 container: @@ -1973,10 +1914,9 @@ Combine multiple Skills in a single request to handle complex workflows: ```python Python client = anthropic.Anthropic() - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ {"type": "anthropic", "skill_id": "xlsx", "version": "latest"}, @@ -1998,10 +1938,9 @@ Combine multiple Skills in a single request to handle complex workflows: ```typescript TypeScript const client = new Anthropic(); - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -2043,75 +1982,70 @@ Combine multiple Skills in a single request to handle complex workflows: { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "xlsx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Anthropic, + Type = SkillParamsType.Anthropic, SkillID = "pptx", Version = "latest", }, - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Analyze sales data and create a presentation" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var message = await client.Beta.Messages.Create(parameters); + var message = await client.Messages.Create(parameters); Console.WriteLine(message); ``` ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{ - "code-execution-2025-08-25", - anthropic.AnthropicBetaSkills2025_10_02, - }, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "xlsx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeAnthropic, + Type: anthropic.SkillParamsTypeAnthropic, SkillID: "pptx", Version: anthropic.String("latest"), }, { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Analyze sales data and create a presentation")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Analyze sales data and create a presentation")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) if err != nil { @@ -2121,9 +2055,9 @@ Combine multiple Skills in a single request to handle complex workflows: ``` ```java Java - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); @@ -2131,37 +2065,36 @@ Combine multiple Skills in a single request to handle complex workflows: MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() + .container(ContainerParams.builder() .skills(List.of( - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("xlsx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.ANTHROPIC) + SkillParams.builder() + .type(SkillParams.Type.ANTHROPIC) .skillId("pptx") .version("latest") .build(), - BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build() )) .build()) .addUserMessage("Analyze sales data and create a presentation") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. $client = new Client(); $message = $client->beta->messages->create( @@ -2201,10 +2134,9 @@ Combine multiple Skills in a single request to handle complex workflows: ```ruby Ruby client = Anthropic::Client.new - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -2258,19 +2190,31 @@ Files are identified by the filename you attach (the `;filename=` suffix in the curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@financial_skill/SKILL.md;filename=financial_skill/SKILL.md" \ -F "files[]=@financial_skill/analyze.py;filename=financial_skill/analyze.py" ``` - ```bash CLI - ant beta:skills create \ - --file example_skill.zip \ - --beta skills-2025-10-02 - - # Per-file upload requires path-qualified filenames, which the CLI - # can't currently set. Upload a zip archive instead. - ``` + + ```bash CLI + zip -r financial_skill.zip financial_skill/ + ant skills create --file financial_skill.zip + ``` + + + ```markdown + --- + name: financial-skill + description: Docs example skill. + --- + ``` + + + + ```python + print("financial analysis helper") + ``` + + ```python Python from anthropic.lib import files_from_dir @@ -2278,12 +2222,12 @@ Files are identified by the filename you attach (the `;filename=` suffix in the client = anthropic.Anthropic() # Option 1: Using a zip file - skill = client.beta.skills.create( + skill = client.skills.create( files=[open("example_skill.zip", "rb")], ) # Option 2: Using file tuples (filename, file_content, mime_type) - skill = client.beta.skills.create( + skill = client.skills.create( files=[ ( "financial_skill/SKILL.md", @@ -2299,12 +2243,12 @@ Files are identified by the filename you attach (the `;filename=` suffix in the ) # Option 3: Using the files_from_dir helper (Python only) - skill = client.beta.skills.create( + skill = client.skills.create( files=files_from_dir("financial_skill"), ) print(f"Created skill: {skill.id}") - print(f"Latest version: {skill.latest_version}") + print(f"Latest version: {skill.latest_version_id}") ``` ```typescript TypeScript @@ -2315,12 +2259,12 @@ Files are identified by the filename you attach (the `;filename=` suffix in the const client = new Anthropic(); // Option 1: Using a zip file - const skillFromZip = await client.beta.skills.create({ + const skillFromZip = await client.skills.create({ files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")] }); // Option 2: Using individual file objects - const skill = await client.beta.skills.create({ + const skill = await client.skills.create({ files: [ await toFile(fs.createReadStream("financial_skill/SKILL.md"), "financial_skill/SKILL.md", { type: "text/markdown" @@ -2334,7 +2278,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the }); console.log(`Created skill: ${skill.id}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Latest version: ${skill.latest_version_id}`); ``` ```csharp C# @@ -2349,7 +2293,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the Files = [File.OpenRead("example_skill.zip")], }; - var skill = await client.Beta.Skills.Create(parameters); + var skill = await client.Skills.Create(parameters); // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) var parameters2 = new SkillCreateParams @@ -2369,10 +2313,10 @@ Files are identified by the filename you attach (the `;filename=` suffix in the ], }; - var skill2 = await client.Beta.Skills.Create(parameters2); + var skill2 = await client.Skills.Create(parameters2); Console.WriteLine($"Created skill: {skill.ID}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); Console.WriteLine($"Created skill 2: {skill2.ID}"); ``` @@ -2386,7 +2330,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the } defer zipFile.Close() - skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{zipFile}, }) if err != nil { @@ -2406,7 +2350,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the } defer analyzePy.Close() - skill2, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill2, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{ anthropic.File(skillMd, "financial_skill/SKILL.md", "text/markdown"), anthropic.File(analyzePy, "financial_skill/analyze.py", "text/x-python"), @@ -2417,14 +2361,14 @@ Files are identified by the filename you attach (the `;filename=` suffix in the } fmt.Printf("Created skill: %s\n", skill.ID) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) fmt.Printf("Created skill 2: %s\n", skill2.ID) ``` ```java Java import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.skills.SkillCreateParams; - import com.anthropic.models.beta.skills.SkillCreateResponse; + import com.anthropic.models.skills.SkillCreateParams; + import com.anthropic.models.skills.Skill; // ... void main() throws Exception { // ... @@ -2439,7 +2383,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the .build()) .build(); - SkillCreateResponse skill = client.beta().skills().create(params); + Skill skill = client.skills().create(params); // Option 2: Using individual files (path-qualified filenames preserve the Skill's directory layout) SkillCreateParams params2 = SkillCreateParams.builder() @@ -2455,15 +2399,16 @@ Files are identified by the filename you attach (the `;filename=` suffix in the .build()) .build(); - SkillCreateResponse skill2 = client.beta().skills().create(params2); + Skill skill2 = client.skills().create(params2); System.out.println("Created skill: " + skill.id()); - System.out.println("Latest version: " + skill.latestVersion().orElseThrow()); + System.out.println("Latest version: " + skill.latestVersionId()); System.out.println("Created skill 2: " + skill2.id()); } ``` ```php PHP + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. use Anthropic\Core\FileParam; // ... @@ -2492,14 +2437,14 @@ Files are identified by the filename you attach (the `;filename=` suffix in the client = Anthropic::Client.new # Option 1: Using a zip file - skill = client.beta.skills.create( + skill = client.skills.create( files: [ File.open("example_skill.zip", "rb") ] ) # Option 2: Using individual files - skill = client.beta.skills.create( + skill = client.skills.create( files: [ Anthropic::FilePart.new( Pathname("financial_skill/SKILL.md"), @@ -2515,7 +2460,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the ) puts "Created skill: #{skill.id}" - puts "Latest version: #{skill.latest_version}" + puts "Latest version: #{skill.latest_version_id}" ``` @@ -2532,7 +2477,7 @@ Files are identified by the filename you attach (the `;filename=` suffix in the * `name`: Maximum 64 characters, lowercase letters/numbers/hyphens only, no XML tags, no reserved words ("anthropic", "claude") * `description`: Maximum 1024 characters, non-empty, no XML tags -For complete request/response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). +For complete request/response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/skills/create). ### Listing Skills @@ -2543,45 +2488,43 @@ Retrieve all Skills available to your workspace, including both Anthropic pre-bu # List all Skills curl "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" # List only custom Skills curl "https://api.anthropic.com/v1/skills?source=custom" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI # List all Skills - ant beta:skills list + ant skills list # List only custom Skills - ant beta:skills list --source custom + ant skills list --source custom ``` ```python Python client = anthropic.Anthropic() # List all Skills - for skill in client.beta.skills.list(): - print(f"{skill.id}: {skill.display_title} (source: {skill.source})") + for skill in client.skills.list(): + print(f"{skill.id}: {skill.display_name} (source: {skill.source.type})") # List only custom Skills - custom_skills = client.beta.skills.list(source="custom") + custom_skills = client.skills.list(source="custom") ``` ```typescript TypeScript const client = new Anthropic(); // List all Skills - for await (const skill of client.beta.skills.list()) { - console.log(`${skill.id}: ${skill.display_title} (source: ${skill.source})`); + for await (const skill of client.skills.list()) { + console.log(`${skill.id}: ${skill.display_name} (source: ${skill.source.type})`); } // List only custom Skills - const customSkills = await client.beta.skills.list({ + const customSkills = await client.skills.list({ source: "custom" }); ``` @@ -2590,37 +2533,37 @@ Retrieve all Skills available to your workspace, including both Anthropic pre-bu AnthropicClient client = new(); // List all Skills - await foreach (var skill in (await client.Beta.Skills.List()).Paginate()) + await foreach (var skill in (await client.Skills.List()).Paginate()) { - Console.WriteLine($"{skill.ID}: {skill.DisplayTitle} (source: {skill.Source})"); + Console.WriteLine($"{skill.ID}: {skill.DisplayName} (source: {skill.Source.Type})"); } // List only custom Skills - var customSkills = await client.Beta.Skills.List(new SkillListParams { Source = "custom" }); + var customSkills = await client.Skills.List(new SkillListParams { Source = "custom" }); ``` ```go Go client := anthropic.NewClient() // List all Skills - skills := client.Beta.Skills.ListAutoPaging(context.TODO(), anthropic.BetaSkillListParams{}) + skills := client.Skills.ListAutoPaging(context.TODO(), anthropic.SkillListParams{}) for skills.Next() { skill := skills.Current() - fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayTitle, skill.Source) + fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayName, skill.Source.Type) } if skills.Err() != nil { log.Fatal(skills.Err()) } // List only custom Skills - customSkills := client.Beta.Skills.ListAutoPaging(context.TODO(), anthropic.BetaSkillListParams{ + customSkills := client.Skills.ListAutoPaging(context.TODO(), anthropic.SkillListParams{ Source: anthropic.String("custom"), }) for customSkills.Next() { skill := customSkills.Current() - fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayTitle, skill.Source) + fmt.Printf("%s: %s (source: %s)\n", skill.ID, skill.DisplayName, skill.Source.Type) } if customSkills.Err() != nil { log.Fatal(customSkills.Err()) @@ -2628,18 +2571,18 @@ Retrieve all Skills available to your workspace, including both Anthropic pre-bu ``` ```java Java - import com.anthropic.models.beta.skills.SkillListParams; - import com.anthropic.models.beta.skills.SkillListPage; - import com.anthropic.models.beta.skills.SkillListResponse; + import com.anthropic.models.skills.SkillListParams; + import com.anthropic.models.skills.SkillListPage; + import com.anthropic.models.skills.Skill; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // List Skills (first page) - SkillListPage skills = client.beta().skills().list(); + SkillListPage skills = client.skills().list(); - for (SkillListResponse skill : skills.data()) { - System.out.println(skill.id() + ": " + skill.displayTitle().orElseThrow() + " (source: " + skill.source() + ")"); + for (Skill skill : skills.data()) { + System.out.println(skill.id() + ": " + skill.displayName() + " (source: " + skill.source().type() + ")"); } // List only custom Skills @@ -2647,11 +2590,12 @@ Retrieve all Skills available to your workspace, including both Anthropic pre-bu .source("custom") .build(); - SkillListPage customSkills = client.beta().skills().list(customParams); + SkillListPage customSkills = client.skills().list(customParams); } ``` ```php PHP + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. $client = new Client(); // List Skills (first page) @@ -2671,18 +2615,18 @@ Retrieve all Skills available to your workspace, including both Anthropic pre-bu client = Anthropic::Client.new # List all Skills - client.beta.skills.list.auto_paging_each do |skill| - puts "#{skill.id}: #{skill.display_title} (source: #{skill.source})" + client.skills.list.auto_paging_each do |skill| + puts "#{skill.id}: #{skill.display_name} (source: #{skill.source.type})" end # List only custom Skills - custom_skills = client.beta.skills.list( + custom_skills = client.skills.list( source: "custom" ) ``` -See the [List Skills API reference](https://platform.claude.com/docs/en/api/beta/skills/list) for pagination and filtering options. +See the [List Skills API reference](https://platform.claude.com/docs/en/api/skills/list) for pagination and filtering options. ### Retrieving a Skill @@ -2692,77 +2636,76 @@ Get details about a specific Skill: ```bash cURL curl "https://api.anthropic.com/v1/skills/skill_01AbCdEfGhIjKlMnOpQrStUv" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ - -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" + -H "anthropic-version: 2023-06-01" ``` ```bash CLI - ant beta:skills retrieve \ + ant skills retrieve \ --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv ``` ```python Python client = anthropic.Anthropic() - skill = client.beta.skills.retrieve(skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv") + skill = client.skills.retrieve(skill_id="skill_01AbCdEfGhIjKlMnOpQrStUv") - print(f"Skill: {skill.display_title}") - print(f"Latest version: {skill.latest_version}") + print(f"Skill: {skill.display_name}") + print(f"Latest version: {skill.latest_version_id}") print(f"Created: {skill.created_at}") ``` ```typescript TypeScript const client = new Anthropic(); - const skill = await client.beta.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + const skill = await client.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - console.log(`Skill: ${skill.display_title}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Skill: ${skill.display_name}`); + console.log(`Latest version: ${skill.latest_version_id}`); console.log(`Created: ${skill.created_at}`); ``` ```csharp C# AnthropicClient client = new(); - var skill = await client.Beta.Skills.Retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + var skill = await client.Skills.Retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - Console.WriteLine($"Skill: {skill.DisplayTitle}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Skill: {skill.DisplayName}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); Console.WriteLine($"Created: {skill.CreatedAt}"); ``` ```go Go client := anthropic.NewClient() - skill, err := client.Beta.Skills.Get( + skill, err := client.Skills.Get( context.TODO(), "skill_01AbCdEfGhIjKlMnOpQrStUv", - anthropic.BetaSkillGetParams{}, ) if err != nil { log.Fatal(err) } - fmt.Printf("Skill: %s\n", skill.DisplayTitle) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Skill: %s\n", skill.DisplayName) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) fmt.Printf("Created: %s\n", skill.CreatedAt) ``` ```java Java - import com.anthropic.models.beta.skills.SkillRetrieveResponse; + import com.anthropic.models.skills.Skill; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); - SkillRetrieveResponse skill = client.beta().skills().retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); + Skill skill = client.skills().retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv"); - System.out.println("Skill: " + skill.displayTitle().orElseThrow()); - System.out.println("Latest version: " + skill.latestVersion().orElseThrow()); + System.out.println("Skill: " + skill.displayName()); + System.out.println("Latest version: " + skill.latestVersionId()); System.out.println("Created: " + skill.createdAt()); } ``` ```php PHP + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. $client = new Client(); $skill = $client->beta->skills->retrieve( @@ -2777,17 +2720,17 @@ Get details about a specific Skill: ```ruby Ruby client = Anthropic::Client.new - skill = client.beta.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv") + skill = client.skills.retrieve("skill_01AbCdEfGhIjKlMnOpQrStUv") - puts "Skill: #{skill.display_title}" - puts "Latest version: #{skill.latest_version}" + puts "Skill: #{skill.display_name}" + puts "Latest version: #{skill.latest_version_id}" puts "Created: #{skill.created_at}" ``` ### Deleting a Skill -Deleting a Skill also removes all of its versions. The cascade is GA-only behavior, so unlike the other examples in this guide, these call the GA surface directly rather than the `beta` namespace. +Deleting a Skill also removes all of its versions. ```bash cURL @@ -2840,11 +2783,15 @@ Deleting a Skill also removes all of its versions. The cascade is GA-only behavi ``` ```php PHP + // The PHP SDK exposes the Skills API under the beta namespace; field names can differ from other SDKs. $client = new Client(); - $client->skills->delete( - skillID: 'skill_01AbCdEfGhIjKlMnOpQrStUv', - ); + // In the beta namespace, a Skill's versions must be deleted before the Skill itself. + $skillId = 'skill_01AbCdEfGhIjKlMnOpQrStUv'; + foreach ($client->beta->skills->versions->list($skillId)->pagingEachItem() as $version) { + $client->beta->skills->versions->delete($version->version, skillID: $skillId); + } + $client->beta->skills->delete($skillId); ``` ```ruby Ruby @@ -2878,17 +2825,15 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file NEW_VERSION=$(curl -X POST "https://api.anthropic.com/v1/skills/skill_01AbCdEfGhIjKlMnOpQrStUv/versions" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@financial_skill/SKILL.md;filename=financial_skill/SKILL.md" \ -F "files[]=@financial_skill/analyze.py;filename=financial_skill/analyze.py") - VERSION_NUMBER=$(echo "$NEW_VERSION" | jq -r '.version') + VERSION_ID=$(echo "$NEW_VERSION" | jq -r '.id') # Use specific version curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\", @@ -2897,7 +2842,7 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file \"skills\": [{ \"type\": \"custom\", \"skill_id\": \"skill_01AbCdEfGhIjKlMnOpQrStUv\", - \"version\": \"$VERSION_NUMBER\" + \"version\": \"$VERSION_ID\" }] }, \"messages\": [{\"role\": \"user\", \"content\": \"Use updated Skill\"}], @@ -2908,7 +2853,6 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -2927,22 +2871,21 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file ```bash CLI # Create a new version - VERSION_NUMBER=$(ant beta:skills:versions create \ + VERSION_ID=$(ant skills:versions create \ --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv \ --file financial_skill.zip \ - --transform version \ + --transform id \ --raw-output) # Use specific version - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <beta->messages with the skills beta. use Anthropic\Core\FileParam; // ... @@ -3352,7 +3284,7 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file client = Anthropic::Client.new # Create a new version - new_version = client.beta.skills.versions.create( + new_version = client.skills.versions.create( "skill_01AbCdEfGhIjKlMnOpQrStUv", files: [ Anthropic::FilePart.new( @@ -3369,15 +3301,14 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file ) # Use specific version - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", - version: new_version.version + version: new_version.id }] }, messages: [{ role: "user", content: "Use updated Skill" }], @@ -3386,10 +3317,9 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file puts response # Use latest version - latest_response = client.beta.messages.create( + latest_response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [{ type: "custom", @@ -3404,7 +3334,7 @@ A new version is a complete snapshot, not a delta: upload the Skill's full file ``` -See the [Create Skill Version API reference](https://platform.claude.com/docs/en/api/beta/skills/versions/create) for complete details. +See the [Create Skill Version API reference](https://platform.claude.com/docs/en/api/skills/versions/create) for complete details. *** @@ -3435,7 +3365,6 @@ Combine Excel and custom DCF analysis Skills: DCF_SKILL=$(curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@dcf_skill/SKILL.md;filename=dcf_skill/SKILL.md") DCF_SKILL_ID=$(echo "$DCF_SKILL" | jq -r '.id') @@ -3444,7 +3373,6 @@ Combine Excel and custom DCF analysis Skills: curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d "{ \"model\": \"claude-opus-5\", @@ -3476,14 +3404,13 @@ Combine Excel and custom DCF analysis Skills: ```bash CLI # Create custom DCF analysis Skill - DCF_SKILL_ID=$(ant beta:skills create \ + DCF_SKILL_ID=$(ant skills create \ --file dcf_skill.zip \ --transform id \ --raw-output) # Use with Excel to create financial model - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <beta->messages with the skills beta. $client = new Client(); // Custom DCF analysis Skill (ID obtained from Skills API create response) @@ -3733,7 +3652,7 @@ Combine Excel and custom DCF analysis Skills: client = Anthropic::Client.new # Create custom DCF analysis Skill - dcf_skill = client.beta.skills.create( + dcf_skill = client.skills.create( files: [ Anthropic::FilePart.new( Pathname("dcf_skill/SKILL.md"), @@ -3744,10 +3663,9 @@ Combine Excel and custom DCF analysis Skills: ) # Use with Excel to create financial model - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" }, @@ -3810,7 +3728,7 @@ Combine Skills when tasks involve multiple document types or domains: The SDK tabs in this section show the `container` value to include in a Messages request. The cURL and CLI tabs show the full request. -**For production:** pin a specific version, so Skill updates never change your deployed behavior. If you omit `version` or set it to `"latest"`, requests use the newest version of the Skill, so a version uploaded by anyone in the [workspace](https://platform.claude.com/docs/en/build-with-claude/skills-guide#workspace-scoped-access) immediately changes what your production agents run. The version ID comes from the create-version response in [Versioning](https://platform.claude.com/docs/en/build-with-claude/skills-guide#versioning) or from the [List Skill Versions API](https://platform.claude.com/docs/en/api/beta/skills/versions/list). The ID is always a string: quote epoch-timestamp IDs in JSON or YAML. +**For production:** pin a specific version, so Skill updates never change your deployed behavior. If you omit `version` or set it to `"latest"`, requests use the newest version of the Skill, so a version uploaded by anyone in the [workspace](https://platform.claude.com/docs/en/build-with-claude/skills-guide#workspace-scoped-access) immediately changes what your production agents run. The version ID comes from the create-version response in [Versioning](https://platform.claude.com/docs/en/build-with-claude/skills-guide#versioning) or from the [List Skill Versions API](https://platform.claude.com/docs/en/api/skills/versions/list). The ID is always a string, so quote it in JSON or YAML even when it looks numeric. ```bash cURL @@ -3818,7 +3736,6 @@ The SDK tabs in this section show the `container` value to include in a Messages curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: code-execution-2025-08-25,skills-2025-10-02" \ -H "content-type: application/json" \ -d '{ "model": "claude-opus-5", @@ -3827,7 +3744,7 @@ The SDK tabs in this section show the `container` value to include in a Messages "skills": [{ "type": "custom", "skill_id": "skill_01AbCdEfGhIjKlMnOpQrStUv", - "version": "1759178010641129" + "version": "skver_01AbCdEfGhIjKlMnOpQrStUv" }] }, "messages": [{"role": "user", "content": "Analyze the sales data"}], @@ -3837,15 +3754,14 @@ The SDK tabs in this section show the `container` value to include in a Messages ```bash CLI # Pin to specific versions for stability - ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 <beta->messages with the skills beta. $client = new Client(); // Skills render into the system prompt in a fixed, cache-friendly order @@ -4496,13 +4383,9 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud client = Anthropic::Client.new # Skills render into the system prompt in a fixed, cache-friendly order - response1 = client.beta.messages.create( + response1 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: [ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container: { skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }] }, @@ -4512,13 +4395,9 @@ If you use [Prompt caching](https://platform.claude.com/docs/en/build-with-claud puts response1 # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit - response2 = client.beta.messages.create( + response2 = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: [ - "code-execution-2025-08-25", - "skills-2025-10-02", - ], container: { skills: [ { type: "anthropic", skill_id: "xlsx", version: "latest" }, @@ -4547,8 +4426,7 @@ Handle Skill-related errors gracefully: ``` ```bash CLI - if ! RESULT=$(ant beta:messages create \ - --beta code-execution-2025-08-25,skills-2025-10-02 \ + if ! RESULT=$(ant messages create \ --transform-error error.message \ --format-error yaml 2>&1 <<'YAML' model: claude-opus-5 @@ -4583,10 +4461,9 @@ Handle Skill-related errors gracefully: client = anthropic.Anthropic() try: - response = client.beta.messages.create( + response = client.messages.create( model="claude-opus-5", max_tokens=4096, - betas=["code-execution-2025-08-25", "skills-2025-10-02"], container={ "skills": [ { @@ -4611,10 +4488,9 @@ Handle Skill-related errors gracefully: const client = new Anthropic(); try { - const response = await client.beta.messages.create({ + const response = await client.messages.create({ model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { type: "custom", skill_id: "skill_01AbCdEfGhIjKlMnOpQrStUv", version: "latest" } @@ -4645,24 +4521,23 @@ Handle Skill-related errors gracefully: { Model = "claude-opus-5", MaxTokens = 4096, - Betas = ["code-execution-2025-08-25", "skills-2025-10-02"], - Container = new BetaContainerParams + Container = new ContainerParams { Skills = [ - new BetaSkillParams + new SkillParams { - Type = BetaSkillParamsType.Custom, + Type = SkillParamsType.Custom, SkillID = "skill_01AbCdEfGhIjKlMnOpQrStUv", Version = "latest", }, ], }, Messages = [new() { Role = Role.User, Content = "Process data" }], - Tools = [new BetaCodeExecutionTool20250825()], + Tools = [new CodeExecutionTool20250825()], }; - var response = await client.Beta.Messages.Create(parameters); + var response = await client.Messages.Create(parameters); Console.WriteLine(response); } catch (AnthropicBadRequestException e) when (e.Message.Contains("skill")) @@ -4674,26 +4549,25 @@ Handle Skill-related errors gracefully: ```go Go client := anthropic.NewClient() - response, err := client.Beta.Messages.New(context.TODO(), anthropic.BetaMessageNewParams{ + response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ Model: "claude-opus-5", MaxTokens: 4096, - Betas: []anthropic.AnthropicBeta{"code-execution-2025-08-25", anthropic.AnthropicBetaSkills2025_10_02}, - Container: anthropic.BetaMessageNewParamsContainerUnion{ - OfContainers: &anthropic.BetaContainerParams{ - Skills: []anthropic.BetaSkillParams{ + Container: anthropic.MessageCreateParamsContainerUnion{ + OfContainers: &anthropic.ContainerParams{ + Skills: []anthropic.SkillParams{ { - Type: anthropic.BetaSkillParamsTypeCustom, + Type: anthropic.SkillParamsTypeCustom, SkillID: "skill_01AbCdEfGhIjKlMnOpQrStUv", Version: anthropic.String("latest"), }, }, }, }, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Process data")), + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage(anthropic.NewTextBlock("Process data")), }, - Tools: []anthropic.BetaToolUnionParam{ - {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}}, + Tools: []anthropic.ToolUnionParam{ + {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}}, }, }) @@ -4712,9 +4586,9 @@ Handle Skill-related errors gracefully: ```java Java import com.anthropic.errors.BadRequestException; - import com.anthropic.models.beta.messages.BetaContainerParams; - import com.anthropic.models.beta.messages.BetaSkillParams; - import com.anthropic.models.beta.messages.BetaCodeExecutionTool20250825; + import com.anthropic.models.messages.ContainerParams; + import com.anthropic.models.messages.SkillParams; + import com.anthropic.models.messages.CodeExecutionTool20250825; // ... void main() { AnthropicClient client = AnthropicOkHttpClient.fromEnv(); @@ -4723,20 +4597,18 @@ Handle Skill-related errors gracefully: MessageCreateParams params = MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(4096L) - .addBeta("code-execution-2025-08-25") - .addBeta("skills-2025-10-02") - .container(BetaContainerParams.builder() - .addSkill(BetaSkillParams.builder() - .type(BetaSkillParams.Type.CUSTOM) + .container(ContainerParams.builder() + .addSkill(SkillParams.builder() + .type(SkillParams.Type.CUSTOM) .skillId("skill_01AbCdEfGhIjKlMnOpQrStUv") .version("latest") .build()) .build()) .addUserMessage("Process data") - .addTool(BetaCodeExecutionTool20250825.builder().build()) + .addTool(CodeExecutionTool20250825.builder().build()) .build(); - BetaMessage response = client.beta().messages().create(params); + Message response = client.messages().create(params); System.out.println(response); } catch (BadRequestException e) { if (e.getMessage().contains("skill")) { @@ -4749,6 +4621,7 @@ Handle Skill-related errors gracefully: ``` ```php PHP + // The PHP SDK supports container skills only through $client->beta->messages with the skills beta. use Anthropic\Core\Exceptions\BadRequestException; $client = new Client(); @@ -4788,10 +4661,9 @@ Handle Skill-related errors gracefully: client = Anthropic::Client.new begin - response = client.beta.messages.create( + response = client.messages.create( model: "claude-opus-5", max_tokens: 4096, - betas: ["code-execution-2025-08-25", "skills-2025-10-02"], container: { skills: [ { @@ -4829,7 +4701,7 @@ If your organization has the [Compliance API](https://platform.claude.com/docs/e ## Next steps - + Complete API reference with all endpoints diff --git a/content/en/build-with-claude/vision-coordinates.md b/content/en/build-with-claude/vision-coordinates.md index d09c0f6b8c..ef4912bfd0 100644 --- a/content/en/build-with-claude/vision-coordinates.md +++ b/content/en/build-with-claude/vision-coordinates.md @@ -448,6 +448,8 @@ First check which resolution tier your model is on (see [Resolution and token co If you cannot pre-resize (for example, when the image comes from an upstream system you can't modify), use the resize helper from [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading) to recover the dimensions Claude saw, then map the coordinates Claude returns into normalized coordinates or back onto your original image. Claude resizes oversized images rather than rejecting them, up to the API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits). Beyond those limits the request fails with a validation error instead. Pass the tier limits that match the model you called: the wrong tier's limits recover the wrong resized dimensions and silently shift every coordinate. This approach requires knowing the pixel dimensions of the image you uploaded, so it does not apply to PDF uploads. +Screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets are an exception to automatic resizing. The API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of resizing it. Resize those images in your application before returning them, then scale the coordinates Claude returns back to your screen's dimensions. + ```bash cURL # This local coordinate conversion makes no API request, so there's nothing diff --git a/content/en/build-with-claude/vision.md b/content/en/build-with-claude/vision.md index efee46ac57..aea3080b5a 100644 --- a/content/en/build-with-claude/vision.md +++ b/content/en/build-with-claude/vision.md @@ -541,14 +541,12 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us FILE_ID=$(curl -sS -X POST https://api.anthropic.com/v1/files \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -F "file=@vision-example.jpg" | jq -r '.id') # Then use the returned file_id in your message curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: files-api-2025-04-14" \ -H "content-type: application/json" \ -d @- < { - Role = "user", - Content = new object[] - { - new - { - type = "image", - source = new { type = "file", file_id = fileUpload.Id } - }, - new { type = "text", text = "Describe this image." } - } - } + new ContentBlockParam(new ImageBlockParam( + new ImageBlockParamSource(new FileImageSource(fileUpload.ID)) + )), + new ContentBlockParam(new TextBlockParam("Describe this image.")), + }), } - }); + ] + }); Console.WriteLine(response); ``` @@ -720,26 +722,25 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us } defer file.Close() - fileUpload, err := client.Beta.Files.Upload(context.Background(), - anthropic.BetaFileUploadParams{ - File: file, + fileUpload, err := client.Files.Upload(context.Background(), + anthropic.FileUploadParams{ + File: anthropic.File(file, "vision-example.jpg", "image/jpeg"), }) if err != nil { log.Fatal(err) } // Use the uploaded file in a message - message, err := client.Beta.Messages.New(context.Background(), - anthropic.BetaMessageNewParams{ + message, err := client.Messages.New(context.Background(), + anthropic.MessageNewParams{ Model: anthropic.ModelClaudeOpus5, MaxTokens: 1024, - Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14}, - Messages: []anthropic.BetaMessageParam{ - anthropic.NewBetaUserMessage( - anthropic.NewBetaImageBlock(anthropic.BetaFileImageSourceParam{ + Messages: []anthropic.MessageParam{ + anthropic.NewUserMessage( + anthropic.NewImageBlock(anthropic.FileImageSourceParam{ FileID: fileUpload.ID, }), - anthropic.NewBetaTextBlock("Describe this image."), + anthropic.NewTextBlock("Describe this image."), ), }, }) @@ -751,20 +752,24 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us ``` ```java Java - import com.anthropic.models.beta.files.FileMetadata; - import com.anthropic.models.beta.files.FileUploadParams; + import com.anthropic.core.MultipartField; + import com.anthropic.models.files.FileMetadata; + import com.anthropic.models.files.FileUploadParams; // ... AnthropicClient client = AnthropicOkHttpClient.fromEnv(); // Upload the image file - FileMetadata file = client - .beta() - .files() - .upload( - FileUploadParams.builder() - .file(Files.newInputStream(Path.of("vision-example.jpg"))) - .build() - ); + FileMetadata file = client.files().upload( + FileUploadParams.builder() + .file( + MultipartField.builder() + .value(Files.newInputStream(Path.of("vision-example.jpg"))) + .filename("vision-example.jpg") + .contentType("image/jpeg") + .build() + ) + .build() + ); // Use the uploaded file in a message ImageBlockParam imageParam = ImageBlockParam.builder().fileSource(file.id()).build(); @@ -787,11 +792,13 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. + // The PHP SDK supports file_id document and image sources only through $client->beta->messages with the files beta. $client = new Client(); // Upload the image file $fileUpload = $client->beta->files->upload( - file: fopen('vision-example.jpg', 'r'), + FileParam::fromResource(fopen('vision-example.jpg', 'rb'), contentType: 'image/jpeg'), ); // Use the uploaded file in a message @@ -820,15 +827,17 @@ For images you'll use repeatedly or when you want to avoid encoding overhead, us client = Anthropic::Client.new # Upload the image file - file_upload = client.beta.files.upload( - file: File.open("vision-example.jpg", "rb") + file_upload = client.files.upload( + file: Anthropic::FilePart.new( + File.open("vision-example.jpg", "rb"), + content_type: "image/jpeg" + ) ) # Use the uploaded file in a message - message = client.beta.messages.create( + message = client.messages.create( model: "claude-opus-5", max_tokens: 1024, - betas: ["files-api-2025-04-14"], messages: [ { role: "user", @@ -1227,7 +1236,7 @@ The maximum number of images per message or request is: The maximum dimensions per image are 8000x8000 px. -If a single API request contains more than 20 images, a stricter per-image dimension limit applies. On Amazon Bedrock and Google Cloud, document blocks such as PDFs also count toward this threshold. Images exceeding the stricter limit are rejected with an `invalid_request_error` whose message references "many-image requests" and states the current limit in pixels. To stay under the limit on all platforms, either resize each image so that neither dimension exceeds 2000 px, or keep the request to 20 or fewer image and document blocks. +If a single API request contains more than 20 images, a stricter per-image dimension limit applies to every image in that request. All `image` blocks in the request count toward this threshold, including images from earlier conversation turns that you resend and images nested inside `tool_result` content (for example, screenshots returned to the computer use tool). On Amazon Bedrock and Google Cloud, document blocks such as PDFs also count toward this threshold. Images exceeding the stricter limit are rejected with an `invalid_request_error` whose message references "many-image requests" and states the current limit in pixels. To stay under the limit on all platforms, either resize each image so that neither dimension exceeds 2000 px, or keep the request to 20 or fewer image and document blocks. The maximum size per image is: @@ -1249,7 +1258,7 @@ Claude supports JPEG, PNG, GIF, and WebP images (`image/jpeg`, `image/png`, `ima Claude views images in patches instead of pixels. Each patch is a 28×28-pixel block of the image, referred to as a visual token. An image, therefore, costs `⌈width / 28⌉ × ⌈height / 28⌉` visual tokens. -Each model has a maximum native image resolution, expressed as a long-edge limit and a visual-token limit. Images larger than either limit are downscaled before processing; see [How Claude resizes and pads images](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images) for the exact rule. +Each model has a maximum native image resolution, expressed as a long-edge limit and a visual-token limit. Images larger than either limit are downscaled before processing; see [How Claude resizes and pads images](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images) for the exact rule. The exception is screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets: the API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of downscaling it, so resize those images in your application before returning them. | Resolution tier | Models | Max long edge | Max visual tokens | | --------------- | --------------------------- | ------------- | ----------------- | diff --git a/content/en/build-with-claude/working-with-messages.md b/content/en/build-with-claude/working-with-messages.md index a8c261d852..99899fa327 100644 --- a/content/en/build-with-claude/working-with-messages.md +++ b/content/en/build-with-claude/working-with-messages.md @@ -1046,6 +1046,10 @@ Claude can read both text and images in requests. You can supply images using th Control desktop computer environments with the Messages API. + + Let Claude navigate, read, and interact with webpages in a browser you run. + + Get guaranteed, schema-validated JSON output from Claude. diff --git a/content/en/cli-sdks-libraries/cli/quickstart.md b/content/en/cli-sdks-libraries/cli/quickstart.md index 2f37c2761a..51d5e64f97 100644 --- a/content/en/cli-sdks-libraries/cli/quickstart.md +++ b/content/en/cli-sdks-libraries/cli/quickstart.md @@ -29,7 +29,7 @@ Compared to `curl`, `ant` builds request bodies from typed flags or piped YAML i For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; @@ -43,7 +43,7 @@ Compared to `curl`, `ant` builds request bodies from typed flags or piped YAML i - You can also install the CLI from source using `go install`. Requires Go 1.22 or later. + You can also install the CLI from source using `go install`. Requires Go 1.25 or later. ```bash go install github.com/anthropics/anthropic-cli/cmd/ant@latest diff --git a/content/en/cli-sdks-libraries/cli/using.md b/content/en/cli-sdks-libraries/cli/using.md index 2673a27f5b..ed34229cb6 100644 --- a/content/en/cli-sdks-libraries/cli/using.md +++ b/content/en/cli-sdks-libraries/cli/using.md @@ -16,7 +16,7 @@ ant [:] [flags] Run `ant --help` for the full resource list, or append `--help` to any subcommand for its flags. -Resources in beta (including agents, sessions, deployments, environments, and skills) live under the `beta:` prefix. Commands in this namespace automatically send the appropriate `anthropic-beta` header for that resource, so you don't need to pass it yourself. Use `--beta
` only to override the default (for example, to opt into a different schema version). +Resources in beta (including agents, sessions, deployments, and environments) live under the `beta:` prefix. Commands in this namespace automatically send the appropriate `anthropic-beta` header for that resource, so you don't need to pass it yourself. Use `--beta
` only to override the default (for example, to opt into a different schema version). ```bash ant models list @@ -152,7 +152,7 @@ YAML Flags that take a file path, such as `--file` on the upload command, accept a bare path: ```bash -ant beta:files upload --file ./report.pdf +ant files upload --file ./report.pdf ``` To inline a file's contents into a string-valued field, prefix the path with `@`: diff --git a/content/en/cli-sdks-libraries/sdks/csharp.md b/content/en/cli-sdks-libraries/sdks/csharp.md index c6ccebd247..7d37b408ad 100644 --- a/content/en/cli-sdks-libraries/sdks/csharp.md +++ b/content/en/cli-sdks-libraries/sdks/csharp.md @@ -354,11 +354,11 @@ These methods return `HttpResponse`: ```csharp using System; -using Anthropic.Models.Beta.Files; +using Anthropic.Models.Files; FileDownloadParams parameters = new() { FileID = "file_id" }; -var response = await client.Beta.Files.Download(parameters); +var response = await client.Files.Download(parameters); Console.WriteLine(response); ``` @@ -368,7 +368,7 @@ To save the response content to a file, or any [`Stream`](https://learn.microsof ```csharp using System.IO; -using var response = await client.Beta.Files.Download(parameters); +using var response = await client.Files.Download(parameters); using var contentStream = await response.ReadAsStream(); using var fileStream = File.Open(path, FileMode.OpenOrCreate); await contentStream.CopyToAsync(fileStream); // Or any other Stream diff --git a/content/en/cli-sdks-libraries/sdks/go.md b/content/en/cli-sdks-libraries/sdks/go.md index 9e4e4b8425..75767b15c9 100644 --- a/content/en/cli-sdks-libraries/sdks/go.md +++ b/content/en/cli-sdks-libraries/sdks/go.md @@ -26,7 +26,7 @@ go get github.com/anthropics/anthropic-sdk-go ## Requirements -This library requires Go 1.23+. +This library requires Go 1.24+. ## Usage @@ -560,12 +560,12 @@ Request parameters that correspond to file uploads in multipart requests are typ ```go // A file from the file system file, err := os.Open("/path/to/file.json") -anthropic.BetaFileUploadParams{ +anthropic.FileUploadParams{ File: anthropic.File(file, "custom-name.json", "application/json"), } // A file from a string -anthropic.BetaFileUploadParams{ +anthropic.FileUploadParams{ File: anthropic.File(strings.NewReader("my file contents"), "custom-name.json", "application/json"), } ``` diff --git a/content/en/cli-sdks-libraries/sdks/java.md b/content/en/cli-sdks-libraries/sdks/java.md index 8028240525..fc6032f588 100644 --- a/content/en/cli-sdks-libraries/sdks/java.md +++ b/content/en/cli-sdks-libraries/sdks/java.md @@ -15,7 +15,7 @@ The Anthropic Java SDK provides convenient access to the Claude API from applica ```kotlin - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") ``` @@ -24,7 +24,7 @@ The Anthropic Java SDK provides convenient access to the Claude API from applica com.anthropic anthropic-java - 2.53.0 + 2.57.0 ``` @@ -466,8 +466,8 @@ The SDK defines methods that accept files through the `MultipartField` class: ```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file( @@ -478,15 +478,15 @@ FileUploadParams params = FileUploadParams.builder() ) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` Or from an `InputStream`: ```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file( @@ -498,15 +498,15 @@ FileUploadParams params = FileUploadParams.builder() ) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` Or from in-memory bytes: ```java import com.anthropic.core.MultipartField; -import com.anthropic.models.beta.files.FileMetadata; -import com.anthropic.models.beta.files.FileUploadParams; +import com.anthropic.models.files.FileMetadata; +import com.anthropic.models.files.FileUploadParams; FileUploadParams params = FileUploadParams.builder() .file( @@ -518,7 +518,7 @@ FileUploadParams params = FileUploadParams.builder() ) .build(); -FileMetadata fileMetadata = client.beta().files().upload(params); +FileMetadata fileMetadata = client.files().upload(params); ``` ### Binary responses @@ -528,7 +528,7 @@ The SDK defines methods that return binary responses for API responses that aren ```java import com.anthropic.core.http.HttpResponse; -HttpResponse response = client.beta().files().download("file_abc123"); +HttpResponse response = client.files().download("file_abc123"); ``` To save the response content to a file: @@ -536,7 +536,7 @@ To save the response content to a file: ```java import com.anthropic.core.http.HttpResponse; -try (HttpResponse response = client.beta().files().download(params)) { +try (HttpResponse response = client.files().download(params)) { Files.copy( response.body(), Paths.get(path), @@ -553,7 +553,7 @@ Or transfer the response content to any `OutputStream`: ```java import com.anthropic.core.http.HttpResponse; -try (HttpResponse response = client.beta().files().download(params)) { +try (HttpResponse response = client.files().download(params)) { response.body().transferTo(Files.newOutputStream(Paths.get(path))); } catch (Exception e) { IO.println("Something went wrong!"); @@ -1137,7 +1137,7 @@ export ANTHROPIC_LOG=debug ``` - The SDK depends on Jackson for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default. + The SDK depends on Jackson for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.19.4 by default. The SDK throws an exception if it detects an incompatible Jackson version at runtime (for example, if the default version was overridden in your Maven or Gradle config). @@ -1200,14 +1200,11 @@ Beta features are available before general release to get early feedback and tes You can access most beta API features through the `beta()` method on the client. To enable a particular beta feature, add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) with `.addBeta()` when building the message params. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```java import com.anthropic.models.beta.AnthropicBeta; -import com.anthropic.models.beta.messages.BetaContentBlockParam; import com.anthropic.models.beta.messages.BetaMessage; -import com.anthropic.models.beta.messages.BetaRequestDocumentBlock; -import com.anthropic.models.beta.messages.BetaTextBlockParam; import com.anthropic.models.beta.messages.MessageCreateParams; // ... void main() { @@ -1217,16 +1214,8 @@ void main() { MessageCreateParams.builder() .model(Model.CLAUDE_OPUS_5) .maxTokens(1024L) - .addBeta(AnthropicBeta.FILES_API_2025_04_14) - .addUserMessageOfBetaContentBlockParams(List.of( - BetaContentBlockParam.ofText( - BetaTextBlockParam.builder() - .text("Please summarize this document for me.") - .build()), - BetaContentBlockParam.ofDocument( - BetaRequestDocumentBlock.builder() - .fileSource("file_abc123") - .build()))) + .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27) + .addUserMessage("Hello, Claude") .build()); } ``` diff --git a/content/en/cli-sdks-libraries/sdks/python.md b/content/en/cli-sdks-libraries/sdks/python.md index 4417c87d53..734d07ff02 100644 --- a/content/en/cli-sdks-libraries/sdks/python.md +++ b/content/en/cli-sdks-libraries/sdks/python.md @@ -330,12 +330,12 @@ from anthropic import Anthropic client = Anthropic() # Upload using a file path -client.beta.files.upload( +client.files.upload( file=Path("/path/to/file"), ) # Upload using bytes -client.beta.files.upload( +client.files.upload( file=("file.txt", b"my bytes", "text/plain"), ) ``` @@ -713,7 +713,7 @@ Beta features are available before general release to get early feedback and tes You can access most beta API features through the `beta` property of the client. To enable a particular beta feature, you need to add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) to the `betas` field when creating a message. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```python client = Anthropic() @@ -721,22 +721,8 @@ client = Anthropic() response = client.beta.messages.create( model="claude-opus-5", max_tokens=1024, - messages=[ - { - "role": "user", - "content": [ - {"type": "text", "text": "Please summarize this document for me."}, - { - "type": "document", - "source": { - "type": "file", - "file_id": "file_abc123", - }, - }, - ], - }, - ], - betas=["files-api-2025-04-14"], + messages=[{"role": "user", "content": "Hello, Claude"}], + betas=["context-management-2025-06-27"], ) ``` diff --git a/content/en/cli-sdks-libraries/sdks/ruby.md b/content/en/cli-sdks-libraries/sdks/ruby.md index 76c1bcc419..5546351059 100644 --- a/content/en/cli-sdks-libraries/sdks/ruby.md +++ b/content/en/cli-sdks-libraries/sdks/ruby.md @@ -237,14 +237,14 @@ anthropic = Anthropic::Client.new require "pathname" # Use `Pathname` to send the filename and/or avoid paging a large file into memory: -file_metadata = anthropic.beta.files.upload(file: Pathname("/path/to/file")) +file_metadata = anthropic.files.upload(file: Pathname("/path/to/file")) # Alternatively, pass file contents or a `StringIO` directly: -file_metadata = anthropic.beta.files.upload(file: File.read("/path/to/file")) +file_metadata = anthropic.files.upload(file: File.read("/path/to/file")) # Or, to control the filename and/or content type: file = Anthropic::FilePart.new(File.read("/path/to/file"), filename: "/path/to/file", content_type: "...") -file_metadata = anthropic.beta.files.upload(file: file) +file_metadata = anthropic.files.upload(file: file) puts(file_metadata.id) ``` diff --git a/content/en/cli-sdks-libraries/sdks/typescript.md b/content/en/cli-sdks-libraries/sdks/typescript.md index 35736ddf49..5ddd73a16c 100644 --- a/content/en/cli-sdks-libraries/sdks/typescript.md +++ b/content/en/cli-sdks-libraries/sdks/typescript.md @@ -270,7 +270,7 @@ await anthropic.beta.messages.create({ // Upload MCP resources as files const fileResource = await mcpClient.readResource({ uri: "file:///path/to/data.json" }); -await anthropic.beta.files.upload({ file: mcpResourceToFile(fileResource) }); +await anthropic.files.upload({ file: mcpResourceToFile(fileResource) }); ``` ### MCP error handling @@ -339,26 +339,26 @@ import Anthropic, { toFile } from "@anthropic-ai/sdk"; const client = new Anthropic(); // If you have access to Node `fs`, use `fs.createReadStream()`: -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(fs.createReadStream("/path/to/file"), undefined, { type: "application/json" }) }); // Or if you have the web `File` API you can pass a `File` instance: -await client.beta.files.upload({ +await client.files.upload({ file: new File(["my bytes"], "file.txt", { type: "text/plain" }) }); // You can also pass a `fetch` `Response`: -await client.beta.files.upload({ +await client.files.upload({ file: await fetch("https://somesite/file") }); // Or a `Buffer` / `Uint8Array` -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(Buffer.from("my bytes"), "file", { type: "text/plain" }) }); -await client.beta.files.upload({ +await client.files.upload({ file: await toFile(new Uint8Array([0, 1, 2]), "file", { type: "text/plain" }) }); ``` @@ -730,29 +730,15 @@ Beta features are available before general release to get early feedback and tes You can access most beta API features through the beta property of the client. To enable a particular beta feature, you need to add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) to the `betas` field when creating a message. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```typescript const client = new Anthropic(); const response = await client.beta.messages.create({ model: "claude-opus-5", max_tokens: 1024, - messages: [ - { - role: "user", - content: [ - { type: "text", text: "Please summarize this document for me." }, - { - type: "document", - source: { - type: "file", - file_id: "file_abc123" - } - } - ] - } - ], - betas: ["files-api-2025-04-14"] + messages: [{ role: "user", content: "Hello, Claude" }], + betas: ["context-management-2025-06-27"] }); ``` diff --git a/content/en/docs/claude-code/accessibility.md b/content/en/docs/claude-code/accessibility.md index 0299d2fab0..4a96b1f138 100644 --- a/content/en/docs/claude-code/accessibility.md +++ b/content/en/docs/claude-code/accessibility.md @@ -8,7 +8,7 @@ Claude Code has a screen reader mode that replaces its visual terminal interface with plain, linear text. Instead of boxes, progress animations, and in-place redraws, Claude Code prints labeled lines that a screen reader such as VoiceOver or NVDA reads in order. You can hold a full conversation, approve tool permissions, and review output end to end. -Screen reader mode is opt-in. If you use a screen magnifier, reduced motion, or a colorblind-friendly theme instead of a screen reader, set `CLAUDE_CODE_ACCESSIBILITY`, `prefersReducedMotion`, or `theme` from the [Accessibility settings](#accessibility-settings) table. +Screen reader mode is opt-in. If you use a screen magnifier, reduced motion, or a colorblind-friendly theme instead of a screen reader, set `CLAUDE_CODE_ACCESSIBILITY`, `prefersReducedMotion`, or `theme` from the [Accessibility settings](#accessibility-settings) table. Screen reader mode adapts the terminal interface only, so you don't need it in the VS Code extension's chat panel. On Claude Code v2.1.236 or later, the extension [announces conversation activity to your screen reader](/docs/en/vs-code#use-a-screen-reader) there without any setting. Screen reader mode requires Claude Code v2.1.181 or later. Earlier versions reject the `--ax-screen-reader` flag with `error: unknown option '--ax-screen-reader'`. diff --git a/content/en/docs/claude-code/admin-setup.md b/content/en/docs/claude-code/admin-setup.md index 5d0ba5935a..ff6725a5e4 100644 --- a/content/en/docs/claude-code/admin-setup.md +++ b/content/en/docs/claude-code/admin-setup.md @@ -47,7 +47,7 @@ Managed settings define organization policy. Claude Code checks the four sources * Claude Code honors a small set of [cross-source lock keys](/docs/en/settings#precedence-within-the-managed-tier), such as the sandbox allowlist locks, when any admin-controlled source sets them. * Claude Code [merges the `env` block per key across the admin-controlled sources](/docs/en/server-managed-settings#per-key-exceptions-across-managed-sources), apart from the telemetry-unit and credential-paired routing exceptions covered there. Only admin-controlled sources contribute to the merge, developer-writable settings can't, and [`CLAUDE_CODE_DISABLE_ADMIN_ENV_UNION=1`](/docs/en/env-vars) restores the winner-only composition. Requires Claude Code v2.1.223 or later. -When a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured, its output is the only managed configuration Claude Code reads: the lock-key checks read it alone, and no per-key `env` merge happens. +When an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output is the only managed configuration Claude Code reads: the lock-key checks read it alone, and no per-key `env` merge happens. | Mechanism | Delivery | Priority | Platforms | | :---------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------- | :------------- | diff --git a/content/en/docs/claude-code/agent-sdk/custom-tools.md b/content/en/docs/claude-code/agent-sdk/custom-tools.md index 97fcfcb132..eb294db87d 100644 --- a/content/en/docs/claude-code/agent-sdk/custom-tools.md +++ b/content/en/docs/claude-code/agent-sdk/custom-tools.md @@ -845,10 +845,3 @@ From here: * If your server grows to dozens of tools, see [tool search](/docs/en/agent-sdk/tool-search) to defer loading them until Claude needs them. * To connect to external MCP servers (filesystem, GitHub, Slack) instead of building your own, see [Connect MCP servers](/docs/en/agent-sdk/mcp). * To control which tools run automatically versus requiring approval, see [Configure permissions](/docs/en/agent-sdk/permissions). - -## Related documentation - -* [TypeScript SDK Reference](/docs/en/agent-sdk/typescript) -* [Python SDK Reference](/docs/en/agent-sdk/python) -* [MCP Documentation](https://modelcontextprotocol.io) -* [SDK Overview](/docs/en/agent-sdk/overview) diff --git a/content/en/docs/claude-code/agent-sdk/file-checkpointing.md b/content/en/docs/claude-code/agent-sdk/file-checkpointing.md index 2323dae8dd..bb50d34bf0 100644 --- a/content/en/docs/claude-code/agent-sdk/file-checkpointing.md +++ b/content/en/docs/claude-code/agent-sdk/file-checkpointing.md @@ -26,12 +26,6 @@ When you enable file checkpointing, the SDK creates backups of files before modi File rewinding restores files on disk to a previous state. It does not rewind the conversation itself. The conversation history and context remain intact after calling `rewindFiles()` (TypeScript) or `rewind_files()` (Python). -The checkpoint system tracks: - -* Files created during the session -* Files modified during the session -* The original content of modified files - When you rewind to a checkpoint, Claude Code deletes the files it created and restores the files it modified to their content at that point. Claude Code skips a tracked path that is a symlink, hard link, or other non-regular file. It also skips a tracked file whose parent directory no longer resolves to its checkpoint-time location, or whose backup it can't read safely. [`RewindFilesResult`](/docs/en/agent-sdk/typescript#rewindfilesresult) counts every skipped path in its `skippedLinks` field. Skipping requires Claude Code v2.1.216 or later; before v2.1.216, a rewind wrote and deleted through links at tracked paths. ## Implement checkpointing diff --git a/content/en/docs/claude-code/agent-sdk/hooks.md b/content/en/docs/claude-code/agent-sdk/hooks.md index 01931750dd..7d350ab085 100644 --- a/content/en/docs/claude-code/agent-sdk/hooks.md +++ b/content/en/docs/claude-code/agent-sdk/hooks.md @@ -219,19 +219,13 @@ Use matchers to filter when your callbacks fire. The `matcher` field matches aga SDK matchers follow the same rules as [matchers in settings files](/docs/en/hooks#matcher-patterns). That section documents the exact-string and regular-expression evaluation paths, their version requirements, and the matcher values for each event type. -| Option | Type | Default | Description | -| --------- | ---------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `matcher` | `string` | `undefined` | Pattern matched against the event's filter field, following the [rules for matchers in settings files](/docs/en/hooks#matcher-patterns). For tool hooks, this is the tool name. Built-in tools include `Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `WebFetch`, `Agent`, and others (see [Tool Input Types](/docs/en/agent-sdk/typescript#tool-input-types) for the full list). MCP tools use the pattern `mcp____`. | -| `hooks` | `HookCallback[]` | - | Required. Array of callback functions to execute when the pattern matches | -| `timeout` | `number` | `undefined` | Timeout in seconds. When omitted, Claude Code applies the [event's default timeout](#hook-timeout). Your SDK callbacks follow the `command` hook defaults | +| Option | Type | Default | Description | +| --------- | ---------------- | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `matcher` | `string` | `undefined` | Pattern matched against the event's filter field, following the [rules for matchers in settings files](/docs/en/hooks#matcher-patterns). For tool hooks, this is the tool name. Built-in tools include `Bash`, `Read`, `Write`, `Edit`, `Glob`, `Grep`, `WebFetch`, `Agent`, and others (see [Tool Input Types](/docs/en/agent-sdk/typescript#tool-input-types) for the full list). MCP tools use the pattern `mcp____`, where `` is the key you use in the `mcpServers` configuration. | +| `hooks` | `HookCallback[]` | - | Required. Array of callback functions to execute when the pattern matches | +| `timeout` | `number` | `undefined` | Timeout in seconds. When omitted, Claude Code applies the [event's default timeout](#hook-timeout). Your SDK callbacks follow the `command` hook defaults | -Use the `matcher` pattern to target specific tools whenever possible. A matcher with `'Bash'` only runs for Bash commands, while omitting the pattern runs your callbacks for every occurrence of the event. - - - **Discovering tool names:** See [Tool Input Types](/docs/en/agent-sdk/typescript#tool-input-types) for the full list of built-in tool names, or add a hook without a matcher to log all tool calls your session makes. - - **MCP tool naming:** MCP tools always start with `mcp__` followed by the server name and action: `mcp____`. For example, if you configure a server named `playwright`, its tools are named `mcp__playwright__browser_screenshot`, `mcp__playwright__browser_click`, and so on. The server name comes from the key you use in the `mcpServers` configuration. - +Use the `matcher` pattern to target specific tools whenever possible. A matcher with `'Bash'` only runs for Bash commands, while omitting the pattern runs your callbacks for every occurrence of the event. Omit it on purpose to log every tool call your session makes. ### Callback functions diff --git a/content/en/docs/claude-code/agent-sdk/mcp.md b/content/en/docs/claude-code/agent-sdk/mcp.md index dad699ade6..4c6f837f73 100644 --- a/content/en/docs/claude-code/agent-sdk/mcp.md +++ b/content/en/docs/claude-code/agent-sdk/mcp.md @@ -304,59 +304,39 @@ Local processes that communicate via stdin/stdout. Use this for MCP servers you ### HTTP/SSE servers -Use HTTP or SSE for cloud-hosted MCP servers and remote APIs: +Use HTTP or SSE for cloud-hosted MCP servers and remote APIs. For the `.mcp.json` form, use the same fields as the example at [HTTP headers for remote servers](#http-headers-for-remote-servers), with `"type": "sse"` for an SSE server. In code, pass the server's URL: - - - - ```typescript TypeScript hidelines={1,-1} theme={null} - const _ = { - options: { - mcpServers: { - "remote-api": { - type: "sse", - url: "https://api.example.com/mcp/sse", - headers: { - Authorization: `Bearer ${process.env.API_TOKEN}` - } - } - }, - allowedTools: ["mcp__remote-api__*"] - } - }; - ``` - - ```python Python theme={null} - options = ClaudeAgentOptions( - mcp_servers={ - "remote-api": { - "type": "sse", - "url": "https://api.example.com/mcp/sse", - "headers": {"Authorization": f"Bearer {os.environ['API_TOKEN']}"}, - } - }, - allowed_tools=["mcp__remote-api__*"], - ) - ``` - - - - - ```json theme={null} - { - "mcpServers": { + + ```typescript TypeScript hidelines={1,-1} theme={null} + const _ = { + options: { + mcpServers: { "remote-api": { - "type": "sse", - "url": "https://api.example.com/mcp/sse", - "headers": { - "Authorization": "Bearer ${API_TOKEN}" + type: "sse", + url: "https://api.example.com/mcp/sse", + headers: { + Authorization: `Bearer ${process.env.API_TOKEN}` } } - } + }, + allowedTools: ["mcp__remote-api__*"] } - ``` - - + }; + ``` + + ```python Python theme={null} + options = ClaudeAgentOptions( + mcp_servers={ + "remote-api": { + "type": "sse", + "url": "https://api.example.com/mcp/sse", + "headers": {"Authorization": f"Bearer {os.environ['API_TOKEN']}"}, + } + }, + allowed_tools=["mcp__remote-api__*"], + ) + ``` + For the streamable HTTP transport, use `"type": "http"` instead. In `.mcp.json` and other JSON config files, `"streamable-http"` is accepted as an alias for `"http"`. The programmatic `mcpServers` option accepts only `"http"`. @@ -874,13 +854,12 @@ MCP server connections time out after 30 seconds by default. Claude Code applies ### Tool output exceeds maximum allowed tokens -The SDK applies the same MCP output limit as Claude Code. When a tool result is larger than 25,000 tokens, the full output is saved to a file and the tool result is replaced with an error message that names the file path, so the agent can read the output back in portions. Raise the limit with the [`MAX_MCP_OUTPUT_TOKENS`](/docs/en/env-vars) environment variable. See [MCP output limits and warnings](/docs/en/mcp#mcp-output-limits-and-warnings) for the full behavior, including how a server can declare a higher per-tool limit. +The SDK applies the same MCP output limit as Claude Code. When a tool result is larger than 25,000 tokens, the full output is saved to a file and the tool result is replaced with an error message that names the file path, so the agent can read the output back in portions. Raise the limit with the [`MAX_MCP_OUTPUT_TOKENS`](/docs/en/env-vars) environment variable. See [MCP output limits and warnings](/docs/en/mcp#mcp-output-limits-and-warnings) for the full behavior, including how a server can declare a higher per-tool limit with the `anthropic/maxResultSizeChars` annotation. ## Related resources * **[Custom tools guide](/docs/en/agent-sdk/custom-tools)**: Build your own MCP server that runs in-process with your SDK application * **[Permissions](/docs/en/agent-sdk/permissions)**: Control which MCP tools your agent can use with `allowedTools` and `disallowedTools` -* **[MCP output limits and warnings](/docs/en/mcp#mcp-output-limits-and-warnings)**: How the SDK handles tool results that exceed `MAX_MCP_OUTPUT_TOKENS`, including the persist-to-disk fallback and the `anthropic/maxResultSizeChars` per-tool annotation * **[TypeScript SDK reference](/docs/en/agent-sdk/typescript)**: Full API reference including MCP configuration options * **[Python SDK reference](/docs/en/agent-sdk/python)**: Full API reference including MCP configuration options * **[MCP server directory](https://github.com/modelcontextprotocol/servers)**: Browse available MCP servers for databases, APIs, and more diff --git a/content/en/docs/claude-code/agent-sdk/python.md b/content/en/docs/claude-code/agent-sdk/python.md index 56b5afda6c..efaddf2969 100644 --- a/content/en/docs/claude-code/agent-sdk/python.md +++ b/content/en/docs/claude-code/agent-sdk/python.md @@ -2859,7 +2859,7 @@ When Monitor runs a command, it follows the same permission rules as Bash; a Web On other models, Claude Code provides the Task tools by default and `TodoWrite` only when you set `CLAUDE_CODE_ENABLE_TASKS=0`. - See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in and [Migrate to Task tools](/docs/en/agent-sdk/todo-tracking#migrate-to-task-tools) to update your monitoring code. + See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in. **Input:** diff --git a/content/en/docs/claude-code/agent-sdk/subagents.md b/content/en/docs/claude-code/agent-sdk/subagents.md index c121df19b1..eafcfcc4d5 100644 --- a/content/en/docs/claude-code/agent-sdk/subagents.md +++ b/content/en/docs/claude-code/agent-sdk/subagents.md @@ -23,29 +23,12 @@ This guide focuses on the programmatic approach, which is recommended for SDK ap ## Benefits of using subagents -### Context isolation +Because subagents are separate agent instances, delegating work to them gives you four benefits: -Each subagent runs in its own fresh conversation. Intermediate tool calls and results stay inside the subagent; only its final message returns to the parent. See [What subagents inherit](#what-subagents-inherit) for exactly what's in the subagent's context. - -**Example:** a `research-assistant` subagent can explore dozens of files without any of that content accumulating in the main conversation. The parent receives a concise summary, not every file the subagent read. - -### Parallelization - -Multiple subagents can run concurrently, so independent subtasks finish in the time of the slowest one rather than the sum of all of them. - -**Example:** during a code review, you can run `style-checker`, `security-scanner`, and `test-coverage` subagents simultaneously instead of sequentially. - -### Specialized instructions and knowledge - -Each subagent can have tailored system prompts with specific expertise, best practices, and constraints. - -**Example:** a `database-migration` subagent can have detailed knowledge about SQL best practices, rollback strategies, and data integrity checks that would be unnecessary noise in the main agent's instructions. - -### Tool restrictions - -Subagents can be limited to specific tools, reducing the risk of unintended actions. - -**Example:** a `doc-reviewer` subagent might only have access to Read and Grep tools, ensuring it can analyze but never accidentally modify your documentation files. +* **Context isolation**: each subagent runs in its own conversation, which starts fresh unless the subagent is a [fork](/docs/en/sub-agents#fork-the-current-conversation). Either way, intermediate tool calls and results stay inside the subagent; only its final message returns to the parent. A `research-assistant` subagent can explore dozens of files without any of that content accumulating in the main conversation. The parent receives a concise summary, not every file the subagent read. See [What subagents inherit](#what-subagents-inherit) for exactly what's in the subagent's context. +* **Parallelization**: multiple subagents can run concurrently, so independent subtasks finish in the time of the slowest one rather than the sum of all of them. During a code review, you can run `style-checker`, `security-scanner`, and `test-coverage` subagents simultaneously instead of sequentially. +* **Specialized instructions and knowledge**: each subagent can have a tailored system prompt with specific expertise, best practices, and constraints. A `database-migration` subagent can have detailed knowledge about SQL best practices, rollback strategies, and data integrity checks that would be unnecessary noise in the main agent's instructions. +* **Tool restrictions**: subagents can be limited to specific tools, reducing the risk of unintended actions. A `doc-reviewer` subagent might only have access to Read and Grep tools, ensuring it can analyze but never accidentally modify your documentation files. ## Create subagents @@ -198,10 +181,12 @@ You can also define subagents as markdown files in `.claude/agents/` directories ## What subagents inherit -A subagent's context window starts fresh, with no parent conversation, but isn't empty. The only content you pass from parent to subagent is the Agent tool's prompt string, so include any file paths, error messages, or decisions the subagent needs directly in that prompt. +Unless the subagent is a [fork](/docs/en/sub-agents#fork-the-current-conversation), its context window starts fresh, with no parent conversation, but isn't empty. The only content you pass from parent to subagent is the Agent tool's prompt string, so include any file paths, error messages, or decisions the subagent needs directly in that prompt. A subagent that has the [`SendMessage`](/docs/en/tools-reference) tool starts with a list of the other named agents running in the session, so it knows which names it can send messages to. Claude Code adds the list to the subagent's first turn automatically. A [fork](/docs/en/sub-agents#fork-the-current-conversation) doesn't get the list because it inherits the parent conversation instead. The list requires Claude Code v2.1.206 or later. +The table below lists what a non-fork subagent's context contains and what it leaves out. + | The subagent receives | The subagent doesn't receive | | :------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------- | | Its own system prompt (`AgentDefinition.prompt`) and the Agent tool's prompt | The parent's conversation history or tool results | diff --git a/content/en/docs/claude-code/agent-sdk/todo-tracking.md b/content/en/docs/claude-code/agent-sdk/todo-tracking.md index 951bf13b5c..c4316188df 100644 --- a/content/en/docs/claude-code/agent-sdk/todo-tracking.md +++ b/content/en/docs/claude-code/agent-sdk/todo-tracking.md @@ -2,11 +2,15 @@ > Fetch the complete documentation index at: https://code.claude.com/docs/llms.txt > Use this file to discover all available pages before exploring further. -# Todo Lists +# Track todos -> Track and display todos using the Claude Agent SDK for organized task management +> Track todos in Agent SDK sessions and render Claude's progress in your application from structured tool calls -The Claude Agent SDK includes built-in todo functionality that helps organize complex workflows and keep users informed about task progression. +On the models listed under [Model availability](#model-availability), Claude tracks multi-step work without a written todo list, and Claude Code leaves the [task-tracking tools](/docs/en/tools-reference#task-tool-availability) out of sessions by default. You don't need anything on this page for Claude to work through multi-step tasks on those models. + +In a session that has the task-tracking tools, Claude keeps a written todo list, updating each item's status as it works. You see each change in the message stream as a structured tool call. Opt a session in only when your application reads those tool calls, whether to log task activity or to render its own progress display. + +## Model availability On TypeScript Agent SDK 0.3.233 and later, or Python Agent SDK 0.2.139 and later, the following tools aren't available on Opus 4.8, Sonnet 5, Fable 5, Mythos 5, or later versions of those families unless you opt in: @@ -20,15 +24,13 @@ The Claude Agent SDK includes built-in todo functionality that helps organize co On other models, Claude Code provides the Task tools by default and `TodoWrite` only when you set `CLAUDE_CODE_ENABLE_TASKS=0`. -### Model availability - -On the [models that don't get the task-tracking tools](/docs/en/tools-reference#task-tool-availability), you see no `tool_use` blocks for them in the message stream unless you opt in. If you point `cli_path` in Python or `pathToClaudeCodeExecutable` in TypeScript at your own Claude Code install, you get whichever tools that install provides. To get the same tools as on other models, do one of the following: +On the listed models, unless you opt a session in, you see no `tool_use` blocks for the tools in the message stream. The Agent SDK applies these defaults through the Claude Code binary that it bundles. If you point `pathToClaudeCodeExecutable` (TypeScript) or `cli_path` (Python) at your own Claude Code install, you get whichever tools that install provides, under its own defaults. To see the exact set in a running session, [check which tools are available](/docs/en/tools-reference#check-which-tools-are-available). To opt a session in, do one of the following: -* Name one of the tools in the [`allowedTools`](/docs/en/agent-sdk/permissions#allow-and-deny-rules) option, `allowed_tools` in Python +* Name one of the tools in the [`allowedTools`](/docs/en/agent-sdk/permissions#allow-and-deny-rules) (TypeScript) or `allowed_tools` (Python) option * List the tools in the `tools` option, which restricts the session's built-in tools to the ones it names. Include the tools you want alongside the other built-in tools you use * Set `CLAUDE_CODE_ENABLE_TODO_TOOLS=1` in the `env` option, as the examples on this page do. In TypeScript, `env` replaces the subprocess environment, so spread `...process.env` to keep inherited variables. In Python, `env` is merged on top of the inherited environment -### Todo Lifecycle +## Todo lifecycle Claude moves each todo through a predictable lifecycle: @@ -37,28 +39,34 @@ Claude moves each todo through a predictable lifecycle: 3. **Completed**: Claude marks it completed when the task finishes successfully 4. **Removed**: Claude deletes a todo it no longer needs by setting `status: "deleted"` in a `TaskUpdate` call -### When Todos Are Used +## When Claude creates todos In a [session that has the task-tracking tools](#model-availability), Claude creates todos for most multi-step work, such as: -* **Complex multi-step tasks** requiring 3 or more distinct actions +* **Complex multi-step tasks** requiring three or more distinct actions * **User-provided task lists** when multiple items are mentioned -* **Non-trivial operations** that benefit from progress tracking +* **Longer operations** that benefit from progress tracking * **Explicit requests** when users ask for todo organization -It may skip todos for very short or single-step requests. +Claude may skip todos for very short or single-step requests. ## Examples -Before running these examples, install the Claude Agent SDK by following the [quickstart](/docs/en/agent-sdk/quickstart). +Before running these examples, install the Claude Agent SDK by following the [quickstart](/docs/en/agent-sdk/quickstart). Every example on this page shares the same permission setup and exit behavior: -Each example runs until the agent finishes and yields its final result message. If a session reaches its turn limit first, that result message has the `error_max_turns` subtype. Check `subtype` to detect that ending. +* **Permission mode**: the example prompts ask Claude to do real work on a project, so each example sets `permissionMode: "acceptEdits"` (TypeScript) or `permission_mode="acceptEdits"` (Python) to auto-approve the file edits that work produces. See [Permission modes](/docs/en/agent-sdk/permissions#permission-modes) for the alternatives. +* **Turn limit**: each example runs until the agent finishes and yields its final result message. If a session reaches its turn limit first, that result message has the `error_max_turns` subtype. Check `subtype` to detect that ending. +* **Error handling**: these examples use single-shot `query()` calls. After yielding an `error_max_turns` result, `query()` raises an error that includes `Reached maximum number of turns`. Each example wraps its loop in a try block to exit cleanly when that happens. See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the result subtypes. -These examples use single-shot `query()` calls. After yielding an `error_max_turns` result, `query()` raises an error that includes `Reached maximum number of turns`. Each example wraps its loop in a try block to exit cleanly when that happens. + + The task system messages, [`SDKTaskNotificationMessage`](/docs/en/agent-sdk/typescript#sdktasknotificationmessage) (TypeScript) or [`TaskNotificationMessage`](/docs/en/agent-sdk/python#tasknotificationmessage) (Python) among them, report background tasks such as backgrounded commands and subagents. In the message stream, you see todo activity as `tool_use` blocks in the assistant messages. + -See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the result subtypes. +### Monitor todo changes -### Monitoring Todo Changes +The following example watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks and prints a `+` line with each new task's subject and an update line with each status change's task ID and new status. Use this shape when you want a log of task activity rather than a rendered display. The `+` lines don't include the assigned IDs, so this log can't match updates back to their creates. To keep that correlation, capture the IDs as [Display progress in real time](#display-progress-in-real-time) does. + +The streamed `tool_use` input is the raw shape the model emitted. Claude Code repairs some close-but-incorrect key names before execution, mapping `id` or `task_id` to `taskId` and `active_form` to `activeForm`, but that repair is not reflected in the stream. Read `TaskUpdate` input fields defensively, as both examples on this page do, rather than assuming the canonical name is always present. ```typescript TypeScript theme={null} @@ -67,30 +75,29 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the try { for await (const message of query({ prompt: "Optimize my React app performance and track progress with todos", - // Re-enable TodoWrite, which this example monitors. Without it, the SDK uses - // Task tools instead and these tool_use blocks never appear. ENABLE_TODO_TOOLS - // keeps the tools on models where Claude Code otherwise doesn't provide them. - options: { maxTurns: 15, env: { ...process.env, CLAUDE_CODE_ENABLE_TASKS: "0", CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" } } + // Keeps the Task tools on models where Claude Code otherwise doesn't provide them. + options: { maxTurns: 15, permissionMode: "acceptEdits", env: { ...process.env, CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" } }, })) { - // Todo updates are reflected in the message stream - if (message.type === "assistant") { - for (const block of message.message.content) { - if (block.type === "tool_use" && block.name === "TodoWrite") { - const todos = block.input.todos; - - console.log("Todo Status Update:"); - todos.forEach((todo, index) => { - const status = - todo.status === "completed" ? "✅" : todo.status === "in_progress" ? "🔧" : "❌"; - console.log(`${index + 1}. ${status} ${todo.content}`); - }); - } + if (message.type !== "assistant") continue; + for (const block of message.message.content) { + if (block.type !== "tool_use") continue; + if (block.name === "TaskCreate") { + const input = block.input as { subject: string }; + console.log(`+ ${input.subject}`); + } else if (block.name === "TaskUpdate") { + const input = block.input as { + taskId?: string; + id?: string; + task_id?: string; + status?: string; + }; + const taskId = input.taskId ?? input.id ?? input.task_id; + if (taskId && input.status) console.log(` ${taskId} -> ${input.status}`); } } } } catch (error) { - // A single-shot query() throws after yielding an error result, - // such as when the maxTurns limit is hit. + // A single-shot query() throws after yielding an error result. console.log(`Session ended with an error: ${error}`); } ``` @@ -100,35 +107,30 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ToolUseBlock - async def main(): try: async for message in query( prompt="Optimize my React app performance and track progress with todos", - # Re-enable TodoWrite, which this example monitors. Without it, the SDK uses - # Task tools instead and these tool_use blocks never appear. ENABLE_TODO_TOOLS - # keeps the tools on models where Claude Code otherwise doesn't provide them. - options=ClaudeAgentOptions(max_turns=15, env={"CLAUDE_CODE_ENABLE_TASKS": "0", "CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"}), + # Keeps the Task tools on models where Claude Code otherwise doesn't provide them. + options=ClaudeAgentOptions(max_turns=15, permission_mode="acceptEdits", env={"CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"}), ): - # Todo updates are reflected in the message stream - if isinstance(message, AssistantMessage): - for block in message.content: - if isinstance(block, ToolUseBlock) and block.name == "TodoWrite": - todos = block.input["todos"] - - print("Todo Status Update:") - for i, todo in enumerate(todos): - status = ( - "✅" - if todo["status"] == "completed" - else "🔧" - if todo["status"] == "in_progress" - else "❌" - ) - print(f"{i + 1}. {status} {todo['content']}") + if not isinstance(message, AssistantMessage): + continue + for block in message.content: + if not isinstance(block, ToolUseBlock): + continue + if block.name == "TaskCreate": + print(f"+ {block.input.get('subject', '')}") + elif block.name == "TaskUpdate" and block.input.get("status"): + task_id = ( + block.input.get("taskId") + or block.input.get("id") + or block.input.get("task_id") + ) + if task_id: + print(f" {task_id} -> {block.input['status']}") except Exception as error: - # A single-shot query() raises after yielding an error result, - # such as when the max_turns limit is hit. + # A single-shot query() raises after yielding an error result. print(f"Session ended with an error: {error}") @@ -136,46 +138,103 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the ``` -### Real-time Progress Display +### Display progress in real time + +The following example watches the assistant stream for `TaskCreate` and `TaskUpdate` `tool_use` blocks and keeps a map of tasks keyed by task ID in a `TaskTracker` class, rerendering a progress summary on every change. The summary counts completed and in-progress tasks and shows each active item's `activeForm` label in place of its `subject`. Use this shape when your application maintains a progress display instead of logging each event. + +The assigned task ID isn't in the `TaskCreate` input. Claude Code delivers each tool's structured output on the user message that carries its `tool_result` block, in the `tool_use_result` field. For `TaskCreate`, that object is documented for TypeScript as `TaskCreateOutput` under [Tool Output Types](/docs/en/agent-sdk/typescript#tool-output-types), and in Python the field is a plain dict of the same shape. The tracker pairs each `tool_result` block with its `tool_use` call by `tool_use_id` and reads `task.id` from the paired message's `tool_use_result`. Claude can read the list back with `TaskList` and one task's full details with `TaskGet`. ```typescript TypeScript theme={null} import { query } from "@anthropic-ai/claude-agent-sdk"; - class TodoTracker { - private todos: any[] = []; + type Task = { subject: string; activeForm?: string; status: string }; + + class TaskTracker { + private tasks = new Map(); + private pendingCreates = new Map(); displayProgress() { - if (this.todos.length === 0) return; + if (this.tasks.size === 0) { + console.log("\nProgress: no open tasks\n"); + return; + } - const completed = this.todos.filter((t) => t.status === "completed").length; - const inProgress = this.todos.filter((t) => t.status === "in_progress").length; - const total = this.todos.length; + const items = [...this.tasks.values()]; + const completed = items.filter((t) => t.status === "completed").length; + const inProgress = items.filter((t) => t.status === "in_progress").length; - console.log(`\nProgress: ${completed}/${total} completed`); + console.log(`\nProgress: ${completed}/${this.tasks.size} completed`); console.log(`Currently working on: ${inProgress} task(s)\n`); - this.todos.forEach((todo, index) => { + for (const [id, task] of this.tasks) { const icon = - todo.status === "completed" ? "✅" : todo.status === "in_progress" ? "🔧" : "❌"; - const text = todo.status === "in_progress" ? todo.activeForm : todo.content; - console.log(`${index + 1}. ${icon} ${text}`); - }); + task.status === "completed" ? "✅" : task.status === "in_progress" ? "🔧" : "❌"; + const text = task.status === "in_progress" && task.activeForm ? task.activeForm : task.subject; + console.log(`${id}. ${icon} ${text}`); + } + } + + handleToolUse(block: { id: string; name: string; input: unknown }) { + if (block.name === "TaskCreate") { + const input = block.input as { subject: string; activeForm?: string; active_form?: string }; + this.pendingCreates.set(block.id, { + subject: input.subject, + activeForm: input.activeForm ?? input.active_form, + }); + } else if (block.name === "TaskUpdate") { + const input = block.input as { + taskId?: string; + id?: string; + task_id?: string; + status?: string; + activeForm?: string; + active_form?: string; + }; + const taskId = input.taskId ?? input.id ?? input.task_id; + if (!taskId) return; + if (input.status === "deleted") { + this.tasks.delete(taskId); + this.displayProgress(); + return; + } + const task = this.tasks.get(taskId); + if (!task) return; + if (input.status) task.status = input.status; + const active = input.activeForm ?? input.active_form; + if (active) task.activeForm = active; + this.displayProgress(); + } + } + + handleToolResult(block: { tool_use_id: string; is_error?: boolean }, result: unknown) { + const create = this.pendingCreates.get(block.tool_use_id); + if (!create) return; + this.pendingCreates.delete(block.tool_use_id); + if (block.is_error) return; + // The result's user message carries the tool's structured output as + // tool_use_result; for TaskCreate that's TaskCreateOutput, + // { task: { id, subject } }. + const out = result as { task?: { id: string } }; + if (!out?.task?.id) return; + this.tasks.set(out.task.id, { ...create, status: "pending" }); + this.displayProgress(); } async trackQuery(prompt: string) { try { for await (const message of query({ prompt, - // On every model, re-enable TodoWrite, which this tracker watches for. - options: { maxTurns: 20, env: { ...process.env, CLAUDE_CODE_ENABLE_TASKS: "0", CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" } } + options: { maxTurns: 20, permissionMode: "acceptEdits", env: { ...process.env, CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" } }, })) { if (message.type === "assistant") { for (const block of message.message.content) { - if (block.type === "tool_use" && block.name === "TodoWrite") { - this.todos = block.input.todos; - this.displayProgress(); - } + if (block.type === "tool_use") this.handleToolUse(block); + } + } + if (message.type === "user" && Array.isArray(message.message.content)) { + for (const block of message.message.content) { + if (block.type === "tool_result") this.handleToolResult(block, message.tool_use_result); } } } @@ -188,59 +247,112 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the } // Usage - const tracker = new TodoTracker(); + const tracker = new TaskTracker(); await tracker.trackQuery("Build a complete authentication system with todos"); ``` ```python Python theme={null} import asyncio - from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ToolUseBlock - from typing import List, Dict + from claude_agent_sdk import ( + query, + ClaudeAgentOptions, + AssistantMessage, + UserMessage, + ToolUseBlock, + ToolResultBlock, + ) - class TodoTracker: + class TaskTracker: def __init__(self): - self.todos: List[Dict] = [] + self.tasks: dict[str, dict] = {} + self.pending_creates: dict[str, dict] = {} def display_progress(self): - if not self.todos: + if not self.tasks: + print("\nProgress: no open tasks\n") return - completed = len([t for t in self.todos if t["status"] == "completed"]) - in_progress = len([t for t in self.todos if t["status"] == "in_progress"]) - total = len(self.todos) + completed = len([t for t in self.tasks.values() if t["status"] == "completed"]) + in_progress = len([t for t in self.tasks.values() if t["status"] == "in_progress"]) - print(f"\nProgress: {completed}/{total} completed") + print(f"\nProgress: {completed}/{len(self.tasks)} completed") print(f"Currently working on: {in_progress} task(s)\n") - for i, todo in enumerate(self.todos): + for task_id, task in self.tasks.items(): icon = ( "✅" - if todo["status"] == "completed" + if task["status"] == "completed" else "🔧" - if todo["status"] == "in_progress" + if task["status"] == "in_progress" else "❌" ) text = ( - todo["activeForm"] - if todo["status"] == "in_progress" - else todo["content"] + task["activeForm"] + if task["status"] == "in_progress" and task.get("activeForm") + else task["subject"] ) - print(f"{i + 1}. {icon} {text}") + print(f"{task_id}. {icon} {text}") + + def handle_tool_use(self, block: ToolUseBlock): + if block.name == "TaskCreate": + self.pending_creates[block.id] = { + "subject": block.input.get("subject", ""), + "activeForm": block.input.get("activeForm") or block.input.get("active_form"), + } + elif block.name == "TaskUpdate": + task_id = ( + block.input.get("taskId") + or block.input.get("id") + or block.input.get("task_id") + ) + if not task_id: + return + if block.input.get("status") == "deleted": + self.tasks.pop(task_id, None) + self.display_progress() + return + task = self.tasks.get(task_id) + if not task: + return + if block.input.get("status"): + task["status"] = block.input["status"] + active = block.input.get("activeForm") or block.input.get("active_form") + if active: + task["activeForm"] = active + self.display_progress() + + def handle_tool_result(self, block: ToolResultBlock, tool_use_result): + create = self.pending_creates.pop(block.tool_use_id, None) + if create is None or block.is_error: + return + # The result's user message carries the tool's structured output as + # tool_use_result; for TaskCreate that's {"task": {"id": ..., "subject": ...}}. + task = (tool_use_result or {}).get("task") or {} + if not task.get("id"): + return + self.tasks[task["id"]] = {**create, "status": "pending"} + self.display_progress() async def track_query(self, prompt: str): try: async for message in query( prompt=prompt, - # On every model, re-enable TodoWrite, which this tracker watches for. - options=ClaudeAgentOptions(max_turns=20, env={"CLAUDE_CODE_ENABLE_TASKS": "0", "CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"}), + options=ClaudeAgentOptions( + max_turns=20, + permission_mode="acceptEdits", + env={"CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"}, + ), ): if isinstance(message, AssistantMessage): for block in message.content: - if isinstance(block, ToolUseBlock) and block.name == "TodoWrite": - self.todos = block.input["todos"] - self.display_progress() + if isinstance(block, ToolUseBlock): + self.handle_tool_use(block) + if isinstance(message, UserMessage) and isinstance(message.content, list): + for block in message.content: + if isinstance(block, ToolResultBlock): + self.handle_tool_result(block, message.tool_use_result) except Exception as error: # A single-shot query() raises after yielding an error result, # such as when the max_turns limit is hit. @@ -249,7 +361,7 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the # Usage async def main(): - tracker = TodoTracker() + tracker = TaskTracker() await tracker.track_query("Build a complete authentication system with todos") @@ -257,96 +369,9 @@ See [Handle the result](/docs/en/agent-sdk/agent-loop#handle-the-result) for the ``` -## Migrate to Task tools - -The Task tools split the single `TodoWrite` call into `TaskCreate` for each new item and `TaskUpdate` for each status change, with `TaskList` and `TaskGet` available for the model to read back the current list. Your monitoring code still inspects `tool_use` blocks in the assistant stream, but maintains a map keyed by task ID instead of replacing the whole list on every call. - -| With `TodoWrite` | With Task tools | -| --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| One tool call rewrites the full `todos` array | `TaskCreate` adds one item, `TaskUpdate` patches one item by `taskId` | -| Match `block.name === "TodoWrite"` | Match `block.name === "TaskCreate"` or `"TaskUpdate"` | -| Item shape: `{ content, status, activeForm }` | `TaskCreate` input: `{ subject, description, activeForm?, metadata? }`. `TaskUpdate` input: `{ taskId, status?, subject?, description?, activeForm?, addBlocks?, addBlockedBy?, owner?, metadata? }`. `status` is `"pending"`, `"in_progress"`, or `"completed"`; set `status: "deleted"` to delete | -| Render `block.input.todos` directly | Accumulate items across calls, or read a snapshot from a `TaskList` tool result | - -The assigned task ID is not in the `TaskCreate` input. It comes back in the matching `tool_result` as `{ task: { id, subject } }`, so capture it from the result block to key your map. - -The following example shows the minimal change to the [Monitoring Todo Changes](#monitoring-todo-changes) loop. It leaves `CLAUDE_CODE_ENABLE_TASKS` unset, because the Task tools are the default, and sets only `CLAUDE_CODE_ENABLE_TODO_TOOLS=1`, the [opt-in](#model-availability) for the models that otherwise don't get the tools. It reads only `tool_use` inputs and skips capturing IDs from `tool_result` blocks. To render a complete list, watch for a `TaskList` tool result in the stream or accumulate `TaskCreate` results and `TaskUpdate` inputs into a map. - -The streamed `tool_use` input is the raw shape the model emitted. Claude Code repairs some close-but-incorrect key names before execution, mapping `id` or `task_id` to `taskId` and `active_form` to `activeForm`, but that repair is not reflected in the stream. Read `TaskUpdate` input fields defensively, as the samples below do, rather than assuming the canonical name is always present. - - - ```typescript TypeScript theme={null} - import { query } from "@anthropic-ai/claude-agent-sdk"; - - try { - for await (const message of query({ - prompt: "Optimize my React app performance and track progress with todos", - // Keeps the Task tools on models where Claude Code otherwise doesn't provide them. - options: { maxTurns: 15, env: { ...process.env, CLAUDE_CODE_ENABLE_TODO_TOOLS: "1" } }, - })) { - if (message.type !== "assistant") continue; - for (const block of message.message.content) { - if (block.type !== "tool_use") continue; - if (block.name === "TaskCreate") { - const input = block.input as { subject: string }; - console.log(`+ ${input.subject}`); - } else if (block.name === "TaskUpdate") { - const input = block.input as { - taskId?: string; - id?: string; - task_id?: string; - status?: string; - }; - const taskId = input.taskId ?? input.id ?? input.task_id; - if (taskId && input.status) console.log(` ${taskId} -> ${input.status}`); - } - } - } - } catch (error) { - // A single-shot query() throws after yielding an error result. - console.log(`Session ended with an error: ${error}`); - } - ``` - - ```python Python theme={null} - import asyncio - - from claude_agent_sdk import query, ClaudeAgentOptions, AssistantMessage, ToolUseBlock - - async def main(): - try: - async for message in query( - prompt="Optimize my React app performance and track progress with todos", - # Keeps the Task tools on models where Claude Code otherwise doesn't provide them. - options=ClaudeAgentOptions(max_turns=15, env={"CLAUDE_CODE_ENABLE_TODO_TOOLS": "1"}), - ): - if not isinstance(message, AssistantMessage): - continue - for block in message.content: - if not isinstance(block, ToolUseBlock): - continue - if block.name == "TaskCreate": - print(f"+ {block.input['subject']}") - elif block.name == "TaskUpdate" and block.input.get("status"): - task_id = ( - block.input.get("taskId") - or block.input.get("id") - or block.input.get("task_id") - ) - if task_id: - print(f" {task_id} -> {block.input['status']}") - except Exception as error: - # A single-shot query() raises after yielding an error result. - print(f"Session ended with an error: {error}") - - - asyncio.run(main()) - ``` - - -## Related Documentation +## Related documentation -* [TypeScript SDK Reference](/docs/en/agent-sdk/typescript) -* [Python SDK Reference](/docs/en/agent-sdk/python) -* [Streaming vs Single Mode](/docs/en/agent-sdk/streaming-vs-single-mode) -* [Custom Tools](/docs/en/agent-sdk/custom-tools) +* [Agent SDK reference - TypeScript](/docs/en/agent-sdk/typescript): the options, types, and tool schemas for the TypeScript SDK, including the Task tool input and output types +* [Agent SDK reference - Python](/docs/en/agent-sdk/python): the options, types, and tool documentation for the Python SDK +* [Streaming Input](/docs/en/agent-sdk/streaming-vs-single-mode): the two input modes, and when to use streaming input instead of the single-shot calls these examples use +* [Give Claude custom tools](/docs/en/agent-sdk/custom-tools): define your own tools with the SDK's in-process MCP server diff --git a/content/en/docs/claude-code/agent-sdk/typescript.md b/content/en/docs/claude-code/agent-sdk/typescript.md index d8e8b4973b..0d7a895ade 100644 --- a/content/en/docs/claude-code/agent-sdk/typescript.md +++ b/content/en/docs/claude-code/agent-sdk/typescript.md @@ -431,7 +431,7 @@ Configuration object for the `query()` function. | `includeHookEvents` | `boolean` | `false` | Include hook lifecycle events in the message stream as [`SDKHookStartedMessage`](#sdkhookstartedmessage), [`SDKHookProgressMessage`](#sdkhookprogressmessage), and [`SDKHookResponseMessage`](#sdkhookresponsemessage). Lifecycle events for `SessionStart` and `Setup` hooks are always included and don't need this option. Some hook events, such as `Notification`, `SessionEnd`, `PreCompact`, and `PostCompact`, never produce an `SDKHookStartedMessage`, even with this option. For those events, Claude Code still emits an `SDKHookProgressMessage` while a command hook that runs for more than a second produces output, and emits an `SDKHookResponseMessage` only when a hook [that runs in the background](/docs/en/hooks#run-hooks-in-the-background) finishes | | `includePartialMessages` | `boolean` | `false` | Include partial message events | | `loadTimeoutMs` | `number` | `60000` | *Alpha.* Timeout in milliseconds for each `sessionStore.load()` and `sessionStore.listSubkeys()` call during resume materialization. If the adapter doesn't settle within this window, the query fails instead of hanging. Ignored when `sessionStore` is not set | -| `managedSettings` | `Settings` | `undefined` | Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin's highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them while a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured. Merged values pass through a restrictive-only filter; [Restrict parent settings](/docs/en/claude-apps-gateway#restrict-parent-settings) covers what the filter admits and the `allowManaged*Only` locks | +| `managedSettings` | `Settings` | `undefined` | Policy-tier settings your host process supplies to the spawned session. On machines with admin-deployed managed settings, Claude Code ignores these unless the admin's highest-priority managed source sets `parentSettingsBehavior: 'merge'`, and never merges them when an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper). Merged values pass through a restrictive-only filter; [Restrict parent settings](/docs/en/claude-apps-gateway#restrict-parent-settings) covers what the filter admits and the `allowManaged*Only` locks | | `maxBudgetUsd` | `number` | `undefined` | Stop the query when the client-side cost estimate reaches this USD value. Compared against the same estimate as `total_cost_usd`; see [Track cost and usage](/docs/en/agent-sdk/cost-tracking) for accuracy caveats | | `maxThinkingTokens` | `number` | `undefined` | *Deprecated:* Use `thinking` instead. Maximum tokens for thinking process | | `maxTurns` | `number` | `undefined` | Maximum agentic turns (tool-use round trips) | @@ -446,7 +446,7 @@ Configuration object for the `query()` function. | `persistSession` | `boolean` | `true` | When `false`, disables session persistence to disk. Sessions cannot be resumed later | | `planModeInstructions` | `string` | `undefined` | Custom workflow instructions for plan mode. When `permissionMode` is `'plan'`, this string replaces the default plan-mode workflow body. The CLI still wraps it with the read-only enforcement preamble and the ExitPlanMode protocol footer | | `plugins` | [`SdkPluginConfig`](#sdkpluginconfig)`[]` | `[]` | Load custom plugins from local paths. See [Plugins](/docs/en/agent-sdk/plugins) for details | -| `promptSuggestions` | `boolean` | `false` | Enable prompt suggestions. Emits a `prompt_suggestion` message after each turn with a predicted next user prompt | +| `promptSuggestions` | `boolean` | `false` | Enable prompt suggestions. After a turn, Claude Code emits a `prompt_suggestion` message carrying a predicted next user prompt. Claude Code generates no suggestion for some turns, such as while your account is close to or at its usage limit. See [When Claude Code skips suggestions](/docs/en/interactive-mode#when-claude-code-skips-suggestions) | | `resume` | `string` | `undefined` | Session ID to resume | | `resumeDropsTurn` | `string` | `undefined` | With `resumeSessionAt`: the prompt UUID of the turn the truncating resume intends to discard. Claude Code refuses the resume when the discarded range contains anything not attributable to that turn, such as absorbed queued messages or task notifications, and names the `--resume-drops-turn` flag in the rejection message. Only the Agent SDK and print-mode resumes read the pair. Requires Claude Code v2.1.223 or later | | `resumeSessionAt` | `string` | `undefined` | Resume session at a specific message UUID | @@ -625,9 +625,19 @@ type SDKControlInitializeResponse = { account: AccountInfo; fast_mode_state?: "off" | "cooldown" | "on"; fast_mode_disabled_reason?: FastModeDisabledReason; + hooks_applied?: boolean; }; ``` +`hooks_applied` reports whether Claude Code registered the `hooks` that the `initialize` request carried. The SDK sends that request once when the session starts and again on each [`reinitialize()`](#query-object) call. The field requires Agent SDK v0.3.238 or later. + +Claude Code omits the field when the request carried no hooks. When the request carried hooks, the value depends on whether the request is the session's first initialize and, for a repeated one, on how it reached the session: + +* `true`: Claude Code registered the hooks. A session's first initialize returns this value. So does a repeated initialize sent over the CLI's stdin. In that case the hooks in the new request replace the hooks registered earlier. +* `false`: Claude Code ignored the hooks. A repeated initialize sent to a remote session returns this value, so a second client that joins a session can't replace the hooks the first client registered. + +Before Agent SDK v0.3.238, the response never carried the field, and Claude Code ignored `hooks` on every repeated initialize. + The response always reports `fast_mode_state`, and when something blocks [fast mode](/docs/en/fast-mode), `fast_mode_disabled_reason` carries the reason code alongside it, so you can explain the blocked state instead of re-deriving availability. Both behaviors require Claude Code v2.1.219 or later. Before v2.1.219, the response omitted `fast_mode_state` when fast mode wasn't available and never carried a reason. For the reason codes and their meanings, see [`fast_mode_disabled_reason`](#sdkresultmessage) on the result message. When a client sends `initialize` to a session that is already running, the control-response wrapper also carries an optional `pending_permission_requests` array. The field is on the response wrapper itself, not in the `SDKControlInitializeResponse` payload above. Each entry is a complete `control_request` message with the same `{ type: "control_request", request_id, request }` shape the session streams for permission requests while running. @@ -2630,7 +2640,7 @@ Creates and manages a structured task list for tracking progress. On other models, Claude Code provides the Task tools by default and `TodoWrite` only when you set `CLAUDE_CODE_ENABLE_TASKS=0`. - See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in and [Migrate to Task tools](/docs/en/agent-sdk/todo-tracking#migrate-to-task-tools) to update your monitoring code. + See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in. ### TaskCreate @@ -3562,7 +3572,7 @@ Returns the previous and updated task lists. On other models, Claude Code provides the Task tools by default and `TodoWrite` only when you set `CLAUDE_CODE_ENABLE_TASKS=0`. - See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in and [Migrate to Task tools](/docs/en/agent-sdk/todo-tracking#migrate-to-task-tools) to update your monitoring code. + See [Model availability](/docs/en/agent-sdk/todo-tracking#model-availability) to opt in. ### TaskCreate @@ -4603,7 +4613,7 @@ type SDKAuthStatusMessage = { ### `SDKTaskStartedMessage` -Emitted when a background task begins. The `task_type` field is `"local_bash"` for background Bash commands and [Monitor](#monitor) watches, `"local_agent"` for subagents, or `"remote_agent"`. +Emitted when a task begins. The `task_type` field is `"local_bash"` for Bash commands and [Monitor](#monitor) watches, `"local_agent"` for subagents, or `"remote_agent"`. ```typescript theme={null} type SDKTaskStartedMessage = { @@ -4613,11 +4623,20 @@ type SDKTaskStartedMessage = { tool_use_id?: string; description: string; task_type?: string; + is_backgrounded?: boolean; + spawn_depth?: number; uuid: UUID; session_id: string; }; ``` +`is_backgrounded` and `spawn_depth` describe how Claude Code started the task. Both fields require Agent SDK v0.3.238 or later. + +* `is_backgrounded`: Claude Code sets it on `"local_agent"` and `"local_bash"` tasks. `true` means the task runs in the background. `false` means the task runs in the foreground, and the tool call that started it stays blocked until the task finishes or moves to the background. +* `spawn_depth`: Claude Code sets it on `"local_agent"` tasks only. A subagent that the main thread spawned has depth `1`. A subagent that a depth `1` subagent spawned has depth `2`, and so on. + +A [resumed subagent](/docs/en/agent-sdk/subagents#resume-subagents) always reports `is_backgrounded: true`, because Claude Code runs every resumed subagent in the background. When a foreground task moves to the background later, Claude Code reports the new `is_backgrounded` value in a [`task_updated`](#sdktaskupdatedmessage) message rather than sending a second `task_started`. + ### `SDKTaskProgressMessage` Emitted periodically while a subagent or background task is running. The `summary` field is populated only when [`agentProgressSummaries`](#options) is enabled. @@ -4773,7 +4792,7 @@ type SDKCommandsChangedMessage = { ### `SDKPromptSuggestionMessage` -Emitted after each turn when `promptSuggestions` is enabled. Contains a predicted next user prompt. +Emitted after a turn when [`promptSuggestions`](#options) is enabled and Claude Code generated a suggestion for that turn. Contains the predicted next user prompt. For the turns that get none, see [When Claude Code skips suggestions](/docs/en/interactive-mode#when-claude-code-skips-suggestions). ```typescript theme={null} type SDKPromptSuggestionMessage = { diff --git a/content/en/docs/claude-code/amazon-bedrock.md b/content/en/docs/claude-code/amazon-bedrock.md index 61d8510e73..d42bea97fb 100644 --- a/content/en/docs/claude-code/amazon-bedrock.md +++ b/content/en/docs/claude-code/amazon-bedrock.md @@ -293,7 +293,7 @@ Claude Code uses these default models when no pinning variables are set: Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Amazon Bedrock, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every account or region. Two selections change which model carries them: -* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` counts as a selection too, because the built-in Sonnet model may not be enabled in an account that steers its own Opus. +* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](/docs/en/model-config#set-a-default-model-for-new-sessions), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in an account that steers its own Opus. * To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your account. @@ -350,7 +350,7 @@ If you have pinned a model version that is older than the current Claude Code de If you have not pinned a model and the current default is unavailable in your account, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in your Amazon Bedrock account or [pin a version](#4-pin-model-versions) to make the choice permanent. -When you start the session on a specific Sonnet or Opus version, with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](/docs/en/settings), that version acts as the session's pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. +When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](/docs/en/settings), that version acts as the session's pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don't act as pins, and neither does a model ID Claude Code doesn't recognize, such as an application inference profile ARN. diff --git a/content/en/docs/claude-code/artifacts.md b/content/en/docs/claude-code/artifacts.md index 224e7436d1..069940cbdd 100644 --- a/content/en/docs/claude-code/artifacts.md +++ b/content/en/docs/claude-code/artifacts.md @@ -73,7 +73,9 @@ Update https://claude.ai/code/artifact/5fbea6f3-... with today's numbers. ## Share an artifact -A new artifact is visible only to you. To share it, open the artifact in your browser and use the **Share** control in the page header. The header names you as the artifact's author, so anyone you share it with can see who published the page. It also links to your gallery at [claude.ai/code/artifacts](https://claude.ai/code/artifacts), which lists every artifact you have created. +A new artifact is visible only to you. To share it, open the artifact in your browser and use the **Share** control in the page header. The header also links to your gallery at [claude.ai/code/artifacts](https://claude.ai/code/artifacts), which lists every artifact you have created. + +Viewers in your organization can see who published the page: on an artifact shared within your organization, your name is in the title menu, and on a public artifact it's in the page header for signed-in viewers in your organization. A viewer who opens a public link without signing in, or from outside your organization, sees the label `Content is user-generated and unverified.` instead of your name. Who you can share with depends on your plan: @@ -86,6 +88,43 @@ People you share with are viewers by default: they see each version you publish An editor publishes new versions the same way you [update the artifact from another session](#update-an-artifact): they give Claude the artifact's URL in their own session, and Claude pulls the current content and republishes with their changes. Everyone with the page open sees each update live. +## Collect comments on an artifact + +When you share an artifact within your organization, the people you share it with can leave comments on the page, and you can have Claude read those comments and reply to them. You need Claude Code v2.1.221 or later and a Team or Enterprise plan, because only an artifact you [share within your organization](#share-an-artifact) takes comments. Claude reads the comments in two cases: + +* **You ask Claude to read them**: give Claude the artifact's URL and ask for the comments. Claude lists each thread and marks the comments a commenter sent to it. +* **A commenter sends a comment to Claude**: in a thread on the page, the commenter mentions `@claude` or uses the thread's Claude control, where the page offers one. Either gesture activates the thread, and Claude can reply only in a thread someone activated. Viewers see each reply attributed to Claude, via you. + +If you share an artifact publicly, viewers can't comment on it: the page says `Comments aren't available while this Artifact is shared publicly.` To switch an artifact that already has comment threads to a public link, delete the threads first. + +To ask for the comments yourself, give Claude the URL: + +```text wrap theme={null} +Read the comments on https://claude.ai/code/artifact/5fbea6f3-... and make the changes the commenters ask for. +``` + +If Claude tells you it can't read comments, check three things: + +* You're running Claude Code v2.1.221 or later. +* You're not in your first session since you installed Claude Code or upgraded from a version before v2.1.221. In that [first session after an install or upgrade](/docs/en/env-vars#first-session-after-an-install-or-upgrade), Claude can't read comments yet; start a new session and ask again. +* You haven't turned feature-flag fetching off. If you set `DISABLE_GROWTHBOOK`, `DISABLE_TELEMETRY`, or `DO_NOT_TRACK`, also set [`CLAUDE_CODE_ARTIFACT_COMMENTS=1`](/docs/en/env-vars#features-that-need-feature-flag-fetching) so Claude can read comments without fetching flags. + +### Let Claude reply to comments on its own + +After your session publishes an artifact, Claude Code watches that artifact for comments for as long as the session runs. When a commenter sends a comment to Claude, it reaches your session right away, and Claude can read the thread and reply without you asking. You need Claude Code v2.1.228 or later. If you turned feature-flag fetching off, also set both [`CLAUDE_CODE_ARTIFACT_COMMENTS=1` and `CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT=1`](/docs/en/env-vars#features-that-need-feature-flag-fetching). Your [permission mode](/docs/en/permission-modes) decides what Claude does when a sent comment arrives: + +* **Claude replies on its own**: when your permission mode lets Claude post the reply without asking you, Claude reads the thread and replies, and edits the artifact when the comment asks for a change. You see `Auto-replied to comment thread on Artifact: ` or `Auto-edited Artifact: in response to a comment thread`. +* **Claude waits for you**: outside plan mode, when posting the reply would need your approval, you see `Comments are waiting on Artifact: `. Claude then asks you for approval to read the thread, and again to post the reply. +* **Claude pauses in plan mode**: you see `Comments are waiting on Artifact: `, and Claude doesn't reply until you leave plan mode and ask it to read and reply. + +Claude also stops replying on its own to an artifact after it handles 60 sent comments or thread activations on that artifact within an hour. You see `Comments are waiting on Artifact: ` once, and Claude picks up again as that hour's comments age out. + +Run `/tasks` to see each artifact your session is watching, listed as a live-updates task. You can stop Claude from replying on its own in three ways, and each one lasts a different length of time: + +* **Press Ctrl+C once**: Claude stops replying on every artifact your session is watching, and starts again on an artifact when you have your session publish it again. +* **Stop the task in `/tasks`**: Claude stops replying on that artifact for the rest of the session. Publishing it again doesn't start replies again, and if you resume the session later, Claude still doesn't reply there. +* **Press `Ctrl+X Ctrl+K` twice within 3 seconds**: the chord that [stops every running background subagent](/docs/en/interactive-mode#general-controls) also stops Claude from replying on every artifact for the rest of the session. + ## Pull live data with MCP connectors An artifact can call [MCP connectors](/docs/en/mcp#use-mcp-servers-from-claude-ai) each time someone views it, so the page shows current data rather than a snapshot from the session that built it. Connector calls from artifacts are available on Pro, Max, Team, and Enterprise plans and require Claude Code v2.1.209 or later. On earlier versions, Claude publishes the page with whatever data the session gathered while building it. diff --git a/content/en/docs/claude-code/authentication.md b/content/en/docs/claude-code/authentication.md index 9265cafeac..484bce48c5 100644 --- a/content/en/docs/claude-code/authentication.md +++ b/content/en/docs/claude-code/authentication.md @@ -136,7 +136,7 @@ Deploy the keys through your device management tooling. [Server-managed settings The keys also decide whether a session that doesn't use a login credential can start. See [`forceLoginOrgUUID`](/docs/en/settings#available-settings) in the settings reference for the full behavior. -* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`**: blocked at startup, since organization membership can't be verified for an environment credential. Before v2.1.146, the pin applied only to the login flow and didn't block API-key credentials +* **`ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper`**: blocked at startup, since organization membership can't be verified for an environment credential * **Cloud provider sessions such as Amazon Bedrock**: not blocked, because they authenticate against your cloud provider. Restrict those through your cloud IAM policies * **[Anthropic profile or federation credentials](#anthropic-profiles-and-federation-credentials)**: not blocked, and the keys don't check which organization the profile belongs to diff --git a/content/en/docs/claude-code/changelog.md b/content/en/docs/claude-code/changelog.md index 93c916acdd..4be3c32bb3 100644 --- a/content/en/docs/claude-code/changelog.md +++ b/content/en/docs/claude-code/changelog.md @@ -10,6 +10,48 @@ This page is generated from the [CHANGELOG.md on GitHub](https://github.com/anth Run `claude --version` to check your installed version. + + * Added a `keybindingFlavor` setting: set it to `"readline"` to make Ctrl+W in the prompt delete back to the previous whitespace, as in Bash; the default (`"classic"`) is unchanged + * Plugin marketplaces: `headersHelper` on a url marketplace or a catalog entry runs a command that mints HTTP headers (e.g. a short-lived token) for catalog and same-origin archive fetches + * A catalog entry's `headersHelper` runs only when you install or update that plugin, after its command is shown; `claude plugin install/update` ask `[y/N]` (or pass `-y`) + * Added `claude self-hosted-runner --defer-shutdown-max-min `: on SIGTERM, keep serving attached sessions, park what is left after that many minutes, then exit + * Added `claude self-hosted-runner --proxy-authorization-command` / `--proxy-authorization-file` for egress proxies that require a freshly issued `Proxy-Authorization` header on every connection + * Fixed unbounded memory growth in long interactive sessions: subagent tool results are now released once they leave the recent display window + * Fixed custom, project, and plugin output styles drifting back to the default voice mid-session + * Fixed `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=true` not keeping prompt suggestions on when your account is near, but not over, its usage limit + * Fixed worktree-isolation Bash refusals telling you to remove a redirect when the command had none + * Fixed self-hosted runners occasionally being removed by the server after a single slow or lost poll request, handing their healthy session to another runner + * Fixed MCP elicitation dialogs showing nothing for URLs longer than 4,096 characters, and permission prompts dropping the "don't ask again" option when the project path didn't fit the terminal width + * Fixed leftover `/tmp/claude-*-cwd` files when a Bash command is killed, times out, or is interrupted + * Fixed held Backspace being ignored on terminals that send Ctrl+H for Backspace when keystrokes arrive in large bursts (slow SSH/mosh links) + * Fixed text-wrapping in permission prompt diffs: lines containing wide multi-code-point characters (such as emoji) or tabs are no longer clipped + * Fixed killing a suspended (Ctrl+Z) session sometimes leaving the terminal in bracketed-paste mode with the cursor hidden + * Fixed stdio MCP servers receiving a `server/discover` request before `initialize`, forcing lazy servers to start their backend on every session open + * Fixed a proxy's refusal of a connection being reported as a generic network error instead of naming the proxy + * Fixed the `/model` and `/effort` cache-miss warning appearing when the prompt cache had already expired + * Fixed per-task Stop from the Remote Control tasks panel doing nothing on CLI-hosted sessions + * Fixed remote sessions exiting when a client delivered a user message without a valid role + * Fixed Remote Control sessions started by `claude remote-control` inheriting session-scoped environment variables from the launching shell + * Fixed a Remote Control session whose process crashed staying unavailable until `claude remote-control` was restarted; it can now be reused when you next message it + * Fixed Remote Control messages sent from the web or Desktop while Claude is mid-turn disappearing from the transcript after the turn finishes + * Fixed Remote Control model picks made on a phone or web not updating the model shown in the terminal + * Fixed Remote Control disconnecting with "login expired" when a brief network hiccup delays renewing your sign-in; it now retries and stays connected + * Fixed Remote Control reporting a failed reconnect on sign-out; signing out now ends the session with a clear message + * Fixed `ListAgents`/`SendMessage` reporting "Remote Control is not connected" in sessions run by `claude remote-control` (server mode) or Desktop/IDE hosts; they now list and reach Remote Control peers + * Fixed `ListAgents` and `SendMessage` exposing the idle worker that the agent view pre-warms for your next background session; it now appears only once a task claims it + * Cross-session messaging: sending to a session on this machine that refuses inbound messages (e.g. `crossSessionInbound: "refuse"`) now reports "refused" to the sender instead of a silent success + * Cross-session messaging: a session whose inbox drops your messages (rate limit or full queue) now tells your session, instead of the messages vanishing silently + * Improved startup: bare `claude` starts sooner on macOS + * Improved Bash tool permission checking for zsh-specific syntax in shell conditionals + * Improved Remote Control connection resilience: brief HTTP 403 refusals from a network edge, VPN, or proxy are now tolerated for up to 3 minutes, with the refusing party named when a block persists + * Improved startup responsiveness: the automatic update check now runs about 10 seconds after launch instead of competing with startup for CPU + * Updated the bundled `claude-api` skill for the Managed Agents Aug 19 release: web search/fetch domain settings and memory stores on self-hosted sandboxes + * Changed Ctrl+L and Cmd+K in fullscreen to always just repaint — the double-press `/clear` shortcut was removed, and 1-row nvim terminals no longer trigger automatic `/clear` loops + * Changed `claude mcp list` and `claude mcp get` to show disabled servers as `⊘ Disabled` instead of connecting to them for a health check + * MCP `headersHelper` in a project `.mcp.json`, and inline MCP servers in project or `--add-dir` agent files, now require that folder's trust dialog to have been accepted (also under `claude -p`) + * MCP `headersHelper` from a project `.mcp.json`, plugin, or agent file runs without inherited credential env vars; user, managed and claude.ai-scope helpers now run from the Claude config dir + + * Fixed prompt caching for sessions using an LLM gateway or custom base URL * Added a built-in "Concise" output style: Claude leads with results and skips preamble and narration, while doing the work just as thoroughly. Select it under Output style in /config. diff --git a/content/en/docs/claude-code/claude-apps-gateway-config.md b/content/en/docs/claude-code/claude-apps-gateway-config.md index 5fd0f4621f..5aa05ae704 100644 --- a/content/en/docs/claude-code/claude-apps-gateway-config.md +++ b/content/en/docs/claude-code/claude-apps-gateway-config.md @@ -651,26 +651,27 @@ If you don't deploy Claude Desktop, leave `desktop` out of your policies entirel #### Precedence with other managed sources -If a device also has a local `managed-settings.json` or MDM-delivered policy, the managed sources don't merge, with two per-key exceptions while no [policy helper](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is supplying managed settings, since a helper's output replaces the managed sources entirely: +If a device also has a local `managed-settings.json` or MDM-delivered policy, the managed sources don't merge, with two per-key exceptions: * The `env` block, in Claude Code v2.1.223 or later * The [cross-source lock keys](/docs/en/settings#precedence-within-the-managed-tier) Both are covered in the list later in this section. The highest-priority source provides all policy settings, ranked in this order with highest priority first: -1. The [policy helper](/docs/en/settings#compute-managed-settings-with-a-policy-helper) -2. Gateway-delivered settings -3. MDM, via the HKLM registry on Windows or a plist on macOS -4. The `managed-settings.json` file -5. The HKCU registry, on Windows only +1. Gateway-delivered settings +2. MDM, via the HKLM registry on Windows or a plist on macOS +3. The `managed-settings.json` file +4. The HKCU registry, on Windows only + +When an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output replaces that source and neither per-key exception applies. A `policyHelper` in those sources doesn't run while the gateway delivers a non-empty configuration. Embedding hosts such as [Claude Desktop](/docs/en/desktop) can supply policy through the SDK `managedSettings` option. Whether it applies depends on the machine's managed configuration: * On machines with an admin-deployed managed source, it is ignored unless the highest-priority source opts in with [`parentSettingsBehavior: "merge"`](/docs/en/settings#available-settings). -* It is never merged while a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured. +* It is never merged when an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper). * When merged, it passes through a restrictive-only allowlist. [Restrict parent settings](/docs/en/claude-apps-gateway#restrict-parent-settings) lists which allow-direction settings still apply without the `allowManaged*Only` locks. -The following keys are honored when any admin source above the user-writable HKCU tier sets them, regardless of which source provides the rest of the policy. When a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured, its output is the only source these checks read: +The following keys are honored when any admin source above the user-writable HKCU tier sets them, regardless of which source provides the rest of the policy. When an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output is the only source these checks read: * `sandbox.network.allowManagedDomainsOnly` and `sandbox.filesystem.allowManagedReadPathsOnly`: when locked, the corresponding allowlists are unioned across sources * [`allowAllClaudeAiMcps`](/docs/en/settings#available-settings): allow-only override for the claude.ai MCP server allowlist diff --git a/content/en/docs/claude-code/claude-apps-gateway.md b/content/en/docs/claude-code/claude-apps-gateway.md index 1081018f72..287191da82 100644 --- a/content/en/docs/claude-code/claude-apps-gateway.md +++ b/content/en/docs/claude-code/claude-apps-gateway.md @@ -279,7 +279,7 @@ Settings passed by a launching process are parent settings. Claude Code ignores Machines that only run Claude Desktop need it. Claude Desktop applies the model list and the disabled-tools list to embedded sessions itself, but the egress allowlist reaches them only as parent settings, in the form of `WebFetch` domain rules and sandbox network rules. Without the opt-in, those sessions run without the egress restriction, and nothing warns you. The gateway still rejects inference requests for models the policy doesn't grant. -Machines where developers sign in through `/login` don't need it; every Claude Code invocation fetches its policy from the gateway directly. Fleets that configure a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) can't use it, because the helper's output replaces every other managed source and parent settings are never merged while a helper is configured. +Machines where developers sign in through `/login` don't need it; every Claude Code invocation fetches its policy from the gateway directly. Machines where an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) can't use it, because Claude Code never merges parent settings into the helper's output. #### Set the opt-in @@ -343,7 +343,7 @@ An OS policy, such as an HKLM registry policy or a managed-preferences plist, ou #### Lock behavior across sources -Setting one lock doesn't restrict the others; each key is documented in the [settings reference](/docs/en/settings#available-settings). From an admin source below the winner, the two sandbox locks still apply, and `allowManagedPermissionRulesOnly` still blocks parent-supplied allow rules and `additionalDirectories`. The hooks and MCP server locks, and `allowManagedPermissionRulesOnly`'s effect on the developer's own rules, need the winning source. On [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) fleets, the locks are read from the helper's output alone. +Setting one lock doesn't restrict the others; each key is documented in the [settings reference](/docs/en/settings#available-settings). From an admin source below the winner, the two sandbox locks still apply, and `allowManagedPermissionRulesOnly` still blocks parent-supplied allow rules and `additionalDirectories`. The hooks and MCP server locks, and `allowManagedPermissionRulesOnly`'s effect on the developer's own rules, need the winning source. When an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), Claude Code reads the locks from the helper's output alone. Each lock makes Claude Code ignore the developer's own entries for that setting, so include your organization's allowlists next to the locks. Locking network domains with an empty managed domain list blocks all sandboxed outbound traffic, and locking MCP servers with no managed or parent-supplied `allowedMcpServers` loads every server that `deniedMcpServers` doesn't block. `allowRead` entries only re-allow paths inside `denyRead` regions, so pair them with a managed `denyRead`. diff --git a/content/en/docs/claude-code/cli-reference.md b/content/en/docs/claude-code/cli-reference.md index 84a332e69c..666d787ad9 100644 --- a/content/en/docs/claude-code/cli-reference.md +++ b/content/en/docs/claude-code/cli-reference.md @@ -68,7 +68,7 @@ Customize Claude Code's behavior with these command-line flags. `claude --help` | `--append-system-prompt-file` | Load additional system prompt text from a file and append to the default prompt | `claude --append-system-prompt-file ./extra-rules.txt` | | `--autocompact ` | Set the [auto-compact window](/docs/en/model-config#set-the-auto-compact-window) for this session without changing your saved settings. Accepts the same values as `/autocompact`; that section covers the value forms and what overrides the flag. Requires Claude Code v2.1.221 or later | `claude --autocompact 500k` | | `--ax-screen-reader` | Render screen-reader friendly output: flat text without decorative borders or animations. Forces the classic renderer, so the [`tui`](/docs/en/settings#available-settings) setting has no effect; attached [background sessions](/docs/en/agent-view) still render fullscreen. Takes precedence over [`CLAUDE_AX_SCREEN_READER`](/docs/en/env-vars) and the [`axScreenReader`](/docs/en/settings#available-settings) setting. Requires Claude Code v2.1.181 or later | `claude --ax-screen-reader` | -| `--bare` | Minimal mode: skip auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](/docs/en/env-vars). See [bare mode](/docs/en/headless#start-faster-with-bare-mode) | `claude --bare -p "query"` | +| `--bare` | Minimal mode: skip auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, and CLAUDE.md so scripted calls start faster. Skills in a directory you pass with `--add-dir` still load. Claude has access to Bash, file read, and file edit tools. Sets [`CLAUDE_CODE_SIMPLE`](/docs/en/env-vars). See [bare mode](/docs/en/headless#start-faster-with-bare-mode) | `claude --bare -p "query"` | | `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` | | `--bg`, `--background` | Start the session as a [background agent](/docs/en/agent-view) and return immediately. Prints the session ID and management commands. Combine with `--exec` to run a shell command as a background job instead of a Claude session, or with `--agent` to run a specific subagent. Cannot be combined with `-p`/`--print`; see the [error reference](/docs/en/errors#command-line-errors) | `claude --bg "investigate the flaky test"` | | `--channels` | (Research preview) MCP servers whose [channel](/docs/en/channels) notifications Claude should listen for in this session. Space-separated list of `plugin:@` entries. Requires Anthropic authentication through claude.ai or a Console API key | `claude --channels plugin:my-notifier@my-marketplace` | diff --git a/content/en/docs/claude-code/code-review.md b/content/en/docs/claude-code/code-review.md index a136d90ca2..700d392d11 100644 --- a/content/en/docs/claude-code/code-review.md +++ b/content/en/docs/claude-code/code-review.md @@ -146,7 +146,7 @@ If a review is already running on that PR, the request is queued until the in-pr Code Review reads two files from your repository to guide what it flags. They differ in how strongly they influence the review: * **`CLAUDE.md`**: shared project instructions that Claude Code uses for all tasks, not just reviews. Code Review reads it as project context and flags newly introduced violations as nits. -* **`REVIEW.md`**: review-only instructions, injected directly into every agent in the review pipeline as highest priority. Use it to change what gets flagged, at what severity, and how findings are reported. +* **`REVIEW.md`**: review-only instructions, given to the agents that find and verify findings and consulted by the agents that rank and report them. Use it to say what your team wants flagged, at what severity, and how findings are reported. ### CLAUDE.md @@ -158,9 +158,9 @@ For review-specific guidance that you don't want applied to general Claude Code ### REVIEW\.md -`REVIEW.md` is a file at your repository root that overrides how Code Review behaves on your repo. Its contents are injected into the system prompt of every agent in the review pipeline as the highest-priority instruction block, taking precedence over the default review guidance. +`REVIEW.md` is a file at your repository root that tailors Code Review to your repo. The agents in the review pipeline that find and verify findings receive its contents as your repository's review instructions, alongside Code Review's default review guidance, and the agents that rank and report findings consult it before settling severity and writing the review. -Because it's pasted verbatim, `REVIEW.md` is plain instructions: [`@` import syntax](/docs/en/memory#import-additional-files) is not expanded, and referenced files are not read into the prompt. Put the rules you want enforced directly in the file. +The agents read the file's text as-is, so `REVIEW.md` is plain instructions: [`@` import syntax](/docs/en/memory#import-additional-files) is not expanded, and referenced files are not read along with it. Put the rules you want enforced directly in the file. #### What you can tune @@ -172,7 +172,7 @@ Because it's pasted verbatim, `REVIEW.md` is plain instructions: [`@` import syn **Skip rules**: list paths, branch patterns, and finding categories where Claude should post no findings. Common candidates are generated code, lockfiles, vendored dependencies, and machine-authored branches, along with anything your CI already enforces like linting or spellcheck. For paths that warrant some review but not full scrutiny, set a higher bar instead of skipping entirely: "in `scripts/`, only report if near-certain and severe." -**Repo-specific checks**: add rules you want flagged on every PR, like "new API routes must have an integration test." Because `REVIEW.md` is injected as highest priority, these land more reliably than the same rules in a long `CLAUDE.md`. +**Repo-specific checks**: add rules you want flagged on every PR, like "new API routes must have an integration test." Because `REVIEW.md` reaches every finding and verification agent directly, these land more reliably than the same rules in a long `CLAUDE.md`. **Verification bar**: require evidence before a class of finding is posted. For example, "behavior claims need a `file:line` citation in the source, not an inference from naming" cuts false positives that would otherwise cost the author a round trip. @@ -383,3 +383,4 @@ The command was named `/simplify` before v2.1.147, when it applied fixes by defa * [GitLab CI/CD](/docs/en/gitlab-ci-cd): self-hosted Claude integration for GitLab pipelines * [Memory](/docs/en/memory): how `CLAUDE.md` files work across Claude Code * [Analytics](/docs/en/analytics): track Claude Code usage beyond code review +* [How Anthropic secures its AI-native software development lifecycle](https://claude.com/blog/how-anthropic-secures-its-ai-native-software-development-lifecycle): how automated review fits as one layer of Anthropic's secure development process diff --git a/content/en/docs/claude-code/commands.md b/content/en/docs/claude-code/commands.md index a3a2058916..eea61bae7e 100644 --- a/content/en/docs/claude-code/commands.md +++ b/content/en/docs/claude-code/commands.md @@ -104,7 +104,7 @@ In the table below, `` indicates a required argument and `[arg]` indicates | `/mcp [reconnect \|enable\|disable [\|all]]` | Manage MCP server connections and OAuth authentication. Run with no argument to open the interactive list, pass `reconnect ` to reconnect one disconnected server, or pass `enable`/`disable` with a server name or `all` to change connection state without opening the dialog. Also available in non-interactive mode (`-p`), where running it with no argument prints a text summary of server status instead of opening the list; requires Claude Code v2.1.205 or later | | `/memory` | Edit `CLAUDE.md` files, enable or disable [auto memory](/docs/en/memory#auto-memory), and view auto memory entries | | `/mobile` | Show QR code to download the Claude mobile app. Aliases: `/ios`, `/android` | -| `/model [model]` | Switch the AI model and save it as your default for new sessions. For models that support it, use left/right arrows to [adjust effort level](/docs/en/model-config#adjust-effort-level). With no argument, opens a picker; press `s` on a row to switch for the current session only. The picker asks for confirmation when the conversation has prior output, since the next response re-reads the full history without cached context. Once confirmed, the change applies without waiting for the current response to finish. Also available in non-interactive mode (`-p`) with a model argument instead of the picker, where it applies to the current session only and isn't saved as your default; requires Claude Code v2.1.205 or later | +| `/model [model]` | Switch the AI model and save it as your default for new sessions. For models that support it, use left/right arrows to [adjust effort level](/docs/en/model-config#adjust-effort-level). With no argument, opens a picker; press `s` on a row to switch for the current session only. See [when Claude Code asks you to confirm the switch](/docs/en/prompt-caching#switching-models). Once confirmed, the change applies without waiting for the current response to finish. Also available in non-interactive mode (`-p`) with a model argument instead of the picker, where it applies to the current session only and isn't saved as your default; requires Claude Code v2.1.205 or later | | `/passes` | Share a free week of Claude Code with friends. Only visible if your account is eligible | | `/permissions` | Manage allow, ask, and deny rules for tool permissions. Opens an interactive dialog where you can view rules by scope, add or remove rules, manage working directories, and review [recent auto mode denials](/docs/en/auto-mode-config#review-denials). When you run it while Claude is responding, Claude Code opens the dialog immediately and applies your changes starting with Claude's next tool call in the same turn. Before v2.1.234, Claude Code queued the command until the turn finished. Alias: `/allowed-tools` | | `/plan [description]` | Enter plan mode directly from the prompt. Pass an optional description to enter plan mode and immediately start with that task, for example `/plan fix the auth bug` | @@ -123,8 +123,8 @@ In the table below, `` indicates a required argument and `[arg]` indicates | `/resume [session]` | Resume a conversation by ID or name, or open the session picker. [Background sessions](/docs/en/agent-view) appear in the picker marked with `bg`; one that is still running can't be resumed here, so attach to it from `claude agents` or stop it there first. Alias: `/continue` | | `/review [low\|medium\|high\|xhigh\|max\|ultra] [--fix] [--comment] [pr#\|branch\|path]` | Alias of [`/code-review`](/docs/en/code-review#review-a-diff-locally): reviews the current diff, or a PR number, branch, or path you pass, such as `/review 1234`, and takes the same effort levels and flags. With no level given, the review reuses the last `low` through `max` level you typed; see [Review a diff locally](/docs/en/code-review#review-a-diff-locally) for the exact rules. For a deep cloud review, use [`/code-review ultra`](/docs/en/ultrareview). Before v2.1.223, `/review` was a separate command that ran a single-pass, read-only review of a GitHub pull request by number, listing open PRs to pick from when run with no argument; from v2.1.186 through v2.1.201, it ran the same multi-agent engine as `/code-review medium` | | `/rewind` | Rewind the conversation and/or code to a previous point, or summarize from a selected message. See [checkpointing](/docs/en/checkpointing). Aliases: `/checkpoint`, `/undo` | -| `/run` | **[Skill](/docs/en/skills#bundled-skills).** Launch and drive your project's app to see a change working, not only passing tests. See [Run and verify your app](/docs/en/skills#run-and-verify-your-app). Requires Claude Code v2.1.145 or later | -| `/run-skill-generator` | **[Skill](/docs/en/skills#bundled-skills).** Teach `/run` and `/verify` how to build, launch, and drive your project's app from a clean environment by writing a per-project [skill](/docs/en/skills#run-and-verify-your-app). Requires Claude Code v2.1.145 or later | +| `/run` | **[Skill](/docs/en/skills#bundled-skills).** Launch and drive your project's app to see a change working, not only passing tests. See [Run and verify your app](/docs/en/skills#run-and-verify-your-app) | +| `/run-skill-generator` | **[Skill](/docs/en/skills#bundled-skills).** Teach `/run` and `/verify` how to build, launch, and drive your project's app from a clean environment by writing a per-project [skill](/docs/en/skills#run-and-verify-your-app) | | `/sandbox` | Toggle [sandbox mode](/docs/en/sandboxing). Available on supported platforms only | | `/schedule [description]` | Create, update, list, or run [routines](/docs/en/routines), which execute in the cloud. Claude walks you through the setup conversationally. You can also ask about a [routine's recent runs](/docs/en/routines#manage-routines-from-the-cli). Alias: `/routines` | | `/scroll-speed` | Adjust mouse wheel [scroll speed](/docs/en/fullscreen#mouse-wheel-scrolling) interactively, with a ruler you can scroll while the dialog is open to preview the change. Available in [fullscreen rendering](/docs/en/fullscreen) only and not in the JetBrains IDE terminal | @@ -150,7 +150,7 @@ In the table below, `` indicates a required argument and `[arg]` indicates | `/upgrade` | Open the upgrade page in your browser to switch to a higher plan tier. When the browser fails to open, the command shows a sign-in prompt without printing the URL | | `/usage` | Show session cost, plan usage limits, and activity stats. On a Pro, Max, Team, or Enterprise plan, includes a breakdown of usage by skill, subagent, plugin, and MCP server. See the [cost tracking guide](/docs/en/costs#using-the-%2Fusage-command) for details. `/cost` and `/stats` are aliases | | `/usage-credits` | Configure usage credits, or request them from your admin, when you hit a limit. Opens your [usage-credits billing settings](/docs/en/costs#add-usage-credits-to-your-subscription) in the browser, except that Team and Enterprise members without billing access instead send a usage-credits request to their admin from the CLI, after confirming in a dialog that the request notifies their admins. When no browser can open the billing page, for example over SSH, the command prints the URL to visit instead; this requires Claude Code v2.1.205 or later, and earlier versions showed nothing in that case. Previously `/extra-usage` | -| `/verify` | **[Skill](/docs/en/skills#bundled-skills).** Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than relying on tests or type checks. See [Run and verify your app](/docs/en/skills#run-and-verify-your-app). Requires Claude Code v2.1.145 or later | +| `/verify` | **[Skill](/docs/en/skills#bundled-skills).** Confirm a code change does what it should by building your project's app, running it, and observing the result, rather than relying on tests or type checks. See [Run and verify your app](/docs/en/skills#run-and-verify-your-app) | | `/vim` | Removed in v2.1.92. To toggle between Vim and Normal editing modes, use `/config` → Editor mode | | `/voice [hold\|tap\|off]` | Toggle [voice dictation](/docs/en/voice-dictation), or enable it in a specific mode. Requires a Claude.ai account | | `/web-setup` | Connect your GitHub account to [Claude Code on the web](/docs/en/web-quickstart#connect-from-your-terminal) using your local `gh` CLI credentials. `/schedule` prompts for this automatically if GitHub isn't connected | diff --git a/content/en/docs/claude-code/costs.md b/content/en/docs/claude-code/costs.md index 5992da132f..d449816270 100644 --- a/content/en/docs/claude-code/costs.md +++ b/content/en/docs/claude-code/costs.md @@ -295,6 +295,7 @@ A session that has been open for hours can use far more of your plan limits than * **Cache misses**: your first message after a break longer than the [cache lifetime](/docs/en/prompt-caching#cache-lifetime) misses the cache and reprocesses your full context. The lifetime is an hour on a subscription and drops to five minutes once you're drawing on [usage credits](https://support.claude.com/en/articles/12429409-extra-usage-for-paid-claude-plans); on an API key or cloud provider, it's five minutes by default. You can keep the one-hour lifetime while drawing on usage credits by setting [`ENABLE_PROMPT_CACHING_1H=1`](/docs/en/env-vars). On Pro and Max plans, when you resume a large session after a long break, Claude Code [offers to resume from a summary](/docs/en/sessions#resume-from-a-summary) so later requests don't carry the full history * **Scheduled tasks**: a [scheduled task](/docs/en/scheduled-tasks) fires on its interval even while the session is idle, sending your full context each time * **Cross-session messages**: Claude Code delivers a [message from another of your sessions](/docs/en/cross-session-messaging) as a new turn when this session sits idle, sending your full context each time. To hold inbound messages instead of delivering them, set [`crossSessionInbound`](/docs/en/settings#available-settings) to `hold` +* **Goal check-ins**: while background work keeps an active [goal](/docs/en/goal) waiting, Claude Code [asks Claude to check on that work](/docs/en/goal#background-work-defers-evaluation) even when the session sits idle, starting a new turn that sends your full context. To turn check-ins off, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](/docs/en/env-vars) to `0`. Idle check-ins require Claude Code v2.1.236 or later * **Agent teammates**: each active [teammate](#agent-team-token-costs) keeps consuming tokens until it exits * **Compaction**: `/compact` reads the conversation it summarizes, so [compacting a large context](/docs/en/prompt-caching#compacting-the-conversation) is itself a large request. When you want a fresh start instead of continuity, `/clear` costs nothing diff --git a/content/en/docs/claude-code/cross-session-messaging.md b/content/en/docs/claude-code/cross-session-messaging.md index 65e69b5547..efa6177175 100644 --- a/content/en/docs/claude-code/cross-session-messaging.md +++ b/content/en/docs/claude-code/cross-session-messaging.md @@ -22,7 +22,7 @@ Use messaging when one of your sessions has something another session needs mid- * **Hand over a finding**: when one session discovers a breaking change or makes a decision, Claude summarizes it for the session working on the affected area, instead of you re-explaining it there. * **Coordinate parallel worktrees**: when sessions work the same repository in separate [worktrees](/docs/en/worktrees), Claude can tell the other sessions what landed. -* **Get status from long-running work**: have a migration or test run report back to the session you're watching, or ask it yourself from there. +* **Get status from long-running work**: have a migration or test run report back to the session you're watching, or ask it yourself from there. If that session is on this machine, Claude can also [ask it for one notice when it next goes idle or exits](#get-a-notice-when-another-session-goes-idle). * **Message across machines**: reach one of your sessions on another machine or on the web. Use messaging between independent sessions that you start and steer yourself. Claude Code has a dedicated feature for each of the other ways to run or reach multiple sessions, so use the one built for what you're doing instead: @@ -73,12 +73,41 @@ Once delivered, the message counts toward [usage](/docs/en/costs) like a prompt Permission boundaries stay per-session. Claude is instructed never to ask another session for an action that was denied or blocked in its own session, or that its own permission settings would block, and to route that work back to you instead. On the receiving side, the [receiving session's own permission prompts and rules still apply](#how-a-session-treats-an-incoming-message) to anything the message asks for. +### Get a notice when another session goes idle + +Claude can ask one of your sessions on this machine to send back one notice when that session next goes idle or exits. Idle here means the session finished a turn with nothing queued. Use it when you're waiting on a long task in another session and want to hear when it's done instead of checking. Requires Claude Code v2.1.236 or later in both sessions. + +#### Ask for a notice + +Tell Claude what you're waiting on. This prompt asks for a notice from the migration session: + +```text wrap theme={null} +Tell me when the migration session finishes what it's working on +``` + +Claude subscribes with the `SendMessage` tool's `notify_when_idle` input, either attached to a message it's sending anyway or on its own. On its own, Claude Code subscribes without starting a turn or spending tokens in the watched session, and sends the notice right away if that session is already idle. Attached to a message, Claude Code delivers the message first and sends the notice later. + +#### What each session shows + +The watched session shows a line saying another process asked to be told when the session is next idle. The asking session shows the notice as a line naming the watched session. The line can include the time that session's turn finished and a one-line status from that turn. If the asking session is idle, Claude Code starts a new turn with the notice. + +#### Limits + +The notice is one-shot: Claude Code sends it once from the watched session, and neither session polls the other. If no notice arrives within 12 hours, Claude Code drops the subscription and tells Claude, so it doesn't keep waiting. + +Each side's [inbound controls](#control-inbound-messages) apply to a notice like a message: + +* **`refuse` on either side**: nothing arrives. The watched session drops the request without recording or answering it, so the subscription expires unanswered after 12 hours, and an asking session with `refuse` never subscribes. +* **`hold` on either side**: the notice arrives with less. The watched session leaves the one-line status out, and the asking session shows the notice in your transcript without delivering it to Claude. + +Only the Claude in your main conversation can subscribe, and only to your sessions on this machine. When a subagent or an agent team teammate sets `notify_when_idle`, Claude Code makes no subscription and tells it so. When Claude asks for a notice from any other agent, such as a teammate, a subagent, or a session beyond this machine, Claude Code refuses the whole call, including any message attached to it, and reports the refusal to Claude so it can resend the message without the request. + ### See which sessions Claude can reach Claude finds a message's target on its own, so you don't need to run anything before asking it to send. To see for yourself which sessions Claude can reach, run the `/list-agents` command. It lists each session with the name it answers to, and that name is where Claude addresses a message. The listing covers: * **Subagents**: agents running inside the current session. [Agent team](/docs/en/agent-teams) teammates aren't listed; Claude messages them through the team's own roster. -* **Your other local sessions**: Claude Code sessions running on the same machine, including [background sessions](/docs/en/agent-view). A session appears only when it binds an [inbox socket](#the-sessions-inbox-socket). +* **Your other local sessions**: Claude Code sessions running on the same machine, including [background sessions](/docs/en/agent-view). A session appears only when it binds an [inbox socket](#the-sessions-inbox-socket). The worker process that the [supervisor process](/docs/en/agent-view#the-supervisor-process) keeps ready for your next background session appears once you dispatch work to it. * **Your cloud sessions**: your [Claude Code on the web](/docs/en/claude-code-on-the-web) sessions, shown while this session is connected to [Remote Control](/docs/en/remote-control). Claude Code labels them `cloud` in the listing. * **Your Remote Control sessions on other machines**: shown while this session is connected to [Remote Control](/docs/en/remote-control), and labeled `Remote Control`. Claude Code shows `offline` as the status of a session whose Remote Control connection has dropped. @@ -157,9 +186,9 @@ When the default holds a message, Claude Code opens an approval dialog in the re * **Deny**, or dismissing the dialog, drops it. * When the dialog stays unanswered past the [`dialogExpiry`](/docs/en/settings#available-settings) deadline, Claude Code closes it and drops the message. The deadline defaults to five minutes. While no terminal is attached to a [background session](/docs/en/agent-view), Claude Code leaves the dialog open past the deadline. After you attach, Claude Code closes the dialog and drops the message only if it stays unanswered for a full deadline period. * If this session's permission-mode class changes while messages are held, Claude Code re-applies the inbound rules, delivers the messages they now accept, and shows a notice. -* If a change makes `refuse` apply while messages are held, Claude Code drops every held message and reports a denial to each sender it can reach. +* If a settings change makes `refuse` apply while messages are held, Claude Code drops every held message and reports a refusal to each sender it can reach. -When the sender runs on the same machine, Claude Code tells the sending session what happened. A notice appears there when the message is held, and a follow-up reports the outcome when the receiver later delivers, denies, or expires it. A message refused on arrival produces no sender-side notice. +When the sender is an interactive session on the same machine, Claude Code shows a notice there when the receiver holds the message, and a follow-up when the receiver later delivers, denies, or expires it. If the receiver refuses it, Claude Code shows a notice there that the receiver isn't accepting cross-session messages and tells the sender's Claude not to wait or resend. Claude Code holds at most 100 messages, separately from the delivery queue, and past that drops the oldest. @@ -238,7 +267,7 @@ Administrators can turn both sides off for an organization in [managed settings] } ``` -With this in place, Claude Code still binds each session's inbox socket, but drops every message that arrives on it without delivering anything to Claude. Denying `SendMessage` also removes messaging to subagents and agent-team teammates, since the same tool serves both. A refusing session shows no visible change, in its own `/status` or in other sessions' listings, so confirm the setting from the session's configuration. +With this in place, Claude Code still binds each session's inbox socket, but drops every message that arrives on it without delivering anything to Claude. Denying `SendMessage` also removes messaging to subagents and agent-team teammates, since the same tool serves both. A refusing session shows no visible change, in its own `/status` or in the listings of other sessions on the same machine, so to confirm it, check the settings files that apply to that session rather than its status. ## Availability @@ -266,7 +295,7 @@ The limits here are properties of the messaging channel itself and apply whereve * **Plain text only**: Claude sends only plain text across sessions. Structured [agent team](/docs/en/agent-teams) protocol messages stay within a team. * **Same-machine message size is capped**: Claude Code refuses a message to a session on this machine once its serialized form passes about a million characters. The refusal [names the exact sizes](/docs/en/errors#message-too-large-for-cross-session-delivery). Nothing reaches the receiving session. -* **Message loops are throttled**: Claude Code rate-limits repeated messages per sender, drops identical repeats arriving within a short window, and caps accepted messages waiting for Claude to read them at 50 per session. A message loop between two sessions therefore stops on its own. +* **Message loops are throttled**: in the receiving session, Claude Code rate-limits repeated messages per sender, drops identical repeats arriving within a short window, and queues at most 50 accepted messages for Claude to read. A message loop between two sessions therefore stops on its own. When the rate limit, repeat check, or queue cap drops a message from an interactive session on this machine, Claude Code tells that session which one dropped it and tells its Claude not to resend right away. ## Related resources diff --git a/content/en/docs/claude-code/deep-links.md b/content/en/docs/claude-code/deep-links.md index 03faccde22..b32a38d8fa 100644 --- a/content/en/docs/claude-code/deep-links.md +++ b/content/en/docs/claude-code/deep-links.md @@ -30,9 +30,7 @@ The `claude-cli://` prefix is a custom URL scheme that Claude Code registers wit The link itself can be hosted anywhere, but the session always opens locally on the computer where you clicked. See [Registration and supported platforms](#registration-and-supported-platforms) for which terminal emulator opens on each operating system. - - The platform that displays the link must allow custom URL schemes. GitHub-rendered Markdown allows `http` and `https` but strips schemes like `claude-cli://` in READMEs, issues, pull requests, and wikis. Only the link text shows, with no link behind it and the URL hidden. See [Troubleshooting](#the-link-renders-as-plain-text-instead-of-being-clickable) for a workaround. - +The platform that displays the link must allow custom URL schemes. For what GitHub does with them and the workaround, see [The link renders as plain text instead of being clickable](#the-link-renders-as-plain-text-instead-of-being-clickable). ### What a launched session shows diff --git a/content/en/docs/claude-code/desktop-scheduled-tasks.md b/content/en/docs/claude-code/desktop-scheduled-tasks.md index e8199ed43c..063777f914 100644 --- a/content/en/docs/claude-code/desktop-scheduled-tasks.md +++ b/content/en/docs/claude-code/desktop-scheduled-tasks.md @@ -36,7 +36,7 @@ Claude Code offers three ways to schedule recurring or one-off work: ## Create a scheduled task -Click **Routines** in the sidebar, then click **New routine** and choose **Local**. Configure these fields: +In the [**Code** tab](/docs/en/desktop), click **Routines** in the sidebar, then click **New routine** and choose **Local**. Configure these fields: | Field | Description | | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | @@ -85,7 +85,7 @@ Connector tools [your organization set to `ask`](/docs/en/mcp#organization-contr ## Manage scheduled tasks -Click a task in the **Routines** list to open its detail page. From here you can: +In the **Code** tab, click a task in the **Routines** list to open its detail page. From here you can: * **Run now**: start the task immediately without waiting for the next scheduled time * **Status**: toggle between Active and Paused to pause or resume scheduled runs without deleting the task diff --git a/content/en/docs/claude-code/desktop.md b/content/en/docs/claude-code/desktop.md index a353ce4e71..29f5028d3e 100644 --- a/content/en/docs/claude-code/desktop.md +++ b/content/en/docs/claude-code/desktop.md @@ -364,7 +364,7 @@ Claude Code applies four safety behaviors across sessions: * Before archiving any session, Claude asks you first. You see the approval card in every permission mode, including Auto and Bypass permissions. * Through this surface, Claude can't send cross-session messages from a session nobody is watching, such as a scheduled-task run, and can't deliver messages into one. -* Claude Code checks each message from this surface against the receiving session's [inbound controls](/docs/en/cross-session-messaging#control-inbound-messages). If you set [`crossSessionInbound`](/docs/en/settings#available-settings) to `refuse` in the receiving session, Claude Code drops messages from this surface. The check runs even when the receiving session doesn't have [cross-session messaging](/docs/en/cross-session-messaging#availability) itself. Before v2.1.234, Claude Code dropped every message from this surface to a receiving session without cross-session messaging. +* Claude Code checks each message from this surface against the receiving session's [inbound controls](/docs/en/cross-session-messaging#control-inbound-messages), even when the receiving session doesn't have [cross-session messaging](/docs/en/cross-session-messaging#availability) itself. If you set [`crossSessionInbound`](/docs/en/settings#available-settings) to `refuse` in the receiving session, Claude Code drops messages from this surface. Claude Code reports the refusal to the Claude desktop app. Before v2.1.234, Claude Code dropped every message from this surface to a receiving session without cross-session messaging. * Claude Code quotes each incoming message and attributes it to the session that sent it, and Claude still follows the receiving session's own permission settings when acting on one. Claude can also suggest new sessions. When it notices something worth fixing that's out of scope for the current task, it offers the work as a task chip in the chat. Click the chip to start that work in a new session with its own worktree; Claude continues your current session uninterrupted. diff --git a/content/en/docs/claude-code/env-vars.md b/content/en/docs/claude-code/env-vars.md index cde4320daa..e981f78579 100644 --- a/content/en/docs/claude-code/env-vars.md +++ b/content/en/docs/claude-code/env-vars.md @@ -206,11 +206,14 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_ALWAYS_ENABLE_EFFORT` | Set to `1` to send the [effort](/docs/en/model-config#adjust-effort-level) parameter with every request, even when Claude Code does not recognize the model ID as effort-capable. Use this when routing through an [LLM gateway](/docs/en/llm-gateway) or third-party provider that serves models under custom identifiers. Models that reject the effort parameter at the API, including Claude 3 models, Sonnet 4.0 and 4.5, Opus 4.0 and 4.1, and Haiku 4.5, are still excluded so requests do not fail | | `CLAUDE_CODE_API_KEY_HELPER_TTL_MS` | Interval in milliseconds at which credentials should be refreshed (when using [`apiKeyHelper`](/docs/en/settings#available-settings)) | | `CLAUDE_CODE_ARTIFACT_AUTO_OPEN` | Set to `0` to stop Claude Code from opening the browser automatically when a new [artifact](/docs/en/artifacts) is published. Republishing an existing artifact does not open the browser regardless of this setting | +| `CLAUDE_CODE_ARTIFACT_COMMENTS` | Set to `1` to let Claude read and reply to [comments on an artifact](/docs/en/artifacts#collect-comments-on-an-artifact) when [feature-flag fetching](#features-that-need-feature-flag-fetching) is off. Set to `0` to turn comment reading and replying off even when fetching is on. Has no effect when `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` has [turned artifacts off](/docs/en/artifacts#availability). Requires Claude Code v2.1.221 or later | +| `CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT` | Set to `1` to let Claude [reply on its own to comments sent to it](/docs/en/artifacts#let-claude-reply-to-comments-on-its-own) when [feature-flag fetching](#features-that-need-feature-flag-fetching) is off, or `0` to turn that off even when fetching is on. Needs comment reading on as well. Requires Claude Code v2.1.228 or later | | `CLAUDE_CODE_ATTRIBUTION_HEADER` | Set to `0` to omit the [attribution block](/docs/en/llm-gateway-protocol#system-prompt-attribution-block), which carries the client version and a prompt fingerprint, from the start of the system prompt. Caching on a direct connection to the Anthropic API is unaffected either way. In some direct-connection setups, Claude Code keeps the block on [auto mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) classifier requests even when you set `0`. In [System prompt attribution block](/docs/en/llm-gateway-protocol#system-prompt-attribution-block), check which connections and credentials this covers. Before v2.1.181 the block included a per-request token on custom base URLs and Microsoft Foundry connections, so on those versions set it to `0` when your LLM gateway caches on the request body or forwards requests to a third-party provider, or when you connect to Microsoft Foundry directly | | `CLAUDE_CODE_AUTO_COMPACT_WINDOW` | Set the [auto-compact window](/docs/en/model-config#set-the-auto-compact-window) in tokens, from `100000` to `1000000`. Accepts a plain integer such as `500000` only: a value like `500k` reads as `500` and clamps to the 100K minimum. Takes precedence over the `/autocompact` command, the `--autocompact` flag, and the `autoCompactWindow` setting. The status line's `used_percentage` always measures against the model's full context window, so once this variable is set, that percentage no longer indicates when compaction will run | | `CLAUDE_CODE_AUTO_CONNECT_IDE` | Override automatic [IDE connection](/docs/en/vs-code). By default, Claude Code connects automatically when launched inside a supported IDE's integrated terminal. Set to `false` to prevent this. Set to `true` to force a connection attempt when auto-detection fails, such as when tmux obscures the parent terminal. Takes precedence over the [`autoConnectIde`](/docs/en/settings#global-config-settings) global config setting | | `CLAUDE_CODE_AWS_CHAIN_RESOLVE_TIMEOUT_MS` | Time in milliseconds Claude Code waits for the AWS default credential provider chain to produce credentials before the request fails with [`AWS default-chain credential resolve timed out`](/docs/en/errors#aws-default-chain-credential-resolve-timed-out) (default: `60000`). Raise it when a step in your chain legitimately needs longer, such as a browser-based SSO sign-in with MFA through a wrapper like `aws-vault`. Applies wherever Claude Code signs with the default chain: [Amazon Bedrock](/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout), [Claude Platform on AWS](/docs/en/claude-platform-on-aws), and the [Mantle endpoint](/docs/en/amazon-bedrock#use-the-mantle-endpoint). Requires Claude Code v2.1.207 or later | | `CLAUDE_CODE_BRIDGE_SESSION_ID` | Set automatically in Bash tool and [hook command](/docs/en/hooks) subprocesses while the session has an active [Remote Control](/docs/en/remote-control) connection, and removed when the connection ends. The value is the session's ID in `session_` form, the same identifier that appears in the session's `claude.ai/code` URL, so a script can link back to the session that ran it. Requires Claude Code v2.1.199 or later. In [cloud sessions](/docs/en/claude-code-on-the-web), read `CLAUDE_CODE_REMOTE_SESSION_ID` instead | +| `CLAUDE_CODE_BS_AS_CTRL_BACKSPACE` | Set to `0` to make Claude Code read the `0x08` byte, also written `^H`, as plain Backspace, or `1` to read it as Ctrl+Backspace. Either value replaces the platform default. By default, Claude Code reads it as Ctrl+Backspace on Windows, except when `TERM_PROGRAM` is `mintty` or `TERM` is `cygwin`, and as plain Backspace on macOS and Linux. Set `0` in a Windows terminal where [Backspace deletes a whole word](/docs/en/terminal-config#fix-backspace-deleting-a-whole-word-on-windows) | | `CLAUDE_CODE_CERT_STORE` | Comma-separated list of CA certificate sources for TLS connections. `bundled` is the Mozilla CA set shipped with Claude Code. `system` is the operating system trust store, read only on runtimes with `tls.getCACertificates`: the native binary, or Node 22.15 or later for npm installs. See [CA certificate store](/docs/en/network-config#ca-certificate-store). Default is `bundled,system` | | `CLAUDE_CODE_CHILD_SESSION` | Set to `1` in subprocesses Claude Code spawns via the Bash, PowerShell, and Monitor tools, [hook](/docs/en/hooks) commands, and [status line](/docs/en/statusline) commands. Not set for stdio [MCP server](/docs/en/mcp) subprocesses, which are long-lived and outlive the session that spawned them. Unlike `CLAUDECODE`, this is only set by Claude Code itself when it launches a subprocess and not by IDE extensions, so it reliably distinguishes a nested session from a top-level `claude` launched in an IDE-integrated terminal. A nested interactive `claude` TUI started this way is automatically excluded from `--resume`, `--continue`, up-arrow history, and the `claude agents` list. Non-interactive `claude -p` sessions still persist. Set `CLAUDE_CODE_FORCE_SESSION_PERSISTENCE=1` to override this exclusion. Requires Claude Code v2.1.172 or later | | `CLAUDE_CODE_CLIENT_CERT` | Path to client certificate file for mTLS authentication | @@ -265,8 +268,8 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_ENABLE_FINE_GRAINED_TOOL_STREAMING` | Controls whether tool call inputs stream from the API as Claude generates them. With this off, a large tool input such as a long file write arrives only after Claude finishes generating it, which can look like it's hanging. Enabled by default on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform, enabled per model where the deployed container supports it. Set to `0` to opt out. Set to `1` to force on when routing through a proxy via `ANTHROPIC_BASE_URL`, `ANTHROPIC_VERTEX_BASE_URL`, or `ANTHROPIC_BEDROCK_BASE_URL`. Off by default on Microsoft Foundry and [gateway](/docs/en/llm-gateway) connections | | `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY` | Set to `1` to populate the `/model` picker from your gateway's `/v1/models` endpoint when `ANTHROPIC_BASE_URL` points at an Anthropic-compatible gateway such as LiteLLM, Kong, or an internal proxy. Off by default because gateways backed by a shared API key would otherwise show every user every model the key can access. Discovered models are still filtered by an [`availableModels`](/docs/en/settings#available-settings) allowlist the session receives; deliver the list through [MDM or a managed settings file](/docs/en/settings#settings-files), since [server-managed delivery is not available on gateway configurations](/docs/en/server-managed-settings#platform-availability) | | `CLAUDE_CODE_ENABLE_OPUS_4_7_FAST_MODE` | Removed in v2.1.142, when the [fast mode](/docs/en/fast-mode) default moved from Opus 4.6 to Opus 4.7 | -| `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` | Set to `false` to disable prompt suggestions (the "Prompt suggestions" toggle in `/config`). These are the grayed-out predictions that appear in your prompt input. Takes precedence over the [`promptSuggestionEnabled`](/docs/en/settings#available-settings) setting. See [Prompt suggestions](/docs/en/interactive-mode#prompt-suggestions) | -| `CLAUDE_CODE_ENABLE_TASKS` | Selects which task-tracking tools Claude Code provides in [sessions that have them](/docs/en/tools-reference#task-tool-availability). By default, Claude Code provides the Task tools `TaskCreate`, `TaskUpdate`, `TaskGet`, and `TaskList`. Set to `0` to get the legacy `TodoWrite` tool instead. See [Task list](/docs/en/interactive-mode#task-list) and [Migrate to Task tools](/docs/en/agent-sdk/todo-tracking#migrate-to-task-tools) | +| `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` | Set to `false` to turn off prompt suggestions, the grayed-out predictions that appear in your prompt input. Takes precedence over the [`promptSuggestionEnabled`](/docs/en/settings#available-settings) setting, which is what the **Prompt suggestions** toggle in `/config` writes. Claude Code also [pauses suggestions while your account is close to or at its usage limit](/docs/en/interactive-mode#when-claude-code-skips-suggestions). Set to `true` to keep them on until you reach the limit. Requires Claude Code v2.1.238 or later. See [Prompt suggestions](/docs/en/interactive-mode#prompt-suggestions) | +| `CLAUDE_CODE_ENABLE_TASKS` | Selects which task-tracking tools Claude Code provides in [sessions that have them](/docs/en/tools-reference#task-tool-availability). By default, Claude Code provides the Task tools `TaskCreate`, `TaskUpdate`, `TaskGet`, and `TaskList`. Set to `0` to get the legacy `TodoWrite` tool instead. See [Task list](/docs/en/interactive-mode#task-list) | | `CLAUDE_CODE_ENABLE_TELEMETRY` | Set to `1` to enable OpenTelemetry data collection for metrics and logging. Required before configuring OTel exporters. See [Monitoring](/docs/en/monitoring-usage) | | `CLAUDE_CODE_ENABLE_TODO_TOOLS` | Set to `1` to get the task-tracking tools on the models listed under [Task tool availability](/docs/en/tools-reference#task-tool-availability), where Claude Code otherwise leaves them out. `CLAUDE_CODE_ENABLE_TASKS` still selects the Task tools or `TodoWrite`. Requires Claude Code v2.1.233 or later | | `CLAUDE_CODE_EXIT_AFTER_STOP_DELAY` | Time in milliseconds to wait after the query loop becomes idle before automatically exiting. Useful for automated workflows and scripts using SDK mode | @@ -303,7 +306,7 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_MESSAGING_TOKEN` | Set by Claude Code, not by you: in sessions that bind an [inbox socket](/docs/en/cross-session-messaging#the-sessions-inbox-socket), Claude Code exports this per-session token to hooks and Bash commands alongside `CLAUDE_CODE_MESSAGING_SOCKET`. A script posting to the socket can send `{"type":"auth","token":""}` as its first line to prove it belongs to the session. The [own-child rules](/docs/en/cross-session-messaging#the-sessions-inbox-socket) say when Claude Code consults it. Each session exports its own token, never one inherited from a parent session. Settings `env` blocks can't set it. Requires Claude Code v2.1.228 or later | | `CLAUDE_CODE_NATIVE_CURSOR` | Set to `1` to show the terminal's own cursor at the input caret instead of a drawn block. The cursor respects the terminal's blink, shape, and focus settings | | `CLAUDE_CODE_NEW_INIT` | Set to `1` to make `/init` run an interactive setup flow. The flow asks which files to generate, including CLAUDE.md, skills, and hooks, before exploring the codebase and writing them. Without this variable, `/init` generates a CLAUDE.md automatically without prompting | -| `CLAUDE_CODE_NO_FLICKER` | Set to `1` to enable [fullscreen rendering](/docs/en/fullscreen), a research preview that reduces flicker and keeps memory flat in long conversations. Equivalent to the [`tui`](/docs/en/settings#available-settings) setting; you can also switch with `/tui fullscreen` | +| `CLAUDE_CODE_NO_FLICKER` | Set to `1` to enable [fullscreen rendering](/docs/en/fullscreen), a research preview that reduces flicker and keeps memory flat in long conversations. You can also switch with `/tui fullscreen` | | `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` | OAuth refresh token for Claude.ai authentication. When set, `claude auth login` exchanges this token directly instead of opening a browser. Requires `CLAUDE_CODE_OAUTH_SCOPES`. Useful for provisioning authentication in automated environments | | `CLAUDE_CODE_OAUTH_SCOPES` | Space-separated OAuth scopes the refresh token was issued with, such as `"user:profile user:inference user:sessions:claude_code"`. Required when `CLAUDE_CODE_OAUTH_REFRESH_TOKEN` is set | | `CLAUDE_CODE_OAUTH_TOKEN` | OAuth access token for claude.ai authentication. Alternative to `/login` for SDK and automated environments. Takes precedence over keychain-stored credentials. Generate one with [`claude setup-token`](/docs/en/authentication#generate-a-long-lived-token). Unless you run [`/login`](/docs/en/authentication#authentication-precedence), Claude Code uses the token you set for the whole session. To replace an expired token, generate a new one and restart | @@ -340,7 +343,7 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_SESSION_ID` | Set automatically to the current session ID in Bash and PowerShell tool subprocesses, [hook command](/docs/en/hooks) subprocesses, and stdio [MCP server](/docs/en/mcp) subprocesses. For Bash, PowerShell, and hooks this matches the `session_id` field in the hook JSON input and is updated on `/clear`. An MCP server subprocess retains the ID it was spawned with. On `--resume ` it receives the resumed ID, matching hooks and Bash. On `--continue` or `--resume` without an explicit ID it may receive the initial startup ID instead. Use to correlate scripts and external tools with the Claude Code session that launched them | | `CLAUDE_CODE_SHELL` | Set the shell Claude Code uses to run Bash tool commands. Accepts a path to a `bash` or `zsh` binary, for example `/opt/homebrew/bin/bash`. Other shells such as `fish` are not supported. If the value is not a working `bash` or `zsh` path, Claude Code ignores it and falls back to auto-detection. Auto-detection uses your `$SHELL` when it points to `bash` or `zsh`, otherwise it picks the first working `zsh` then `bash` found on your `PATH` and standard install locations | | `CLAUDE_CODE_SHELL_PREFIX` | Command prefix that wraps shell commands Claude Code spawns: Bash tool calls, [hook](/docs/en/hooks) commands, [status line](/docs/en/statusline) commands, and stdio [MCP server](/docs/en/mcp) startup commands. PowerShell hooks and exec-form hooks run without the prefix. Useful for logging or auditing. Setting a bare executable path such as `/path/to/logger.sh` runs each command as `/path/to/logger.sh ''`. The wrapper receives the command line as a single shell-quoted argument in `$1`, so the wrapper must re-evaluate `$1` with a shell, for example `exec bash -c "$1"`. Treating `$1` as a bare executable path breaks stdio MCP servers that pass arguments such as `npx -y `. For Bash tool calls, `$1` contains the full shell invocation Claude Code assembles, including environment setup, not only the command Claude ran | -| `CLAUDE_CODE_SIMPLE` | Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. OAuth tokens and keychain credentials are not read, so Anthropic authentication must come from `ANTHROPIC_API_KEY` or an `apiKeyHelper` in `--settings`. Equivalent to passing [`--bare`](/docs/en/headless#start-faster-with-bare-mode) | +| `CLAUDE_CODE_SIMPLE` | Set to `1` to run with a minimal system prompt and only the Bash, file read, and file edit tools. MCP tools from `--mcp-config` are still available. Disables auto-discovery of hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, and CLAUDE.md. Skills in a directory you pass with `--add-dir` still load. OAuth tokens and keychain credentials are not read, so Anthropic authentication must come from `ANTHROPIC_API_KEY` or an `apiKeyHelper` in `--settings`. Equivalent to passing [`--bare`](/docs/en/headless#start-faster-with-bare-mode) | | `CLAUDE_CODE_SIMPLE_SYSTEM_PROMPT` | Set to `1` to use a shorter system prompt and abbreviated tool descriptions on any model. Set to `0`, `false`, `no`, or `off` to opt out even on models where the experiment or server configuration would otherwise enable it. The full tool set, hooks, MCP servers, and CLAUDE.md discovery remain enabled | | `CLAUDE_CODE_SKIP_ANTHROPIC_AWS_AUTH` | Skip client-side authentication for [Claude Platform on AWS](/docs/en/claude-platform-on-aws), for gateways that sign requests themselves | | `CLAUDE_CODE_SKIP_AWS_CRED_CACHE` | Set to `1` to turn off the in-process cache of credentials resolved from the AWS default credential provider chain, so Claude Code resolves the chain on every API request. With the cache off, an SSO-backed profile requests credentials from IAM Identity Center on every request. See [credential caching and resolution timeout](/docs/en/amazon-bedrock#credential-caching-and-resolution-timeout). Requires Claude Code v2.1.207 or later | @@ -365,7 +368,7 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `CLAUDE_CODE_TMPDIR` | Override the temp directory used for internal temp files. Claude Code appends `/claude-{uid}/` on Unix or `/claude/` on Windows to this path. Default: `/tmp` on macOS, `os.tmpdir()` on Linux and Windows. As of v2.1.161, on macOS and Linux, [sandboxed](/docs/en/sandboxing) Bash subprocesses receive a short fallback `$TMPDIR` under the system default when your override is a long path, since some tools fail when temp paths get too long. Unsandboxed Bash commands inherit your shell's `$TMPDIR` unchanged. Claude Code's own temp files always use your override | | `CLAUDE_CODE_TMUX_TRUECOLOR` | Set to any non-empty value, such as `1`, to allow 24-bit truecolor output inside tmux. **Setting it to `0` or `false` still allows truecolor**, unlike most on/off variables; unset the variable to restore the 256-color clamp. By default, Claude Code clamps to 256 colors when `$TMUX` is set because tmux does not pass through truecolor escape sequences unless configured to. Set this after adding `set -ga terminal-overrides ',*:Tc'` to your `~/.tmux.conf`. See [Terminal configuration](/docs/en/terminal-config) for other tmux settings | | `CLAUDE_CODE_TOOL_MEMORY_LIMIT` | On Linux and WSL, set to a size such as `4G` to [cap the memory that Bash and PowerShell tool commands can use](/docs/en/tools-reference#memory-limit-on-linux-and-wsl). Write the size in plain digits, alone for a number of bytes or with a `K`, `M`, `G`, or `T` suffix. Set `0` or `off` to turn the cap off. Once a tool command has turned the cap on or off, a changed value takes effect the next time you launch `claude`. Requires Claude Code v2.1.233 or later | -| `CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS` | Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](/docs/en/remote-control) or SDK host, and for the approval dialog for a [held cross-session message](/docs/en/cross-session-messaging#control-inbound-messages), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren't governed by it. [Control inbound messages](/docs/en/cross-session-messaging#control-inbound-messages) and [non-interactive sessions](/docs/en/cross-session-messaging#non-interactive-sessions) cover the full held-message expiry rules, including the cases where the deadline doesn't apply. Overrides the [`dialogExpiry`](/docs/en/settings#available-settings) setting; `0` or a negative value disables the deadline | +| `CLAUDE_CODE_USER_DIALOG_TIMEOUT_MS` | Deadline in milliseconds for dialogs Claude Code forwards to a remote client, such as a [Remote Control](/docs/en/remote-control) or SDK host, and for the approval dialog for a [held cross-session message](/docs/en/cross-session-messaging#control-inbound-messages), before Claude Code cancels them; permission prompts and `AskUserQuestion` questions use their own flows and aren't governed by it. Also bounds the mid-session [Fable 5 usage-credits consent prompt](/docs/en/model-config#fable-5-and-usage-credits) in a session that may be running unattended. [Control inbound messages](/docs/en/cross-session-messaging#control-inbound-messages) and [non-interactive sessions](/docs/en/cross-session-messaging#non-interactive-sessions) cover the full held-message expiry rules, including the cases where the deadline doesn't apply. Overrides the [`dialogExpiry`](/docs/en/settings#available-settings) setting; `0` or a negative value disables the deadline | | `CLAUDE_CODE_USE_ANTHROPIC_AWS` | Use [Claude Platform on AWS](/docs/en/claude-platform-on-aws) | | `CLAUDE_CODE_USE_BEDROCK` | Use [Amazon Bedrock](/docs/en/amazon-bedrock) | | `CLAUDE_CODE_USE_FOUNDRY` | Use [Microsoft Foundry](/docs/en/microsoft-foundry) | @@ -425,12 +428,16 @@ Numeric variables such as timeouts, token budgets, and retry counts accept scien | `MAX_STRUCTURED_OUTPUT_RETRIES` | Number of times Claude Code retries when the model's response fails validation against the [`--json-schema`](/docs/en/cli-reference#cli-flags) in non-interactive mode with the `-p` flag. The same retry count applies when a [workflow](/docs/en/workflows) subagent's structured output fails validation. Defaults to 5 | | `MAX_THINKING_TOKENS` | Fixed token budget for [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking). Claude Code caps it at one token below the request's max output tokens and never below 1,024; see `CLAUDE_CODE_MAX_OUTPUT_TOKENS` for how that limit is set. When unset and thinking is enabled, models with [adaptive reasoning](/docs/en/model-config#adjust-effort-level) choose their own thinking depth, and other models use the cap. Set to `0` to disable thinking on the Anthropic API, except on Fable 5, which cannot have thinking turned off; on [third-party providers](/docs/en/third-party-integrations), `0` omits the `thinking` parameter instead. Nonzero values are ignored on adaptive reasoning models unless `CLAUDE_CODE_DISABLE_ADAPTIVE_THINKING` is set | | `MCP_CLIENT_SECRET` | OAuth client secret for MCP servers that require [pre-configured credentials](/docs/en/mcp#use-pre-configured-oauth-credentials). Avoids the interactive prompt when adding a server with `--client-secret` | -| `MCP_CONNECTION_NONBLOCKING` | Controls whether startup waits for MCP servers to connect before the first query. MCP startup is non-blocking by default: servers connect in the background and their tools become available as they finish. Set to `0` to make Claude Code wait for servers to connect before the first query. Servers configured with [`alwaysLoad: true`](/docs/en/mcp#exempt-a-server-from-deferral) still make startup wait regardless, except when served from the [discovery cache](/docs/en/mcp#managing-your-servers), since their tools must be present when the first prompt is built. In non-interactive mode (`-p`), Claude Code also waits for still-pending servers before the first turn regardless of this variable, with a longer deadline when you pass [`--mcp-config`](/docs/en/cli-reference#cli-flags) explicitly; see that flag's entry for the cached-server exception | +| `MCP_CONNECTION_NONBLOCKING` | Controls whether startup waits for MCP servers to connect before the first query. MCP startup is non-blocking by default: servers connect in the background and their tools become available as they finish. Set to `0` to make Claude Code wait for servers to connect before the first query. Servers configured with [`alwaysLoad: true`](/docs/en/mcp#exempt-a-server-from-deferral) still make startup wait regardless, except when served from the [discovery cache](/docs/en/mcp#server-status-detail), since their tools must be present when the first prompt is built. In non-interactive mode (`-p`), Claude Code also waits for still-pending servers before the first turn regardless of this variable, with a longer deadline when you pass [`--mcp-config`](/docs/en/cli-reference#cli-flags) explicitly; see that flag's entry for the cached-server exception | | `MCP_CONNECT_TIMEOUT_MS` | How long blocking MCP startup waits, in milliseconds, for the connection batch before snapshotting the tool list (default: 5000). Applies when `MCP_CONNECTION_NONBLOCKING=0` or for servers marked [`alwaysLoad: true`](/docs/en/mcp#exempt-a-server-from-deferral). Servers still pending at the deadline keep connecting in the background. Distinct from `MCP_TIMEOUT`, which bounds an individual server's connect attempt | -| `MCP_DISCOVERY_CACHE` | Set to `0` to turn off the cross-process MCP discovery cache, so every server connects at startup instead of showing the [`connects on first use` cached status](/docs/en/mcp#managing-your-servers) and connecting on its first tool call. The cached status requires Claude Code v2.1.221 or later | +| `MCP_DISCOVERY_CACHE` | Turns the [MCP discovery cache](/docs/en/mcp#server-status-detail) on or off. With the cache on, a remote HTTP or SSE server you've used before can show the [`cached` status](/docs/en/mcp#server-status-detail), and Claude Code connects it on its first tool call instead of at startup. The cache is off by default unless a gradual rollout has enabled it for your account. Set to `1` to turn it on, or `0` to keep it off even when the rollout has enabled it. Before v2.1.238, the cache was on by default. The `cached` status requires Claude Code v2.1.221 or later | +| `MCP_DISCOVERY_CACHE_MAX_STALE_S` | Maximum age, in seconds, of a [discovery-cache](/docs/en/mcp#server-status-detail) entry (default: 14400, or 4 hours). At a start where the entry is older than that, Claude Code discards it and connects the server at startup, as it does with the cache off. Claude Code caps the value at 7 days. Before v2.1.238, the default was 86400, or 24 hours, and Claude Code didn't cap the value | +| `MCP_DISCOVERY_CACHE_STRIKES` | At a start where a [discovery-cache](/docs/en/mcp#server-status-detail) entry is older than `MCP_DISCOVERY_CACHE_TTL_S`, Claude Code refreshes it in the background. This variable sets how many refreshes in a row can fail before Claude Code discards the entry and connects the server at the next start instead (default: 1). Raise it if your network connection drops occasionally, so that one failed refresh doesn't discard the entry. Requires Claude Code v2.1.238 or later | +| `MCP_DISCOVERY_CACHE_TTL_S` | Seconds for which Claude Code uses a [discovery-cache](/docs/en/mcp#server-status-detail) entry without refreshing it (default: 900). At a start where the entry is older than that, Claude Code still uses it but refreshes it in the background. Once the entry is older than `MCP_DISCOVERY_CACHE_MAX_STALE_S`, Claude Code discards it instead. Claude Code caps the value at `MCP_DISCOVERY_CACHE_MAX_STALE_S`, which is 4 hours by default. Before v2.1.238, Claude Code didn't cap the value | | `MCP_OAUTH_CALLBACK_PORT` | Fixed port for the OAuth redirect callback, as an alternative to `--callback-port` when adding an MCP server with [pre-configured credentials](/docs/en/mcp#use-pre-configured-oauth-credentials) | +| `MCP_PROTOCOL_NEGOTIATION` | On the [v2 MCP client runtime](/docs/en/mcp#mcp-client-runtimes) only, whether Claude Code probes servers for MCP protocol revision 2026-07-28. Set `auto` to probe HTTP, claude.ai connector, and stdio servers; a server that doesn't answer the probe connects on the earlier protocol instead, as SSE and WebSocket servers always do. Set `legacy` to skip the probe for every server. Without the variable, Claude Code probes HTTP, claude.ai connector, and stdio servers on Claude Code v2.1.232 or later, with the exceptions the [MCP client runtimes](/docs/en/mcp#mcp-client-runtimes) section lists. Any other value is ignored with a warning in the debug log. Requires Claude Code v2.1.221 or later | | `MCP_REMOTE_SERVER_CONNECTION_BATCH_SIZE` | Maximum number of remote MCP servers (HTTP/SSE) to connect in parallel during startup (default: 20) | -| `MCP_SDK_GENERATION` | Pin which MCP client runtime this process uses, the implementation behind [MCP server connections](/docs/en/mcp), while Claude Code migrates from its v1 runtime to v2. Set `v1` to stay on the current runtime or `v2` to opt in early. Without the variable, a gradual rollout decides, and defaults to v1. On Claude Code v2.1.221 or later, the v2 runtime checks the issuer an MCP OAuth server returns in its authorization response and fails the sign-in with an error that begins `Issuer mismatch in authorization response` when it doesn't match. The v1 runtime doesn't run this check. If you set an unrecognized value, Claude Code ignores it and writes a warning to the debug log. Claude Code reads the value once per process. Requires Claude Code v2.1.218 or later | +| `MCP_SDK_GENERATION` | Pin which [MCP client runtime](/docs/en/mcp#mcp-client-runtimes) this process connects to MCP servers with: `v1`, built on MCP TypeScript SDK 1.x, or `v2`, built on [MCP TypeScript SDK 2.0](https://ts.sdk.modelcontextprotocol.io/v2/). Without the variable, Claude Code uses v2 on Claude Code v2.1.232 or later, except where that section says it uses v1. On Claude Code v2.1.221 or later, the v2 runtime checks the issuer an MCP OAuth server returns in its authorization response and fails the sign-in with an error that begins `Issuer mismatch in authorization response` when it doesn't match. The v1 runtime doesn't run this check. If you set an unrecognized value, Claude Code ignores it and writes a warning to the debug log. Claude Code reads the value once per process. Requires Claude Code v2.1.218 or later | | `MCP_SERVER_CONNECTION_BATCH_SIZE` | Maximum number of local MCP servers (stdio) to connect in parallel during startup (default: 3) | | `MCP_TIMEOUT` | Timeout in milliseconds for MCP server startup (default: 30000, or 30 seconds) | | `MCP_TOOL_TIMEOUT` | Timeout in milliseconds for MCP tool execution (default: 100000000, about 28 hours). For an HTTP, SSE, or claude.ai connector server, each request also times out after 60 seconds by default; set this variable, or the per-server `timeout`, above 60000 to raise that per-request limit. A lower value still shortens the overall tool-execution timeout but leaves the per-request limit at 60 seconds. Stdio and WebSocket servers have no per-request timer. A per-server `timeout` field in `.mcp.json` overrides this for that server. A per-server `timeout` of at least 1000 also sets the minimum idle window for that server's tool calls, so `CLAUDE_CODE_MCP_TOOL_IDLE_TIMEOUT` never aborts them sooner; this floor requires Claude Code v2.1.203 or later. For the env variable, values below 1000 are floored to one second; for the per-server field, values below 1000 are ignored | @@ -481,7 +488,9 @@ Claude Code turns some features on through feature flags it fetches from Anthrop * Use [the advisor tool](/docs/en/advisor#requirements) * Let [Claude choose the `/loop` interval](/docs/en/scheduled-tasks#let-claude-choose-the-interval); Claude Code runs a `/loop` prompt with no interval on the fixed 10-minute schedule instead * Run [the built-in `/loop` maintenance prompt](/docs/en/scheduled-tasks#run-the-built-in-maintenance-prompt); Claude Code shows the usage message instead when you run `/loop` with no prompt +* Read or reply to [comments on an artifact](/docs/en/artifacts#collect-comments-on-an-artifact), unless you set `CLAUDE_CODE_ARTIFACT_COMMENTS=1`; for Claude to reply to sent comments on its own, also set `CLAUDE_CODE_ARTIFACT_COMMENTS_AUTOREACT=1`. Neither override helps under `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC`, which [turns artifacts off entirely](/docs/en/artifacts#availability) * Have Claude Code refresh the [PR review status badge](/docs/en/interactive-mode#pr-review-status) less often while you're idle; Claude Code refreshes it every 60 seconds instead +* Get the [v2 MCP client runtime](/docs/en/mcp#mcp-client-runtimes) and its protocol probe without setting `MCP_SDK_GENERATION` and `MCP_PROTOCOL_NEGOTIATION`; Claude Code uses the v1 runtime unless you set `MCP_SDK_GENERATION=v2`, and skips the probe unless you set `MCP_PROTOCOL_NEGOTIATION=auto` With fetching off, you can still type `/code-review` yourself, but [Claude can't start the review on its own, and a scheduled `/code-review` reaches Claude as plain text](/docs/en/code-review#let-claude-start-the-review) instead of running the review. diff --git a/content/en/docs/claude-code/errors.md b/content/en/docs/claude-code/errors.md index de40cb23b0..faf068b7d7 100644 --- a/content/en/docs/claude-code/errors.md +++ b/content/en/docs/claude-code/errors.md @@ -16,7 +16,7 @@ Except for [Wrapper and IDE errors](#wrapper-and-ide-errors), which the launchin ## Find your error -Match the message you see in your terminal to a section below. +Match the message you see to a section below. | Message | Section | | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------- | @@ -58,7 +58,10 @@ Match the message you see in your terminal to a section below. | `Claude.ai login expired` | [Authentication](#remote-control-couldnt-refresh-your-login) | | `Claude.ai login was rejected — run /login, then /remote-control` | [Authentication](#remote-control-couldnt-refresh-your-login) | | `OAuth token unavailable — run /login to restore Remote Control` | [Authentication](#remote-control-couldnt-refresh-your-login) | +| `Signed out of Claude — run /login, then /remote-control` | [Authentication](#remote-control-couldnt-refresh-your-login) | | `signed-in claude.ai account or organization changed on this machine` | [Authentication](#remote-control-stopped-because-the-signed-in-account-changed) | +| `Remote Control stopped — the app running this session is now signed in to a different Claude account` | [Authentication](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) | +| `Remote Control stopped — the app running this session is signed out of Claude` | [Authentication](#remote-control-stopped-because-the-app-running-the-session-signed-out-or-switched-accounts) | | `OAuth token revoked` / `OAuth token has expired` | [Authentication](#oauth-token-revoked-or-expired) | | `API Error: 401 Invalid authentication credentials` | [Authentication](#api-error-401-invalid-authentication-credentials) | | `Login expired · Please run /login` | [Authentication](#login-expired) | @@ -80,6 +83,7 @@ Match the message you see in your terminal to a section below. | `SSL certificate verification failed` | [Network](#ssl-certificate-errors) | | `SSL certificate error (...)` during login or startup | [Network](#ssl-certificate-errors) | | `403` with `x-deny-reason: host_not_allowed` in a cloud or routine session | [Network](#host-not-allowed-in-a-cloud-session) | +| `proxy refused the connection` | [Network](#the-proxy-refused-the-connection) | | `403` with `This GraphQL query is not enabled for this session` in a cloud session | [GitHub proxy](/docs/en/cloud-environments#github-proxy) | | `Couldn't reconnect to your Remote Control session` | [Network](#couldnt-reconnect-to-your-remote-control-session) | | `N sessions ended while this machine was offline — the environment was cleaned up on the server and can't be resumed.` | [Network](#sessions-ended-while-this-machine-was-offline) | @@ -161,6 +165,7 @@ Match the message you see in your terminal to a section below. | `Transcript saving is off — CLAUDE_CODE_SKIP_PROMPT_HISTORY is set` | [Session saving warnings](#transcript-saving-is-off-skip-prompt-history) | | `Transcript saving is off — inherited CLAUDE_CODE_CHILD_SESSION marker` | [Session saving warnings](#transcript-saving-is-off-child-session-marker) | | `Ignoring N permissions.allow entries from ... this workspace has not been trusted` | [Configuration warnings](#workspace-has-not-been-trusted) | +| `headersHelper not run — this workspace has no persisted trust` | [Configuration warnings](#headershelper-not-run) | | `... is not matched by file permission checks` | [Configuration warnings](#is-not-matched-by-file-permission-checks) | | `CLAUDE_CODE_DISABLE_1M_CONTEXT is set, but the 200K limit isn't enforced` | [Configuration warnings](#the-200k-limit-isnt-enforced) | | `[claude-code:unrecognized_model]` | [Configuration warnings](#unrecognized-model-id-on-a-request) | @@ -732,7 +737,11 @@ A second sentence explains what routed the session away from the Anthropic API; Remote Control couldn't refresh your login -Claude Code runs a live [Remote Control](/docs/en/remote-control) connection on short-lived credentials that it obtains and renews using your saved claude.ai login. When Claude Code can't produce a login token that claude.ai accepts, whether while connecting or mid-session, it stops Remote Control and shows the reason in a warning and a transcript line that starts with `Remote Control disconnected`. Your local session keeps running without Remote Control. +Claude Code runs a live [Remote Control](/docs/en/remote-control) connection on short-lived credentials that it obtains and renews using your saved claude.ai login. When claude.ai stops accepting that login, or Claude Code has no saved login left, Claude Code stops Remote Control and needs you to sign in again. Either failure can happen while Claude Code is still connecting or later, when it renews the credentials. + +When Claude Code asks the login service to refresh your saved login and gets no answer, it keeps Remote Control running and tries the refresh again while the connection's current credential is still valid. A refresh gets no answer when Claude Code can't reach the login service, the request times out, or the service fails without rejecting your login. If the login service still isn't answering when that credential expires, Claude Code stops Remote Control and reports `OAuth token refresh failed`. + +When Claude Code stops Remote Control, it shows the reason in a warning and in a transcript line that starts with `Remote Control disconnected`. Your local session keeps running without Remote Control. This section covers these lines: ```text theme={null} Remote Control disconnected — Claude.ai login expired — run /login to restore Remote Control @@ -741,14 +750,16 @@ Remote Control disconnected — Claude.ai login was rejected — run /login, the Remote Control disconnected — OAuth token unavailable — run /login to restore Remote Control Remote Control disconnected — OAuth token refresh failed — run /login to re-authenticate Remote Control disconnected — JWT refresh failed: no OAuth token — run /login +Remote Control disconnected — Signed out of Claude — run /login, then /remote-control ``` -The middle of the message names what failed: +Claude Code names the cause in the middle of the message: * `Claude.ai login expired` and `Claude.ai login was rejected`: claude.ai no longer accepts your saved login token, because it expired or was revoked * `OAuth token unavailable`: Claude Code had no saved login token when the connection's credential came due for renewal -* `OAuth token refresh failed`: Claude Code tried to refresh the saved login and the refresh failed, typically because the OAuth service rejected the stored refresh token +* `OAuth token refresh failed`: claude.ai rejected your saved login token while Claude Code was reconnecting, and refreshing the token produced no new one * `JWT refresh failed: no OAuth token`: Claude Code found no saved login token to renew with +* `Signed out of Claude`: you signed out on this machine, for example by running `/logout` in another terminal, so Claude Code has no saved login left to renew the connection with **What to do:** @@ -757,6 +768,8 @@ The middle of the message names what failed: Before v2.1.224, `OAuth token refresh failed — run /login to re-authenticate` read `OAuth token refresh failed — re-authenticate, then re-enable Remote Control`, and `JWT refresh failed: no OAuth token — run /login` read `no OAuth token available for recovery (code )`. The `Claude.ai login expired`, `Claude.ai login was rejected`, and `OAuth token unavailable` messages were added in v2.1.225. +Before v2.1.238, Claude Code reported the cases that now say `Signed out of Claude` as `JWT refresh failed: no OAuth token — run /login`, and stopped Remote Control with `Claude.ai login expired — run /login to restore Remote Control` as soon as one login refresh got no answer. +

Remote Control stopped because the signed-in account changed

@@ -778,6 +791,26 @@ Claude Code stops the Remote Control session as soon as claude.ai confirms that Before v2.1.234, Claude Code didn't notice when you switched to a different account or organization outside the Claude Code session. Claude Code kept the Remote Control session connected until a later request to the Remote Control server failed with `Remote Control server rejected the request (HTTP 404)`. That failure could come hours after the switch. +

+ Remote Control stopped because the app running the session signed out or switched accounts +

+ +When the Claude desktop app or an IDE hosts your session, Claude Code gets its login token from that app rather than from `/login`. When claude.ai rejects that token, Claude Code asks the app for a new one. If the app answers that it's signed out, or that it's now signed in to a different Claude account, Claude Code ends the [Remote Control](/docs/en/remote-control) session and sends the app one of these lines: + +```text theme={null} +Remote Control stopped — the app running this session is now signed in to a different Claude account +Remote Control stopped — the app running this session is signed out of Claude. Sign in there, then turn Remote Control back on +``` + +Your local session keeps running without Remote Control. + +**What to do:** + +* If the app is signed out, sign in to it again, then turn Remote Control back on in the app +* If the app switched accounts, Claude Code can't continue the ended session under the new account. Start a new Remote Control session under that account. + +Before v2.1.238, Claude Code sent the app the `run /login` messages listed under [Remote Control couldn't refresh your login](#remote-control-couldnt-refresh-your-login) in both cases. + ### OAuth token revoked or expired Your saved login is no longer valid. A revoked token means you signed out everywhere or an admin removed access; an expired token means the automatic refresh failed mid-session. @@ -1075,6 +1108,32 @@ This is not a client-side network problem. Cloud sessions and [routines](/docs/e See [Network access](/docs/en/cloud-environments#network-access) for access levels and the default allowlist. Local CLI sessions are not affected by this policy. +

+ The proxy refused the connection +

+ +You see this message when Claude reads an [artifact](/docs/en/artifacts) through the proxy you set in `HTTPS_PROXY` or a related [proxy variable](/docs/en/network-config#environment-variables). Artifact content comes from `*.frame.claudeusercontent.com`, so Claude Code first sends the proxy a `CONNECT` request asking it to open a tunnel to that host. When the proxy refuses, nothing reaches the host, and the message carries the proxy's HTTP status: + +```text theme={null} +artifact content fetch failed (proxy refused the connection: HTTP 407) +artifact content fetch failed (proxy refused the connection: HTTP 403) +the proxy refused the connection to the artifact's content host (HTTP 502) +``` + +The status is the proxy's answer to the `CONNECT`. The host never answered, so each status points at a different fix: + +* `HTTP 407`: the proxy requires credentials it didn't get. Put them in the proxy URL, as [Basic authentication](/docs/en/network-config#basic-authentication) shows. +* `HTTP 403`: the proxy refuses to tunnel to `*.frame.claudeusercontent.com`. Ask whoever runs the proxy to allow that host, which [Network access requirements](/docs/en/network-config#network-access-requirements) lists. +* Any other status, such as `HTTP 502`: the proxy didn't open the tunnel for its own reason, such as failing to reach the host. Look the status up in the proxy's logs. +* `unreadable reply` in place of a status: whatever is at the proxy address didn't answer with an HTTP status line. Check that the address is an HTTP proxy. + +**What to do:** + +* Check the address and credentials in the proxy variable, as [Proxy configuration](/docs/en/network-config#proxy-configuration) describes, then run `curl -x http://proxy.example.com:8080 -I https://api.anthropic.com` from the shell you start Claude Code in, using your own proxy URL. On Windows PowerShell, run `curl.exe`. If this probe fails the same way, fix the proxy setup first. If it succeeds, the refusal is specific to the artifact host. +* If your network lets Claude Code reach the artifact host directly, add `.claudeusercontent.com` to [`NO_PROXY`](/docs/en/network-config#environment-variables). + +Before v2.1.238, Claude Code reported a refused tunnel as a generic network error. +

Couldn't reconnect to your Remote Control session

@@ -1821,7 +1880,7 @@ Each reason the message can show in parentheses: **What to do:** -* In a session started without those restrictions, run `/tui fullscreen`, or `/tui default` to switch back. Claude Code saves the [`tui` setting](/docs/en/settings#available-settings) there and uses it for every later session +* In a session started without those restrictions, run `/tui fullscreen`, or `/tui default` to switch back. Claude Code saves the [`tui` setting](/docs/en/settings#available-settings) there ## Plugin errors @@ -2291,6 +2350,24 @@ Ignoring 2 permissions.allow entries from .claude/settings.local.json: this work * In [non-interactive mode](/docs/en/headless) with `-p` no dialog is shown. Set the `hasTrustDialogAccepted` entry in `~/.claude.json` using the exact `projects` key the message prints. * If the message names `.claude/settings.local.json` and you started Claude Code outside a git repository or in your home directory, update to v2.1.200 or later. Versions 2.1.196 through 2.1.199 treated your own `.claude/settings.local.json` as repository-supplied in those workspaces. On v2.1.207 and later, updating isn't enough outside a git repository if you haven't trusted the folder: determining that a folder isn't inside a repository runs git, and Claude Code runs that check only after you accept the trust dialog, so use the first step. Your home directory and any other [configuration home](/docs/en/permissions#project-allow-rules-and-workspace-trust) are exempt and don't wait for the dialog. See [Project allow rules and workspace trust](/docs/en/permissions#project-allow-rules-and-workspace-trust). +### headersHelper not run + +Claude Code connected an MCP server with its static `headers` alone and skipped the server's [`headersHelper`](/docs/en/mcp#use-dynamic-headers-for-custom-authentication), because the helper is a shell command and the folder has no saved trust. A folder gets saved trust when you set its entry in `~/.claude.json` by hand or, outside your home directory, when you accept the trust dialog for it in an interactive session. See [Trust a folder before its headersHelper runs](/docs/en/mcp#trust-a-folder-before-its-headershelper-runs) for which servers this check applies to. + +Claude Code writes this line in [non-interactive mode](/docs/en/headless) only, once per server. In an interactive session it writes the same refusal to the debug log instead. + +```text theme={null} +MCP server 'internal-api': headersHelper not run — this workspace has no persisted trust; accept the trust dialog here once interactively, or set projects["/Users/you/project"].hasTrustDialogAccepted in /Users/you/.claude.json. +``` + +The `projects` key the message prints is the folder [Project allow rules and workspace trust](/docs/en/permissions#project-allow-rules-and-workspace-trust) says Claude Code keys the trust on. Accepting the trust dialog for a parent folder doesn't satisfy the check, and a `-p` or SDK session doesn't satisfy it either. + +**What to do:** + +* Run `claude` in the folder the message names, accept the trust dialog, then run your `-p` or SDK command again +* Set the `hasTrustDialogAccepted` entry in `~/.claude.json` yourself, using the exact `projects` key the message prints +* If you started the session in your home directory, work from a project directory you have trusted. When you accept the trust dialog in your home directory, Claude Code holds that trust for the current session only. + ### Is not matched by file permission checks Claude Code found a `Write`, `NotebookEdit`, `MultiEdit`, or `Glob` [permission rule](/docs/en/permissions#read-and-edit) with a path in one of your [settings files](/docs/en/settings#settings-files), in [managed settings](/docs/en/permissions#managed-settings), or in a `--allowedTools`, `--disallowedTools`, or `--settings` flag value. It checks file permissions against `Edit` and `Read` rules only, so it never consults a path rule that names one of the other file tools. It keeps the rule and changes nothing else; the warning names the rule, its source in parentheses, and the replacement to write: diff --git a/content/en/docs/claude-code/fullscreen.md b/content/en/docs/claude-code/fullscreen.md index 43c108cff3..f742bfa7bd 100644 --- a/content/en/docs/claude-code/fullscreen.md +++ b/content/en/docs/claude-code/fullscreen.md @@ -31,7 +31,7 @@ Claude Code carries these into the relaunched session: * If you rewound to before your first message, Claude Code relaunches with an empty conversation * Your [permission mode](/docs/en/permission-modes) and [effort level](/docs/en/model-config#adjust-effort-level) * The model you last picked with [`/model`](/docs/en/model-config#setting-your-model) -* Rules you passed with [`--allowed-tools` or `--disallowed-tools`](/docs/en/cli-reference#cli-flags) +* Rules you passed with [`--allowed-tools` or `--disallowed-tools`](/docs/en/cli-reference#cli-flags), and your `--agent`, `--agents`, and `--append-system-prompt` flags Claude Code declines to relaunch if the session has a restriction it can't pass to the restarted process. Restrictions it can't pass include: @@ -41,7 +41,7 @@ Claude Code declines to relaunch if the session has a restriction it can't pass In that case Claude Code prints [`Cannot switch renderers in this session`](/docs/en/errors#cannot-switch-renderers-in-this-session) with the reasons. It doesn't switch or save anything. - If you first used Claude Code before May 6, 2026 and haven't saved a `tui` setting, Claude Code may open a dialog at startup offering the switch. If you accept, Claude Code saves the setting and relaunches the same way `/tui fullscreen` does, carrying the same session state. + If you first used Claude Code before May 6, 2026 and haven't saved a `tui` setting, Claude Code may open a dialog at startup offering the switch. If you accept, Claude Code relaunches the same way `/tui fullscreen` does, carrying the same session state, and saves the setting once the relaunched session has [started successfully](#fullscreen-renderer-didnt-finish-starting). You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code: @@ -50,7 +50,7 @@ You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starti CLAUDE_CODE_NO_FLICKER=1 claude ``` -The `tui` setting and the environment variable are equivalent. The `/tui` command clears `CLAUDE_CODE_NO_FLICKER` from the relaunched process so the setting it writes takes effect. +Either one turns fullscreen rendering on. After a [failed fullscreen start](#fullscreen-renderer-didnt-finish-starting), Claude Code still honors the variable but not the setting. The `/tui` command clears `CLAUDE_CODE_NO_FLICKER` from the relaunched process so the setting it writes takes effect. ## What changes @@ -182,7 +182,9 @@ Your terminal's `Cmd+f` and tmux search don't see the conversation because it li ## Clear the conversation -Press `Ctrl+L` twice within two seconds to run `/clear` and start a new conversation. The first press redraws the screen and shows a hint; the second press clears the conversation. On macOS, double-pressing `Cmd+K` also runs `/clear`. +Run `/clear` to start a new conversation. Pressing `Ctrl+L` or `Cmd+K` doesn't clear the conversation; Claude Code redraws the screen and keeps it. Before v2.1.238, Claude Code ran `/clear` when you pressed `Ctrl+L` or `Cmd+K` twice within two seconds. + +On iTerm2 and Terminal.app, your terminal handles `Cmd+K` itself and clears its own screen without telling Claude Code. Claude Code detects the cleared screen and repaints the conversation. ## Use with tmux @@ -260,6 +262,28 @@ CLAUDE_CODE_ALT_SCREEN_FULL_REPAINT=1 claude On Windows, Claude Code already enables full repaint automatically for background sessions and [agent view](/docs/en/agent-view), so you only need to set the variable for an interactive fullscreen session you launched directly. +

+ `Claude Code's fullscreen renderer didn't finish starting last time` appears at startup +

+ +If a fullscreen session on this machine crashes before it has started successfully, Claude Code starts your next session in the classic renderer and prints one of two lines. A session has started successfully once it has drawn its first frame and then either stayed up for 10 seconds or you ended it with `/exit`, Ctrl+C, or Ctrl+D. The line you see tells you what Claude Code does after this session: + +* After one failed start, you see `Claude Code's fullscreen renderer didn't finish starting last time on this machine`. Claude Code tries fullscreen rendering again in the next session you start +* After two failed starts, you see `Claude Code's fullscreen renderer has repeatedly failed to start on this machine`. Claude Code keeps using the classic renderer until you update Claude Code or run `/tui fullscreen`, and prints nothing in those later sessions + +To confirm that a failed start is why you're in the classic renderer, run `/tui` with no argument. While a failed start is the reason, the `Current renderer` line says so. + +To keep the classic renderer, run `/tui default`, which saves the `tui` setting without relaunching. To try fullscreen rendering again, run `/tui fullscreen`. If that session doesn't finish starting either, [report the problem](#research-preview). + +Before v2.1.236, Claude Code kept starting sessions in fullscreen rendering after a failed start. + +#### How Claude Code counts failed starts + +* Sessions that count: only sessions that started in fullscreen rendering because your `tui` setting says so, because you accepted the [startup dialog](#enable-fullscreen-rendering), or because your account renders fullscreen by default +* `CLAUDE_CODE_NO_FLICKER=1`: if you set it, Claude Code renders that session fullscreen even after a failed start, and doesn't count it +* Count reset: Claude Code counts failed starts per Claude Code version, and a successful fullscreen start resets the count +* Startup dialog: if you accepted the dialog and the relaunched session crashed, Claude Code prints neither line and doesn't show the dialog again on this Claude Code version + ## Research preview Fullscreen rendering is a research preview feature. It has been tested on common terminal emulators, but you may encounter rendering issues on less common terminals or unusual configurations. diff --git a/content/en/docs/claude-code/glossary.md b/content/en/docs/claude-code/glossary.md index 310c853c88..d9ca24859f 100644 --- a/content/en/docs/claude-code/glossary.md +++ b/content/en/docs/claude-code/glossary.md @@ -48,7 +48,7 @@ Learn more: [Auto memory](/docs/en/memory#auto-memory) ### Auto mode -A [permission mode](#permission-mode) where a separate classifier model reviews actions instead of you, so Claude Code runs most of them without asking you. Claude Code still asks you before actions your explicit ask rules match. On Pro, Max, and Team plans, auto mode is the [built-in starting permission mode](/docs/en/permission-modes#which-mode-a-session-starts-in) for interactive terminal and VS Code sessions. The classifier blocks scope escalation, untrusted infrastructure, and [prompt injection](#prompt-injection). It never sees tool results, so injected instructions can't influence its decisions. +A [permission mode](#permission-mode) where a separate classifier model reviews actions instead of you, so Claude Code runs most of them without asking you. Claude Code still asks you before actions your explicit ask rules match. On Pro, Max, and Team plans, auto mode is the [built-in starting permission mode](/docs/en/permission-modes#which-mode-a-session-starts-in) for interactive terminal and VS Code sessions. The classifier blocks scope escalation, untrusted infrastructure, and [prompt injection](#prompt-injection). Tool results are stripped from what it sees, so hostile content in a file or web page can't manipulate it directly. Learn more: [Eliminate prompts with auto mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) @@ -56,7 +56,7 @@ Learn more: [Eliminate prompts with auto mode](/docs/en/permission-modes#elimina ### Bare mode -With `--bare`, Claude Code starts without loading hooks, skills, plugins, MCP servers, auto memory, or CLAUDE.md. Recommended for CI and scripted calls where you need the same result on every machine. +With `--bare`, Claude Code starts without loading hooks, skills, custom commands, subagents, plugins, MCP servers, auto memory, or CLAUDE.md, apart from skills in a directory you pass with `--add-dir`. Recommended for CI and scripted calls where you need the same result on every machine. Learn more: [Start faster with bare mode](/docs/en/headless#start-faster-with-bare-mode) @@ -194,7 +194,7 @@ Learn more: [Run Claude Code programmatically](/docs/en/headless) ### Output style -A configuration that modifies Claude's system prompt to change response behavior, tone, or format. Output styles turn off the software-engineering-specific parts of the default system prompt, unlike [CLAUDE.md](#claude-md) which is delivered as a user message following the system prompt. Built-in styles include Default, Proactive, Explanatory, and Learning. +A configuration that modifies Claude's system prompt to change response behavior, tone, or format. Unlike [CLAUDE.md](#claude-md), which Claude Code delivers as a user message after the system prompt, an output style changes the system prompt itself. Custom styles leave out Claude Code's built-in software engineering instructions unless you set `keep-coding-instructions` to `true`, and the built-in Default, Proactive, Concise, Explanatory, and Learning styles keep them. Learn more: [Output styles](/docs/en/output-styles) @@ -234,7 +234,7 @@ Learn more: [The `.claude` directory](/docs/en/claude-directory) ### Prompt injection -Hostile instructions embedded in a file, web page, or tool result that attempt to redirect Claude toward actions you never asked for. Claude Code's defenses include the permission system, command injection detection, and trust verification. [Auto mode](#auto-mode) adds a server-side probe that scans tool results for suspicious content and a classifier that never sees tool results, so injected text cannot influence its approval decisions. +Hostile instructions embedded in a file, web page, or tool result that attempt to redirect Claude toward actions you never asked for. Claude Code's defenses include the permission system, command injection detection, and trust verification. [Auto mode](#auto-mode) adds a server-side probe that scans tool results for suspicious content and a classifier that reviews actions with tool results stripped, so injected text can't manipulate it directly. Learn more: [Protect against prompt injection](/docs/en/security#protect-against-prompt-injection) diff --git a/content/en/docs/claude-code/goal.md b/content/en/docs/claude-code/goal.md index a8ff72f649..c8c2c18cf9 100644 --- a/content/en/docs/claude-code/goal.md +++ b/content/en/docs/claude-code/goal.md @@ -19,11 +19,11 @@ Use a goal for substantial work with a verifiable end state: Three approaches keep the current session running between prompts. Pick based on what should start the next turn: -| Approach | Next turn starts when | Stops when | -| :------------------------------------------------------------------ | :------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `/goal` | The previous turn finishes | A model confirms the condition is met or judges it impossible, or a turn fails on [an error you have to fix](#errors-you-have-to-fix-clear-the-goal), or you run [`/goal clear`](#clear-a-goal) | -| [`/loop`](/docs/en/scheduled-tasks#run-a-prompt-repeatedly-with-%2Floop) | A time interval elapses | You stop it, or Claude decides the work is done | -| [Stop hook](/docs/en/hooks-guide#prompt-based-hooks) | The previous turn finishes | Your own script or prompt decides | +| Approach | Next turn starts when | Stops when | +| :------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `/goal` | The previous turn finishes, or an [idle check-in](#background-work-defers-evaluation) comes due while background work keeps the goal waiting | A model confirms the condition is met or judges it impossible, or a turn fails on [an error you have to fix](#errors-you-have-to-fix-clear-the-goal), or you run [`/goal clear`](#clear-a-goal) | +| [`/loop`](/docs/en/scheduled-tasks#run-a-prompt-repeatedly-with-%2Floop) | A time interval elapses | You stop it, or Claude decides the work is done | +| [Stop hook](/docs/en/hooks-guide#prompt-based-hooks) | The previous turn finishes | Your own script or prompt decides | `/goal` and a Stop hook both fire after every turn. `/goal` is a session-scoped shortcut: you type a condition and it's active for the current session only. A Stop hook lives in your settings file, applies to every session in its scope, and can run a script for deterministic checks or a prompt for model-evaluated ones. @@ -138,7 +138,12 @@ After any other failure, including transient errors such as rate limits and over If a subagent or a background shell command is still running when a turn ends, Claude Code skips the evaluation for that turn. It evaluates at the end of the next turn that finishes with no background work running. When the background work finishes, Claude Code delivers the result to Claude as a new turn, so you don't have to prompt. -When a turn ends and background work has kept the goal waiting for 30 minutes or more, Claude Code asks Claude to check on that work. Claude Code lists the running tasks and asks Claude to read their output, keep waiting if they're progressing, and fix or stop any that are stuck. After each further 30 minutes of waiting, Claude Code asks again at the next turn end. To change the interval, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](/docs/en/env-vars); set it to `0` to turn check-ins off. Check-ins require Claude Code v2.1.234 or later. +Once background work has kept the goal waiting for 30 minutes, a check-in is due. In the check-in, Claude Code lists the running tasks and asks Claude to read their output, keep waiting if they're progressing, and fix or stop any that are stuck. After each check-in, the 30 minutes start again. Claude Code delivers a due check-in, the first one included, in one of two ways: + +* **When a turn ends**: Claude Code delivers the check-in at the end of the next turn that finishes with the work still running. In a non-interactive session, such as one started with `-p`, this is the only way Claude Code delivers check-ins. +* **While the session is idle**: in an interactive session, Claude Code also starts a turn on its own to deliver the check-in instead of waiting for your next prompt. After the first check-in, Claude Code waits twice as long before each later idle check-in, up to four times the interval: with the default, 1 hour after the first check-in, then every 2 hours. If the background work has stopped without reporting a result, Claude Code asks Claude to continue toward the goal. Idle check-ins require Claude Code v2.1.236 or later. + +To change the intervals, set [`CLAUDE_CODE_GOAL_CHECKIN_MINUTES`](/docs/en/env-vars). Claude Code uses your value in place of the 30-minute interval and scales the idle intervals with it. Set it to `0` to turn check-ins off. Check-ins require Claude Code v2.1.234 or later. ### Evaluation model and cost diff --git a/content/en/docs/claude-code/google-vertex-ai.md b/content/en/docs/claude-code/google-vertex-ai.md index dbb12431d0..7cefaa5c09 100644 --- a/content/en/docs/claude-code/google-vertex-ai.md +++ b/content/en/docs/claude-code/google-vertex-ai.md @@ -231,7 +231,7 @@ Claude Code uses these default models when no pinning variables are set: Background tasks such as session title generation use the small/fast model, normally a Haiku-class model. On Google Cloud's Agent Platform, Claude Code uses the default Sonnet model for background tasks because Haiku may not be enabled in every project or region. Two selections change which model carries them: -* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` counts as a selection too, because the built-in Sonnet model may not be enabled in a project that steers its own Opus. +* When you select a primary model with `--model`, `ANTHROPIC_MODEL`, or the `model` setting, background tasks use that model. When Claude Code starts the session on the model you set with [`ANTHROPIC_DEFAULT_MODEL`](/docs/en/model-config#set-a-default-model-for-new-sessions), background tasks use that model too. Setting `ANTHROPIC_DEFAULT_OPUS_MODEL` without `ANTHROPIC_DEFAULT_SONNET_MODEL` also counts as a selection, because the built-in Sonnet model may not be enabled in a project that steers its own Opus. * To use Haiku for background tasks, set `ANTHROPIC_DEFAULT_HAIKU_MODEL` to a model ID that is available in your project. @@ -259,7 +259,7 @@ If you have pinned a model version that is older than the current Claude Code de If you have not pinned a model and the current default is unavailable in your project, Claude Code falls back for the current session and shows a notice. It tries earlier versions of the default model first and, when the default is an Opus model and no Opus version is available, falls back to the default Sonnet model. The fallback is not persisted. Enable the newer model in [Model Garden](https://console.cloud.google.com/vertex-ai/model-garden) or [pin a version](#5-pin-model-versions) to make the choice permanent. -When you start the session on a specific Sonnet or Opus version, with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](/docs/en/settings), that version acts as the session's pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. +When you start the session on a specific Sonnet or Opus version, for example with `--model`, `ANTHROPIC_MODEL`, or the [`model` setting](/docs/en/settings), that version acts as the session's pinned default for the matching `sonnet` or `opus` alias. Claude Code skips the availability check for the built-in default your model replaces and starts on the model you configured, with no fallback notice. Model aliases such as `opus` don't act as pins, and neither does a model ID Claude Code doesn't recognize. diff --git a/content/en/docs/claude-code/headless.md b/content/en/docs/claude-code/headless.md index 5e57114303..f8365413cb 100644 --- a/content/en/docs/claude-code/headless.md +++ b/content/en/docs/claude-code/headless.md @@ -34,9 +34,9 @@ Claude Code exits with code 0 on success and a non-zero code when the run fails, ### Start faster with bare mode -Add `--bare` to reduce startup time by skipping auto-discovery of hooks, skills, plugins, MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` loads the same [context](/docs/en/how-claude-code-works#the-context-window) an interactive session would, including anything configured in the working directory or `~/.claude`. +Add `--bare` to reduce startup time by skipping auto-discovery of hooks, skills, custom commands, [subagents](/docs/en/sub-agents), plugins, MCP servers, auto memory, and CLAUDE.md. Without it, `claude -p` loads the same [context](/docs/en/how-claude-code-works#the-context-window) an interactive session would, including anything configured in the working directory or `~/.claude`. -Bare mode is useful for CI and scripts where you need the same result on every machine. A hook in a teammate's `~/.claude` or an MCP server in the project's `.mcp.json` won't run, because bare mode never reads them. +Bare mode is useful for CI and scripts where you need the same result on every machine. A hook in a teammate's `~/.claude` or an MCP server in the project's `.mcp.json` won't run, because bare mode never reads them. A directory you name with `--add-dir` is a partial exception: bare mode loads skills from its `.claude/skills/` folder, but still skips its `.claude/commands/` and `.claude/agents/` folders. [Skills from additional directories](/docs/en/skills#skills-from-additional-directories) covers what does and doesn't load. Without `--bare`, Claude Code runs the hooks in a project's `.claude/settings.json` even in a folder you've never trusted, because a `-p` session shows no workspace trust dialog. It also connects the servers in the project's `.mcp.json`, because a `-p` session can't show the per-server approval prompt either. [What runs before you trust a folder](/docs/en/permissions#what-runs-before-you-trust-a-folder) covers each kind of repository content under `-p` and how to keep it out. @@ -68,7 +68,9 @@ If Claude starts a [background Bash task](/docs/en/tools-reference#bash-tool-beh Background [subagents](/docs/en/sub-agents) and workflows are exempt from the five-second grace because their result is part of the final output, so `claude -p` waits for them to complete. From v2.1.182, that wait is capped at ten minutes by default so a stuck background agent cannot hold the process open indefinitely. Adjust the cap with [`CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS`](/docs/en/env-vars), or set it to `0` to wait without a limit. -If you stop a `claude -p` run with SIGTERM, for example from `kill`, a process supervisor, or an SDK host closing the session, Claude Code aborts the in-progress turn, terminates the process tree of any running Bash command, runs [`SessionEnd` hooks](/docs/en/hooks#sessionend), and exits with code 143. +### Stop a run with SIGTERM + +If you stop a `claude -p` run with SIGTERM, for example from `kill` or a process supervisor, Claude Code terminates the process tree of any running Bash command, runs [`SessionEnd` hooks](/docs/en/hooks#sessionend), and exits with code 143. It doesn't interrupt the in-progress turn or record a result for it: a command that was running is recorded as killed, a permission prompt that was waiting for an answer is left unanswered, and no new tool, model request, or hook other than `SessionEnd` is started once the process has begun exiting, so resuming the session picks up from that point. An SDK host that closes the session ends Claude Code's input first, which cancels a waiting prompt before any signal arrives; to end the turn cleanly yourself, send SIGINT, or the SDK's `interrupt()`, before stopping the process. ## Examples diff --git a/content/en/docs/claude-code/hooks.md b/content/en/docs/claude-code/hooks.md index 6f6e09bb97..9bd6e5e93c 100644 --- a/content/en/docs/claude-code/hooks.md +++ b/content/en/docs/claude-code/hooks.md @@ -582,10 +582,17 @@ In addition to the [common fields](#common-fields), prompt and agent hooks accep Use these placeholders to reference hook scripts relative to the project or plugin root, regardless of the working directory when the hook runs: -* `${CLAUDE_PROJECT_DIR}`: the project root. Claude Code also sets this variable in the environment of [stdio MCP servers](/docs/en/mcp#option-3-add-a-local-stdio-server) and plugin LSP servers. +* `${CLAUDE_PROJECT_DIR}`: the project root where the session started. Claude Code also sets this variable in the environment of [stdio MCP servers](/docs/en/mcp#option-3-add-a-local-stdio-server) and plugin LSP servers. * `${CLAUDE_PLUGIN_ROOT}`: the plugin's installation directory, for scripts bundled with a [plugin](/docs/en/plugins). Changes on each plugin update. * `${CLAUDE_PLUGIN_DATA}`: the plugin's [persistent data directory](/docs/en/plugins-reference#persistent-data-directory), for dependencies and state that should survive plugin updates. + + **Worktrees are different.** If Claude enters a [worktree](/docs/en/worktrees) during the session, Claude Code keeps `${CLAUDE_PROJECT_DIR}` where it was and passes the worktree path to your hooks a different way: + + * **`${CLAUDE_PROJECT_DIR}` stays put**: it still points at the project root where the session started, so a command such as `${CLAUDE_PROJECT_DIR}/.claude/hooks/check-style.sh` still runs the script in the main checkout. + * **`cwd` follows Claude**: the `cwd` field in the hook's [input JSON](#common-input-fields) is the worktree root after Claude enters a worktree, and the new directory after Claude runs `cd`. Read it when a hook needs to know which directory Claude is working in. + + Prefer [exec form](#exec-form-and-shell-form) for any hook that references a path placeholder. In shell form, wrap each placeholder in double quotes. @@ -2249,7 +2256,7 @@ Runs when a Claude Code subagent has finished responding. Matches on agent type, In addition to the [common input fields](#common-input-fields), SubagentStop hooks receive `stop_hook_active`, `agent_id`, `agent_type`, `agent_transcript_path`, and `last_assistant_message`. The `agent_type` field is the value used for matcher filtering. The `transcript_path` is the main session's transcript, while `agent_transcript_path` is the subagent's own transcript stored in a nested `subagents/` folder. The `last_assistant_message` field contains the text content of the subagent's final response, so hooks can access it without parsing the transcript file. -SubagentStop hooks also receive the `background_tasks` and `session_crons` arrays described under [Stop input](#stop-input), available in Claude Code v2.1.145 or later. Both arrays are scoped to the parent session, not the subagent. +SubagentStop hooks also receive the `background_tasks` and `session_crons` arrays described under [Stop input](#stop-input). Both arrays are scoped to the parent session, not the subagent. ```json theme={null} { @@ -2397,7 +2404,7 @@ In addition to the [common input fields](#common-input-fields), Stop hooks recei The `last_assistant_message` field contains the text content of Claude's final response, so hooks can access it without parsing the transcript file. For hooks that act on the just-completed turn, such as read-aloud or notification hooks, use this field rather than reading `transcript_path`: the transcript file isn't guaranteed to include the final message at Stop time on all versions. -The `background_tasks` and `session_crons` arrays, available in Claude Code v2.1.145 or later, let hooks distinguish "session is done" from "session is paused waiting for background work to wake it back up". Both arrays are present when the task registry is reachable and are empty when nothing is in flight or scheduled. +The `background_tasks` and `session_crons` arrays let hooks distinguish "session is done" from "session is paused waiting for background work to wake it back up". Both arrays are present when the task registry is reachable and are empty when nothing is in flight or scheduled. Each entry in `background_tasks` describes one in-flight task and uses these fields: diff --git a/content/en/docs/claude-code/interactive-mode.md b/content/en/docs/claude-code/interactive-mode.md index 0e30f62951..051d0874b8 100644 --- a/content/en/docs/claude-code/interactive-mode.md +++ b/content/en/docs/claude-code/interactive-mode.md @@ -16,28 +16,29 @@ ### General controls -| Shortcut | Description | Context | -| :------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `Ctrl+C` | Interrupt, or clear input | Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code | -| `Ctrl+X Ctrl+K` | Stop all running [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) in this session. Press twice within 3 seconds to confirm | Subagent control | -| `Ctrl+D` | Exit Claude Code session | The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead | -| `Ctrl+G` or `Ctrl+X Ctrl+E` | Open in default text editor | Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude's previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save | -| `Ctrl+L` | Redraw screen | Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank. In [fullscreen rendering](/docs/en/fullscreen#clear-the-conversation), if you press `Ctrl+L` once, Claude Code redraws the screen and also shows a hint that pressing it again runs `/clear`. If you press it twice within two seconds, Claude Code runs `/clear` and starts a new conversation | -| `Ctrl+O` | Toggle transcript viewer | Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like "Called slack 3 times" by default | -| `Ctrl+R` | Reverse search command history | Search through previous commands interactively | -| `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL) | Paste image from clipboard | Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` | -| `Ctrl+B` | Background running tasks | Backgrounds Bash commands and agents. Tmux users press twice | -| `Ctrl+T` | Toggle Claude's task checklist | Show or hide [Claude's to-do checklist](#task-list) in the status area. This is not the background-task view; use [`/tasks`](/docs/en/commands) to see running shells and subagents | -| `Ctrl+S` | Stash or restore prompt | With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content | -| `Ctrl+Z` | Suspend Claude Code | Unix only. Suspends the process to your shell; run `fg` to resume | -| `Left/Right arrows` | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus | -| `Up/Down arrows` or `Ctrl+P`/`Ctrl+N` | Move cursor or navigate command history | When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead [takes them back](#take-back-what-you-queued) | -| `Esc` | Interrupt Claude, or close a dialog | Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have [messages queued](#queue-messages-while-claude-works), Claude Code sends them next. When a dialog such as a permission prompt is open, `Esc` closes the dialog rather than interrupting Claude | -| `Esc` + `Esc` | Clear input draft, or rewind | When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](/docs/en/checkpointing) to restore or summarize code and conversation from a previous point | -| `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn't enable VT input mode | Cycle permission modes | Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](/docs/en/permission-modes). | -| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt | -| `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta | -| `Option+O` (macOS) or `Alt+O` (Windows/Linux) | Toggle fast mode | Enable or disable [fast mode](/docs/en/fast-mode) | +| Shortcut | Description | Context | +| :------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `Ctrl+C` | Interrupt, or clear input | Interrupts a running operation. If nothing is running, the first press clears the prompt input and a second press exits Claude Code | +| `Ctrl+X Ctrl+K` | Stop all running [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) in this session, and turn off [artifact auto-replies](/docs/en/artifacts#let-claude-reply-to-comments-on-its-own) for the rest of it. Press twice within 3 seconds to confirm | Subagent control | +| `Ctrl+D` | Exit Claude Code session | The first press shows a confirmation hint and a second press within 800ms exits. When the prompt has text, `Ctrl+D` deletes the character after the cursor instead | +| `Ctrl+G` or `Ctrl+X Ctrl+E` | Open in default text editor | Edit your prompt or custom response in your default text editor. `Ctrl+X Ctrl+E` is the readline-native binding. Turn on **Show last response in external editor** in `/config` to prepend Claude's previous reply as `#`-commented context above your prompt; Claude Code strips the comment block when you save | +| `Ctrl+L` | Redraw screen | Forces a full terminal redraw, keeping input and conversation history. Use this to recover if the display becomes garbled or partially blank | +| `Ctrl+O` | Toggle transcript viewer | Shows detailed tool usage and execution, with a timestamp and the model used on each assistant message. Also expands MCP calls, which collapse to a single line like "Called slack 3 times" by default | +| `Ctrl+R` | Reverse search command history | Search through previous commands interactively | +| `Ctrl+V` or `Cmd+V` (iTerm2) or `Alt+V` (Windows and WSL) | Paste image from clipboard | Inserts an `[Image #N]` chip at the cursor so you can reference it positionally in your prompt. On WSL, both `Ctrl+V` and `Alt+V` are bound; use `Alt+V` if your terminal intercepts `Ctrl+V` | +| `Ctrl+B` | Background running tasks | Backgrounds Bash commands and agents. Tmux users press twice | +| `Ctrl+T` | Toggle Claude's task checklist | Show or hide [Claude's to-do checklist](#task-list) in the status area. This is not the background-task view; use [`/tasks`](/docs/en/commands) to see running shells and subagents | +| `Ctrl+S` | Stash or restore prompt | With text in the input, stashes it and clears the prompt. Pressed again on an empty prompt, restores the stashed text, cursor position, and pasted content | +| `Ctrl+Z` | Suspend Claude Code | Unix only. Suspends the process to your shell; run `fg` to resume | +| `Left/Right arrows` | Cycle through dialog tabs | Navigate between tabs in permission dialogs and menus | +| `Tab` | Accept an autocomplete suggestion, or add a comment to a permission answer | While autocomplete suggestions are showing in the prompt input, accepts the selected suggestion. On most permission prompts, with **Yes** or **No** focused, opens a comment field on that option, and pressing it again closes the field. See [add a comment when you answer a permission prompt](/docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt) | +| `Up/Down arrows` or `Ctrl+P`/`Ctrl+N` | Move cursor or navigate command history | When the input spans more than one visual row, whether wrapped or multiline, first moves the cursor within the prompt. Once the cursor is on the first or last visual row, pressing again navigates command history. While you have messages queued, `Up` from the first row instead [takes them back](#take-back-what-you-queued) | +| `Esc` | Interrupt Claude, or close a dialog | Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far. If you have [messages queued](#queue-messages-while-claude-works), Claude Code sends them next. When a dialog is open, `Esc` closes the dialog. On a permission prompt, `Esc` declines the action, the same as [**No** without a comment](/docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt) | +| `Esc` + `Esc` | Clear input draft, or rewind | When the prompt input contains text, double `Esc` clears it and saves the draft to history so `Up` recalls it. When the input is empty, double `Esc` opens the [rewind menu](/docs/en/checkpointing) to restore or summarize code and conversation from a previous point | +| `Shift+Tab`, or `Alt+M` on Windows when the Node or Bun runtime doesn't enable VT input mode | Cycle permission modes | Cycle through `default` (labeled Manual in the mode indicator), `acceptEdits`, `plan`, and, when available, `bypassPermissions` and then `auto`. From `auto`, the first press switches to `default`. See [permission modes](/docs/en/permission-modes). On a file permission prompt, the same key closes an open [comment field](/docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt). With no field open, it selects the option that allows the action for the rest of the session, when the prompt offers that option | +| `Option+P` (macOS) or `Alt+P` (Windows/Linux) | Switch model | Switch models without clearing your prompt | +| `Option+T` (macOS) or `Alt+T` (Windows/Linux) | Toggle extended thinking | Enable or disable extended thinking mode. Has no effect on Fable 5, which always uses extended thinking. Works on macOS without configuring Option as Meta | +| `Option+O` (macOS) or `Alt+O` (Windows/Linux) | Toggle fast mode | Enable or disable [fast mode](/docs/en/fast-mode) | ### Text editing @@ -356,6 +357,7 @@ Claude Code also skips individual suggestions in several situations, including: * After the first turn of a conversation, in some sessions * The previous response ended in an error * While you're in plan mode +* Your account is close to or at its usage limit. To keep suggestions on until you reach the limit, set [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](/docs/en/env-vars) to `true`. Before v2.1.238, Claude Code skipped them near the limit even with the variable set to `true` * In an [agent team](/docs/en/agent-teams), in teammates' sessions by default. The lead's session shows suggestions In print mode, Claude Code doesn't generate suggestions by default. Pass [`--prompt-suggestions`](/docs/en/cli-reference#cli-flags) with `-p "" --output-format stream-json --verbose` to have Claude Code emit a `prompt_suggestion` message after each turn that generates one. The generator skips very short conversations and cold prompt caches here too, so a single short `-p` query can emit none. @@ -366,7 +368,7 @@ To disable prompt suggestions entirely, use any of the following: * Turn off **Prompt suggestions** in `/config` * Set [`promptSuggestionEnabled`](/docs/en/settings#available-settings) to `false` in your settings file -* Set the `CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION` environment variable to `false`, which takes precedence over the setting: +* Set the [`CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION`](/docs/en/env-vars) environment variable to `false`, which takes precedence over the setting: ```bash theme={null} export CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false ``` diff --git a/content/en/docs/claude-code/keybindings.md b/content/en/docs/claude-code/keybindings.md index cd0df5b331..86672e0819 100644 --- a/content/en/docs/claude-code/keybindings.md +++ b/content/en/docs/claude-code/keybindings.md @@ -96,22 +96,22 @@ Actions for navigating command history: Actions available in the `Chat` context: -| Action | Default | Description | -| :-------------------- | :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `chat:cancel` | Escape | Cancel current input | -| `chat:clearInput` | Ctrl+L | Force a full screen redraw, preserving input. In [fullscreen rendering](/docs/en/fullscreen#clear-the-conversation), press twice within two seconds to run `/clear` | -| `chat:clearScreen` | Cmd+K | In [fullscreen rendering](/docs/en/fullscreen#clear-the-conversation), press twice within two seconds to run `/clear` | -| `chat:killAgents` | Ctrl+X Ctrl+K | Stop all running [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) in this session | -| `chat:cycleMode` | Shift+Tab\* | Cycle permission modes | -| `chat:modelPicker` | Meta+P | Open model picker | -| `chat:fastMode` | Meta+O | Toggle fast mode | -| `chat:thinkingToggle` | Meta+T | Toggle extended thinking | -| `chat:submit` | Enter | Submit message | -| `chat:newline` | Ctrl+J | Insert a newline without submitting | -| `chat:undo` | Ctrl+\_, Ctrl+Shift+- | Undo last action | -| `chat:externalEditor` | Ctrl+G, Ctrl+X Ctrl+E | Open in external editor | -| `chat:stash` | Ctrl+S | Stash current prompt | -| `chat:imagePaste` | Ctrl+V (Alt+V on Windows and WSL) | Paste image from clipboard. On WSL, both shortcuts are bound by default | +| Action | Default | Description | +| :-------------------- | :-------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `chat:cancel` | Escape | Cancel current input | +| `chat:clearInput` | Ctrl+L | Force a full screen redraw, preserving input and conversation | +| `chat:clearScreen` | Cmd+K | Force a full screen redraw, preserving input and conversation. See [Clear the conversation](/docs/en/fullscreen#clear-the-conversation) for how Cmd+K behaves on iTerm2 and Terminal.app | +| `chat:killAgents` | Ctrl+X Ctrl+K | Stop all running [background subagents](/docs/en/sub-agents#run-subagents-in-foreground-or-background) in this session and turn off [artifact auto-replies](/docs/en/artifacts#let-claude-reply-to-comments-on-its-own) for the rest of it | +| `chat:cycleMode` | Shift+Tab\* | Cycle permission modes | +| `chat:modelPicker` | Meta+P | Open model picker | +| `chat:fastMode` | Meta+O | Toggle fast mode | +| `chat:thinkingToggle` | Meta+T | Toggle extended thinking | +| `chat:submit` | Enter | Submit message | +| `chat:newline` | Ctrl+J | Insert a newline without submitting | +| `chat:undo` | Ctrl+\_, Ctrl+Shift+- | Undo last action | +| `chat:externalEditor` | Ctrl+G, Ctrl+X Ctrl+E | Open in external editor | +| `chat:stash` | Ctrl+S | Stash current prompt | +| `chat:imagePaste` | Ctrl+V (Alt+V on Windows and WSL) | Paste image from clipboard. On WSL, both shortcuts are bound by default | \*On Windows without VT mode (Node \<24.2.0/\<22.17.0, Bun \<1.2.23), defaults to Meta+M. @@ -130,17 +130,19 @@ Actions available in the `Autocomplete` context: Actions available in the `Confirmation` context: -| Action | Default | Description | -| :-------------------------- | :-------- | :--------------------------------------------------------------------------------------------------------------------------------- | -| `confirm:yes` | Y, Enter | Confirm action | -| `confirm:no` | N, Escape | Decline action | -| `confirm:previous` | Up | Previous option | -| `confirm:next` | Down | Next option | -| `confirm:nextField` | Tab | Next field | -| `confirm:previousField` | (unbound) | Previous field | -| `confirm:toggle` | Space | Toggle selection | -| `confirm:cycleMode` | Shift+Tab | Cycle permission modes | -| `confirm:toggleExplanation` | Ctrl+E | Toggle a model-generated [explanation of the command](/docs/en/permissions#permission-system) on Bash and PowerShell permission prompts | +| Action | Default | Description | +| :-------------------------- | :---------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `confirm:yes` | Y, Enter | Confirm action | +| `confirm:no` | N, Escape | Decline action | +| `confirm:previous` | Up | Previous option | +| `confirm:next` | Down | Next option | +| `confirm:nextField` | Tab | Next field | +| `confirm:previousField` | (unbound) | Previous field | +| `confirm:toggle` | Space | Toggle selection | +| `confirm:cycleMode` | Shift+Tab\* | Cycle permission modes. On a file permission prompt, closes an open [comment field](/docs/en/permissions#add-a-comment-when-you-answer-a-permission-prompt); with no field open, selects the option that allows the action for the rest of the session, when the prompt offers that option | +| `confirm:toggleExplanation` | Ctrl+E | Toggle a model-generated [explanation of the command](/docs/en/permissions#permission-system) on Bash and PowerShell permission prompts | + +\*On Windows without VT mode (Node \<24.2.0/\<22.17.0, Bun \<1.2.23), defaults to Meta+M. ### Permission actions diff --git a/content/en/docs/claude-code/llm-gateway-connect.md b/content/en/docs/claude-code/llm-gateway-connect.md index fc0081a59b..77d149a0f7 100644 --- a/content/en/docs/claude-code/llm-gateway-connect.md +++ b/content/en/docs/claude-code/llm-gateway-connect.md @@ -515,7 +515,7 @@ These are the most common errors when running Claude Code through a gateway, wit | `/fast` reports `Fast mode has been disabled by your organization` in a session authenticated with `ANTHROPIC_AUTH_TOKEN`, even though the organization has fast mode enabled | The availability check requires a claude.ai login or an Anthropic API key; with only a bearer token, Claude Code treats fast mode as disabled without sending the check | Set `CLAUDE_CODE_SKIP_FAST_MODE_ORG_CHECK=1`; see [use fast mode behind proxies and LLM gateways](/docs/en/fast-mode#use-fast-mode-behind-proxies-and-llm-gateways) | | Claude Code asks you to log in even though the [curl test](#verify-the-connection) succeeds | The CLI has no credential of its own: a reachable base URL isn't one, and in an interactive session an `env` block in a project's `.claude/settings.json` or `.claude/settings.local.json` applies only after the first-run wizard and [trust prompt](/docs/en/permissions#what-runs-before-you-trust-a-folder) | Set `ANTHROPIC_AUTH_TOKEN` somewhere Claude Code reads before first-run setup: a shell export, the `env` block in `~/.claude/settings.json`, or managed settings | | `ANTHROPIC_API_KEY` is set but ignored, with no prompt | The key needs a one-time approval in interactive sessions, and a previously declined key is ignored without asking again | Enable it under `/config` with the `Use custom API key` option | -| `This machine's managed settings require a first-party login` | Managed settings include `forceLoginMethod` or `forceLoginOrgUUID`, which on Claude Code v2.1.146 and later cannot coexist with `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` | Your administrator must remove `forceLoginMethod` and `forceLoginOrgUUID` from managed settings to use gateway credentials, or remove the gateway credential to use first-party login. The two cannot be combined | +| `This machine's managed settings require a first-party login` | Managed settings include `forceLoginMethod` or `forceLoginOrgUUID`, which cannot coexist with `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `apiKeyHelper` | Your administrator must remove `forceLoginMethod` and `forceLoginOrgUUID` from managed settings to use gateway credentials, or remove the gateway credential to use first-party login. The two cannot be combined | | `403` with an HTML body such as `403 Forbidden`, when the gateway's own logs show no request received | A web application firewall or reverse proxy in front of the gateway blocked the request body before it reached the gateway. Claude Code prompts include XML-style tags and source code that match cross-site-scripting body rules, so a short curl test passes while a real session doesn't | Exempt the gateway's `/v1/messages` path from request-body inspection. On AWS WAF this is the `CrossSiteScripting_Body` managed rule; on nginx with ModSecurity it is the equivalent OWASP CRS body rules | | Certificate or TLS errors such as `SSL certificate verification failed` or `Self-signed certificate detected`, when the [curl test](#verify-the-connection) succeeds | Claude Code's runtime isn't trusting the same certificate authority that `curl` uses. Common behind corporate TLS-inspection proxies | Set `NODE_EXTRA_CA_CERTS` to the CA bundle path; see [CA certificate store](/docs/en/network-config#ca-certificate-store) | diff --git a/content/en/docs/claude-code/llm-gateway-rollout.md b/content/en/docs/claude-code/llm-gateway-rollout.md index caeb36d6ad..cc8a26aaa5 100644 --- a/content/en/docs/claude-code/llm-gateway-rollout.md +++ b/content/en/docs/claude-code/llm-gateway-rollout.md @@ -189,7 +189,7 @@ Deliver the variables through the `env` block of a [managed settings file](/docs Add the conditional variables from the table to the same `env` block. A managed `ANTHROPIC_BASE_URL` is enforced and cannot be overridden by a developer's shell export, since Claude Code applies it over the process environment and lower-precedence settings. -Do not include `forceLoginMethod` or `forceLoginOrgUUID` in managed settings alongside a gateway credential. On Claude Code v2.1.146 and later, either key, with any value, blocks `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `apiKeyHelper` at startup, so developers see `This machine's managed settings require a first-party login` and cannot proceed. +Do not include `forceLoginMethod` or `forceLoginOrgUUID` in managed settings alongside a gateway credential. Either key, with any value, blocks `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, and `apiKeyHelper` at startup, so developers see `This machine's managed settings require a first-party login` and cannot proceed. [Server-managed settings](/docs/en/server-managed-settings#platform-availability) delivery requires a direct connection to `api.anthropic.com`, so it does not reach gateway-routed sessions. Gateway deployments use this file-based managed settings path, which enforces the same keys. diff --git a/content/en/docs/claude-code/mcp.md b/content/en/docs/claude-code/mcp.md index 18da0a4349..8eb26a6400 100644 --- a/content/en/docs/claude-code/mcp.md +++ b/content/en/docs/claude-code/mcp.md @@ -255,7 +255,16 @@ A `disabledMcpjsonServers` entry in any settings file still rejects the server. #### Server status detail -In `/mcp`, a server's menu, and the [`/plugin`](/docs/en/plugins) manager, a remote (HTTP or SSE) server you've used before can show a `cached` status such as `cached 2h ago · connects on first use · 5 tools`. Claude Code loaded the server's tool list from a previous session instead of connecting at startup, and it connects the server the first time Claude calls one of its tools. The tools are available from your first message, so you don't need to do anything. To make every server connect at startup instead, set [`MCP_DISCOVERY_CACHE=0`](/docs/en/env-vars). The discovery cache and its `cached` status require Claude Code v2.1.221 or later. +In `/mcp`, including a server's menu there, and in the [`/plugin`](/docs/en/plugins) manager, a remote HTTP or SSE server you've used before can show a `cached` status such as `cached 2h ago · connects on first use · 5 tools`. Claude Code loaded the server's tool list from its discovery cache, saved in a previous session, instead of connecting at startup, and Claude Code connects the server the first time Claude calls one of the server's tools. The tools are available from your first message, so you don't need to do anything. The discovery cache and its `cached` status require Claude Code v2.1.221 or later. + +The discovery cache is off by default unless a gradual rollout has enabled it for your account. Set [`MCP_DISCOVERY_CACHE=1`](/docs/en/env-vars) to turn it on, or `0` to keep it off even when the rollout has enabled it. Before v2.1.238, the cache was on by default. + +Two actions in a server's menu in `/mcp` also affect that server's cache entry: + +* **Reconnect**: on a `cached` server, Claude Code connects it now rather than on its first tool call and keeps the entry. On a connected or failed server, Claude Code reconnects it and also discards the entry. +* **Clear authentication**: Claude Code revokes the server's authentication and also discards the entry. + +After discarding the entry, Claude Code fetches the server's tool list from the server instead of from the cache. When a server's status is `✘ Failed to connect`, `claude mcp list` appends the failure detail to that status line, and `claude mcp get ` shows it on an `Issue:` line: the HTTP status or error code, plus any error text the server returned. The server's detail view in `/mcp` includes the same server-reported text in its `Issue:` row. Claude Code redacts credential-like text from this detail and never includes the expanded server URL, which can carry secrets. Claude Code appends no detail to a `✘ Connection error` status, because the exception text it would print there can embed that URL. Before v2.1.219, both commands showed only the bare failure status, without the status code or the server's error text. @@ -294,12 +303,42 @@ Claude Code consults exactly one of the two lists for each server, so neither li `disabledMcpServers` and `enabledMcpServers` are unrelated to [`enabledMcpjsonServers` and `disabledMcpjsonServers`](/docs/en/settings#available-settings), which control approval of servers defined in a project's `.mcp.json` file. +### MCP client runtimes + +Claude Code connects to MCP servers through one of two client runtimes. The v1 runtime is built on MCP TypeScript SDK 1.x. The v2 runtime is the same code on [MCP TypeScript SDK 2.0](https://ts.sdk.modelcontextprotocol.io/v2/), which adds MCP protocol revision 2026-07-28. The rest of this page applies to both. + +On Claude Code v2.1.232 or later, Claude Code uses the v2 runtime. It picks a runtime each time you start it and keeps it until you exit. It uses v1 when you run it: + +* On Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, unless a host platform that embeds Claude Code sets [`CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST`](/docs/en/env-vars) +* Signed in through a [Claude apps gateway](/docs/en/claude-apps-gateway) +* With [feature-flag fetching off](/docs/en/env-vars#features-that-need-feature-flag-fetching) + +On v2, Claude Code also: + +* Asks HTTP, claude.ai connector, and stdio servers whether they support the newer revision, and uses it with those that do. It connects to every other server as v1 does. +* Receives `list_changed` notifications from servers on the newer revision over a [stream it holds open](#notification-streams-on-the-v2-runtime). +* Doesn't register a [channel](#push-messages-with-channels) server that connects on the newer revision, because that revision can't carry channel messages. +* Fails an [MCP OAuth sign-in](#authenticate-with-remote-mcp-servers) whose authorization response names an unexpected issuer. + +Anthropic can keep a specific server on the earlier protocol, or off that stream, with a feature flag Claude Code fetches. In a [Claude Code on the web](/docs/en/cloud-environments#network-access) session, Claude Code asks its MCP connectors only if you set `MCP_PROTOCOL_NEGOTIATION` to `auto`. + +To pick the runtime yourself, set [`MCP_SDK_GENERATION`](/docs/en/env-vars) to `v1` or `v2`. To decide whether Claude Code asks, set [`MCP_PROTOCOL_NEGOTIATION`](/docs/en/env-vars) to `auto` or `legacy`. Where Claude Code uses v1 by default, pinning `v2` doesn't make it ask, so set `auto` too. + ### Dynamic tool updates Claude Code supports MCP `list_changed` notifications, allowing MCP servers to dynamically update their available tools, prompts, and resources without requiring you to disconnect and reconnect. When an MCP server sends a `list_changed` notification, Claude Code automatically refreshes the available capabilities from that server. If a refresh request fails, Claude Code keeps the server's previously discovered tools, prompts, and resources until a later refresh succeeds. Before v2.1.214, a transient error during the refresh replaced the server's tools, prompts, and resources with an empty list. +#### Notification streams on the v2 runtime + +On the [v2 runtime](#mcp-client-runtimes), Claude Code receives `list_changed` notifications from a server on the newer protocol revision over a stream it holds open. When the stream closes, Claude Code reopens it, with two limits: + +* **The stream closes again within 10 seconds**: Claude Code reopens it up to three times, then stops for that connection. +* **The stream stays open longer than 10 seconds, then closes**, as streams to serverless hosts commonly do: after five reopens in an hour, Claude Code waits about six hours before the next one. + +Until the stream reopens, you keep the server's last fetched tools, prompts, and resources. To pick up its changes sooner, reconnect the server from `/mcp`. + ### Automatic reconnection If an HTTP or SSE server disconnects mid-session, Claude Code automatically reconnects with exponential backoff: up to five attempts, starting at a one-second delay and doubling each time. The server appears as pending in `/mcp` while reconnection is in progress. After five failed attempts the server is marked as failed and you can retry manually from `/mcp`. Stdio servers are local processes and are not reconnected automatically. @@ -314,6 +353,8 @@ The capability discovery requests that run after a successful connection, such a An MCP server can also push messages directly into your session so Claude can react to external events like CI results, monitoring alerts, or chat messages. To enable this, your server declares the `claude/channel` capability and you opt it in with the `--channels` flag at startup. See [Channels](/docs/en/channels) to use an officially supported channel, or [Channels reference](/docs/en/channels-reference) to build your own. +On the [v2 runtime](#mcp-client-runtimes), a channel server that negotiates MCP protocol revision 2026-07-28 can't deliver channel messages, so Claude Code doesn't register it as a channel. Setting [`MCP_PROTOCOL_NEGOTIATION`](/docs/en/env-vars) to `legacy` keeps it on the earlier handshake, along with every other server in the process. + Tips: @@ -401,7 +442,7 @@ Or inline in `plugin.json`: **Plugin MCP features**: * **Automatic lifecycle**: servers connect and disconnect at these points: - * At session startup, Claude Code connects the servers for enabled plugins automatically. In `/mcp`, a remote (HTTP or SSE) plugin server you've used before can show the [`cached` status](#managing-your-servers) instead; Claude Code connects it when Claude first calls one of its tools + * At session startup, Claude Code connects the servers for enabled plugins automatically. In `/mcp`, a remote (HTTP or SSE) plugin server you've used before can show the [`cached` status](#server-status-detail) instead; Claude Code connects it when Claude first calls one of its tools * If you enable or disable a plugin during a session, run `/reload-plugins` to connect or disconnect its MCP servers. When you reload, Claude Code keeps the live connections of plugin servers whose configuration is unchanged, and does the same when you [replace the session's MCP server list](/docs/en/agent-sdk/typescript#mcpsetserversresult) from the Agent SDK without naming them * In [web sessions](/docs/en/claude-code-on-the-web), an MCP call to a plugin server that isn't connected yet, such as right after an idle session wakes, starts the server on demand and waits for it to connect * **Path placeholders**: `${CLAUDE_PLUGIN_ROOT}` resolves to the plugin's installation directory, `${CLAUDE_PLUGIN_DATA}` to its [persistent state](/docs/en/plugins-reference#persistent-data-directory) directory, and `${CLAUDE_PROJECT_DIR}` to the stable project root. Substitution applies to: @@ -839,12 +880,13 @@ The command can also be inline: **Requirements:** * The command must write a JSON object of string key-value pairs to stdout -* The command runs in a shell with a 10-second timeout, from the session's current working directory. Use an absolute path or a command on `PATH` for the script +* Claude Code runs the command in a shell and gives up on it after 10 seconds +* Claude Code picks the command's working directory by [where you configured the server](#where-the-helper-runs), so give the script as an absolute path or put it on `PATH` * Dynamic headers override any static `headers` with the same name -The helper runs fresh on each connection, at session start and on reconnect. There is no caching, so your script is responsible for any token reuse. +Claude Code runs the helper fresh on each connection, at session start and on reconnect, once the [trust rule for project and local-scope servers](#trust-a-folder-before-its-headershelper-runs) lets it run. It doesn't cache the result, so your script is responsible for any token reuse. -If a tool call returns `401 Unauthorized` or `403 Forbidden`, Claude Code automatically re-runs the helper, reconnects with the fresh headers, and retries the call once. Claude Code marks the server as needing authentication in `/mcp` only if that retry also fails. +If a tool call returns `401 Unauthorized` or `403 Forbidden`, Claude Code automatically re-runs the helper under the same rule, reconnects with the fresh headers, and retries the call once. Claude Code marks the server as needing authentication in `/mcp` only if that retry also fails. Claude Code sets these environment variables when executing the helper: @@ -856,13 +898,40 @@ Claude Code sets these environment variables when executing the helper: Use these to write a single helper script that serves multiple MCP servers. -For a plugin-provided server, the helper also runs with its working directory set to the plugin root, so a relative `headersHelper` path resolves inside the plugin directory rather than against the session's working directory. Requires Claude Code v2.1.195 or later. +A plugin-provided `headersHelper` can't reference the plugin's [`${user_config.*}`](/docs/en/plugins-reference#user-configuration) values, because the command runs through a shell. Claude Code reports the server as misconfigured with an [error](/docs/en/errors#plugin-command-references-user-config) and doesn't substitute the value. Put `${user_config.KEY}` in the server's `headers` field instead, which isn't shell-parsed, or have the helper script read the value from a config file. Before v2.1.207, `headersHelper` substituted `${user_config.*}` values. -A plugin-provided `headersHelper` can't reference the plugin's [`${user_config.*}`](/docs/en/plugins-reference#user-configuration) values, because the command runs through a shell. Claude Code reports the server as misconfigured with an [error](/docs/en/errors#plugin-command-references-user-config) and doesn't substitute the value. Put `${user_config.KEY}` in the server's `headers` field instead, which isn't shell-parsed, or have the helper script read the value from its own environment or a config file. Before v2.1.207, `headersHelper` substituted `${user_config.*}` values. +#### Where the helper runs - - `headersHelper` executes arbitrary shell commands. When defined at project or local scope, Claude Code runs it under the same [workspace trust rule as hooks in settings files](/docs/en/permissions#what-runs-before-you-trust-a-folder), so it runs in a `-p` session in a folder you've never trusted. - +Claude Code picks the `headersHelper` command's working directory from the configuration that declares the server. A `cd` later in the session doesn't move it. Each row below gives the directory that a relative path in your `headersHelper` command resolves against. + +| Where you configured the server | Working directory | +| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------- | +| A [plugin](/docs/en/plugins-reference#mcp-servers) | The plugin's root directory. Requires Claude Code v2.1.195 or later | +| A project `.mcp.json`, a [local-scope](#local-scope) server, an agent file in your project, a server from the SDK's `mcpServers` option or `setMcpServers()` method, or [`--mcp-config`](/docs/en/cli-reference) | The directory you started Claude Code in | +| [User scope](#user-scope), [managed MCP](/docs/en/managed-mcp), a [claude.ai connector](#use-mcp-servers-from-claude-ai), or an agent file from outside your project, including one from an `--add-dir` directory | Your configuration directory, `~/.claude` unless you set [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars) | + +Before v2.1.238, Claude Code also ran the helpers of user-scope, managed, and claude.ai connector servers, and of agent files from outside your project, from the directory you started it in. + +#### Which variables a helper can read + +A `headersHelper` that a repository or plugin supplies is a command you didn't write, so Claude Code runs it without the credential variables from your environment, such as `ANTHROPIC_API_KEY`. Where you configured the server decides whether this applies: + +* **Removed**: a server in a project `.mcp.json` or in a plugin, and an inline server in an agent file from your project or from an `--add-dir` directory +* **Not removed**: a server at [user](#user-scope) or [local scope](#local-scope), in [managed MCP](/docs/en/managed-mcp), from a [claude.ai connector](#use-mcp-servers-from-claude-ai), or supplied by the SDK or [`--mcp-config`](/docs/en/cli-reference), and an inline server in an agent file from `~/.claude/agents/`, from managed settings, or passed with `--agents` + +Apart from Git's `GIT_CONFIG_KEY_` variables, Claude Code removes every variable from your environment whose name has `TOKEN`, `SECRET`, `PASSWORD`, `PASSWD`, `PASSPHRASE`, `KEY`, `AUTH`, `COOKIE`, `PAT`, `DSN`, `CREDENTIAL`, or `CREDENTIALS` as one of its underscore-separated parts, in either letter case, such as `ANTHROPIC_API_KEY` or `MY_REGISTRY_TOKEN`. Claude Code also removes a fixed list of credential variables whose names don't follow that pattern, such as `ANTHROPIC_CUSTOM_HEADERS`. + +When this applies to your helper, have the script read its credential from a file or a credential store. If the server's `url` [expands one of these variables](#environment-variable-expansion-in-mcp-json), the `CLAUDE_CODE_MCP_SERVER_URL` value the helper receives has that part replaced with `REDACTED` as well. + +#### Trust a folder before its headersHelper runs + +Claude Code executes a `headersHelper` as an arbitrary shell command. For a server in a project `.mcp.json` or at [local scope](#local-scope), it runs the helper only after you accept the [trust dialog](/docs/en/permissions#project-allow-rules-and-workspace-trust) for the folder you started the session in. Before v2.1.238, a `claude -p` or SDK session ran these helpers without checking trust, and an interactive session ran them once you had trusted a parent folder. + +* **Trust that doesn't count**: a parent folder's trust, and the automatic trust a `claude -p` or SDK session gets for [hooks in settings files](/docs/en/permissions#what-runs-before-you-trust-a-folder) +* **Until you trust the folder**: Claude Code connects the server with its static `headers` alone. In a `claude -p` or SDK session it also prints one [`headersHelper not run`](/docs/en/errors#headershelper-not-run) line per server to stderr, telling you how to grant the trust. +* **Trust without a dialog**: set `projects[""].hasTrustDialogAccepted` to `true` in `~/.claude.json`. `` is the folder [Project allow rules and workspace trust](/docs/en/permissions#project-allow-rules-and-workspace-trust) says Claude Code keys the trust on. + +Claude Code applies the same rule to a server declared inline in an [agent file](/docs/en/sub-agents#scope-mcp-servers-to-a-subagent), checking where that agent file came from: your project, for a file in its `.claude/agents/` directory, or an `--add-dir` directory. Until you [trust that project or directory itself](/docs/en/permissions#what-runs-before-you-trust-a-folder), Claude Code doesn't load the server at all, so its helper never runs either. ## Add MCP servers from JSON configuration @@ -1213,12 +1282,6 @@ Tool search keeps MCP context usage low by deferring tool definitions until Clau Tool search isn't supported on Microsoft Foundry [deployments hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options), which reject it server-side: Claude Code detects the rejection and loads MCP tools upfront for that deployment instead. [`ENABLE_TOOL_SEARCH`](#configure-tool-search) can't override this, since the rejection comes from the deployment itself. -### How it works - -Tool search is enabled by default. MCP tools are deferred rather than loaded into context upfront, and Claude uses a search tool to discover relevant ones when a task needs them. Only the tools Claude actually uses enter context. From your perspective, MCP tools work exactly as before. - -If you prefer threshold-based loading, set `ENABLE_TOOL_SEARCH=auto`. Claude Code then loads every schema upfront while the definitions it would otherwise defer total less than 10% of the context window, and defers every one of those definitions once they reach 10%. See [Configure tool search](#configure-tool-search) for all options. - ### For MCP server authors If you're building an MCP server, the server instructions field becomes more useful with tool search enabled. Server instructions help Claude understand when to search for your tools, similar to how [skills](/docs/en/skills) work. @@ -1296,7 +1359,7 @@ The following `.mcp.json` entry exempts one HTTP server while leaving other serv The `alwaysLoad` field is available on all server types. An MCP server can also mark individual tools as always-loaded by including `"anthropic/alwaysLoad": true` in the tool's `_meta` object, which has the same effect for that tool only. -Setting `alwaysLoad: true` also makes startup wait for the server's tools, capped at the standard 5-second connect timeout, since they must be present when the first prompt is built. A remote server with a valid [`cached` entry](#managing-your-servers) supplies its tools from the cache without connecting, so it doesn't hold startup. Other servers connect in the background by default; set [`MCP_CONNECTION_NONBLOCKING=0`](/docs/en/env-vars) to make startup wait for them too. +Setting `alwaysLoad: true` also makes startup wait for the server's tools, capped at the standard 5-second connect timeout, since they must be present when the first prompt is built. A remote server with a valid [`cached` entry](#server-status-detail) supplies its tools from the cache without connecting, so it doesn't hold startup. Other servers connect in the background by default; set [`MCP_CONNECTION_NONBLOCKING=0`](/docs/en/env-vars) to make startup wait for them too. ## Use MCP prompts as commands diff --git a/content/en/docs/claude-code/model-config.md b/content/en/docs/claude-code/model-config.md index 3dfa5bfc41..2ebc3d62ee 100644 --- a/content/en/docs/claude-code/model-config.md +++ b/content/en/docs/claude-code/model-config.md @@ -94,7 +94,7 @@ In [non-interactive mode](/docs/en/headless) with the `-p` flag and through the You can configure your model in several ways, listed in order of priority: -1. **During session**: use `/model ` to switch immediately, or run `/model` with no argument to open the picker. The picker asks for confirmation when the conversation has prior output, since the next response re-reads the full history without cached context +1. **During session**: use `/model ` to switch immediately, or run `/model` with no argument to open the picker. See [when Claude Code asks you to confirm the switch](/docs/en/prompt-caching#switching-models) 2. **At startup**: launch with `claude --model ` 3. **Environment variable**: set `ANTHROPIC_MODEL=` 4. **Settings**: configure permanently in your settings file using the `model` field diff --git a/content/en/docs/claude-code/output-styles.md b/content/en/docs/claude-code/output-styles.md index 7f436e462e..5364f48d56 100644 --- a/content/en/docs/claude-code/output-styles.md +++ b/content/en/docs/claude-code/output-styles.md @@ -16,10 +16,12 @@ For instructions about your project, conventions, or codebase, use [CLAUDE.md](/ Claude Code's **Default** output style is the existing system prompt, designed to help you complete software engineering tasks efficiently. -There are three additional built-in output styles: +There are four additional built-in output styles: * **Proactive**: Claude executes immediately, makes reasonable assumptions instead of pausing for routine decisions, and prefers action over planning. This is stronger autonomous-execution guidance than [auto mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode) applies, and it works without changing your permission mode, so your permission mode still decides what runs without asking you. +* **Concise**: Claude leads with the result, skips preamble and narration, and keeps responses short by default, while doing the engineering work as thoroughly as in the Default style. When you ask for an explanation or more detail, Claude answers in full. Claude always keeps the complete content of error reports, security warnings, and confirmations for destructive actions. Requires Claude Code v2.1.237 or later. + * **Explanatory**: Provides educational "Insights" in between helping you complete software engineering tasks. Helps you understand implementation choices and codebase patterns. * **Learning**: Collaborative, learn-by-doing mode where Claude will not only share "Insights" while coding, but also ask you to contribute small, strategic pieces of code yourself. Claude Code will add `TODO(human)` markers in your code for you to implement. @@ -106,7 +108,7 @@ Output styles directly modify Claude Code's system prompt. Output styles apply to the main conversation only: a [subagent runs its own system prompt](/docs/en/sub-agents#what-loads-at-startup), so styles don't change how subagents respond. A [fork](/docs/en/sub-agents#fork-the-current-conversation) is the exception, because it inherits the parent's full system prompt. -Token usage depends on the style. Adding instructions to the system prompt increases input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens. For custom styles, output token usage depends on what your instructions tell Claude to produce. +Token usage depends on the style. Adding instructions to the system prompt increases input tokens, though prompt caching reduces this cost after the first request in a session. The built-in Explanatory and Learning styles produce longer responses than Default by design, which increases output tokens, and the Concise style does the opposite by instructing Claude to keep responses short by default. For custom styles, output token usage depends on what your instructions tell Claude to produce. ## Comparisons to related features diff --git a/content/en/docs/claude-code/permissions.md b/content/en/docs/claude-code/permissions.md index 5b1c51c355..91ceb5d95a 100644 --- a/content/en/docs/claude-code/permissions.md +++ b/content/en/docs/claude-code/permissions.md @@ -24,12 +24,35 @@ When you choose "Yes, and don't ask again" and the approval saves permanently, s Before v2.1.211, Claude Code always saved the rule in the starting directory, so an approval granted in a worktree or subdirectory didn't apply to the rest of the repository. Rules that earlier versions saved in a subdirectory or worktree still apply to sessions started there. -Sometimes a permission prompt offers only a one-time approval, with no "don't ask again" option and no option to allow the action for the rest of the session. Claude Code offers those options only when the prompt can show you everything they would allow, so a rule you save from a prompt covers only what its option named. Claude Code leaves the options out when the command or edit is too large to show in full, or when the option's label can't fit every command or path the rule would cover. Approve the action once, or add the rule yourself in [`/permissions`](#manage-permissions). +Sometimes a permission prompt offers only a one-time approval, with no "don't ask again" option and no option to allow the action for the rest of the session. Claude Code offers those options only when the prompt can show you everything they would allow, so a rule you save from a prompt covers only what its option named. + +When the directory you started Claude Code in is what makes the option's label too long, Claude Code shortens it in the label, replacing your home directory with `~` and then the end of the path with `…`, and keeps the option. You still save the same rule. Claude Code leaves the options out in three cases: + +* **Command or edit:** too large to show in full. +* **Commands or paths the rule would cover:** the label can't fit them all. +* **Starting directory too long, not shortened:** it contains characters Claude Code can't display safely, or even its start doesn't fit. + +Approve the action once, or add the rule yourself in [`/permissions`](#manage-permissions). On a Bash or PowerShell permission prompt, press `Ctrl+E` to show an explanation of the command: what it does, why Claude is running it, and what could go wrong, labeled **Low risk**, **Med risk**, or **High risk**. Claude Code sends the command and Claude's own description of the call to the model to generate the explanation only when you press `Ctrl+E`, not on every prompt. Showing the explanation doesn't run the command; press `Ctrl+E` again to hide it. To turn the shortcut off, set [`permissionExplainerEnabled`](/docs/en/settings#global-config-settings) to `false` in `~/.claude.json`. +### Add a comment when you answer a permission prompt + +You can attach a note to Claude when you approve or deny a single action. On most permission prompts, including Bash, PowerShell, file, and MCP tool prompts, move to **Yes** or **No** and press `Tab` to open a comment field on that option. WebFetch and browser prompts don't offer the field. The options that allow the action for the rest of the session or save a rule don't take one either. + +With the field open, type the comment and then press one of these keys: + +* `Enter`: submits your answer with the comment attached. If you leave the field empty, Claude Code submits the answer without a comment. +* `Tab`: closes the field without answering. Claude Code keeps the text you typed and still sends it if you answer with that option. +* `Shift+Tab`: on a file prompt, such as an Edit or Write prompt, closes the field the same as `Tab`. Before v2.1.235, pressing `Shift+Tab` inside the field instead selected the option that allows the action for the rest of the session, so Claude Code approved the action for the rest of the session and discarded the comment. + +Claude Code delivers the comment differently depending on how you answered: + +* **Yes**: Claude Code runs the action, then sends your comment to Claude after the result. +* **No**: Claude Code sends your comment to Claude as the reason for the denial, and Claude continues working. If you select **No** without a comment on a prompt from the main conversation, Claude Code stops the turn. + ## Manage permissions You can view and manage Claude Code's tool permissions with `/permissions`. The dialog lists all permission rules and the `settings.json` file each rule comes from. You can open the dialog while Claude is working: when you add or remove a rule, Claude Code applies the change starting with Claude's next tool call in the same turn. Before v2.1.234, Claude Code queued the command until the turn finished. @@ -543,24 +566,33 @@ Claude Code shows the trust dialog in interactive sessions only. A `claude -p` r ### When your local settings file needs trust -`.claude/settings.local.json` is normally your own file, so its allow rules and additional directories apply without the trust step. Claude Code treats the file as repository-supplied instead, and holds its rules until you trust the folder, when the file is tracked in git or `.claude` is a symlink. +`.claude/settings.local.json` is normally your own file, so Claude Code applies its allow rules and additional directories without the trust step. When the file is tracked in git, or `.claude` is a symlink, Claude Code treats it as repository-supplied instead and holds its rules until you trust the folder. + +Claude Code runs git to tell the two apart, and it runs git only once you've trusted the folder: you accepted the trust dialog for it or for a parent directory whose trust extends to it, or you're in a `-p` or SDK session, which counts as accepted. Until then, where you started Claude Code decides what happens to the file's rules: -Claude Code runs git to tell the two apart, and it runs git in a folder only after you accept a trust dialog for that folder or for a parent directory whose trust extends to it, or in a `-p` or SDK session, which counts as accepted. Until then it holds the file's rules like project settings, with one exception: in your own configuration home, meaning your home directory or any directory whose `.claude` subdirectory you've set as [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars), the file applies right away without running git. Once the check has run, an untracked file, or one in a directory that isn't inside a git repository, applies even though you haven't trusted that exact folder. +* **In your configuration home:** Claude Code applies that folder's `.claude/settings.local.json` right away without running git. Your configuration home is your home directory, or a directory whose `.claude` subdirectory you've set as [`CLAUDE_CONFIG_DIR`](/docs/en/env-vars#variables). If that `CLAUDE_CONFIG_DIR` directory sits inside a git repository and Claude Code [keeps your local settings at the repository root](/docs/en/settings#available-scopes) instead, it holds the rules like anywhere else. +* **Anywhere else:** Claude Code holds the file's rules like project settings. Once the check has run, Claude Code applies the rules of an untracked file, or of a file in a directory outside any git repository, even though you haven't trusted that exact folder. + + + The configuration-home exception skips only the trust step. `~/.claude/settings.local.json` is still [local scope](/docs/en/settings#available-scopes), so Claude Code reads it only in sessions you start in your home directory itself, not in every project. To apply permission rules across all your projects, add them to your user settings instead: `~/.claude/settings.json`, or `$CLAUDE_CONFIG_DIR/settings.json` when `CLAUDE_CONFIG_DIR` is set. + -Versions 2.1.196 through 2.1.199 held the file's rules in your configuration home and outside git repositories too, and printed the [`this workspace has not been trusted`](/docs/en/errors#workspace-has-not-been-trusted) warning there. Before v2.1.207, an untracked file applied before you accepted the dialog. +On versions 2.1.196 through 2.1.199, Claude Code held the file's rules in your configuration home and outside git repositories too, and printed the [`this workspace has not been trusted`](/docs/en/errors#workspace-has-not-been-trusted) warning there. Before v2.1.207, Claude Code applied an untracked file's rules before you accepted the dialog. ### What runs before you trust a folder Each row is one kind of content a repository can supply. The columns are the two situations in which you haven't trusted the folder itself: you trusted only a parent folder, or you ran `claude -p` or the SDK there, which never shows the trust dialog. The parent-folder column doesn't apply inside a [nested repository](#project-allow-rules-and-workspace-trust): in an interactive session Claude Code shows the trust dialog for it, and a `claude -p` or SDK run there follows the `claude -p` column. -| What the repository supplies | You trusted only a parent folder | `claude -p` or the SDK, folder never trusted | -| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Hooks](/docs/en/hooks) in settings files, the [`env`](/docs/en/settings#available-settings) block and helper commands such as [`apiKeyHelper`](/docs/en/settings#available-settings), and a project skill's [hooks](/docs/en/hooks#hooks-in-skills-and-agents) and [`allowed-tools`](/docs/en/skills#pre-approve-tools-for-a-skill) | Used | Used. Workspace trust never gates a skill's `allowed-tools` in any session | -| `permissions.allow` rules and `additionalDirectories` in `.claude/settings.json` | Not used until you accept the trust dialog, which appears again listing them | Not used. Claude Code prints a [`this workspace has not been trusted`](/docs/en/errors#workspace-has-not-been-trusted) warning to stderr | -| Frontmatter hooks in a project [subagent](/docs/en/sub-agents#hooks-in-subagent-frontmatter), a project [`@skills-dir` plugin](/docs/en/plugins-reference#skills-directory-plugins), and [`extraKnownMarketplaces`](/docs/en/settings#extraknownmarketplaces) entries from the repository or an `--add-dir` directory | Not used, and no dialog is offered | Not used | -| Servers in `.mcp.json`, including ones the repository [approves in its own settings](/docs/en/mcp#project-server-approvals-and-workspace-trust), and any [`headersHelper`](/docs/en/mcp#use-dynamic-headers-for-custom-authentication) they define, which runs when its server connects | Claude Code asks you before connecting them. The repository's own approvals don't count | Connected without asking, approved or not. The SDK loads them only when `settingSources` includes project settings. `claude mcp list` in the same folder still reports such a server as pending | +| What the repository supplies | You trusted only a parent folder | `claude -p` or the SDK, folder never trusted | +| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Hooks](/docs/en/hooks) in settings files, the [`env`](/docs/en/settings#available-settings) block and helper commands such as [`apiKeyHelper`](/docs/en/settings#available-settings), and a project skill's [hooks](/docs/en/hooks#hooks-in-skills-and-agents) and [`allowed-tools`](/docs/en/skills#pre-approve-tools-for-a-skill) | Used | Used. Workspace trust never gates a skill's `allowed-tools` in any session | +| `permissions.allow` rules and `additionalDirectories` in `.claude/settings.json` | Not used until you accept the trust dialog, which appears again listing them | Not used. Claude Code prints a [`this workspace has not been trusted`](/docs/en/errors#workspace-has-not-been-trusted) warning to stderr | +| Frontmatter hooks in a project [subagent](/docs/en/sub-agents#hooks-in-subagent-frontmatter), a project [`@skills-dir` plugin](/docs/en/plugins-reference#skills-directory-plugins), and [`extraKnownMarketplaces`](/docs/en/settings#extraknownmarketplaces) entries from the repository or an `--add-dir` directory | Not used, and no dialog is offered | Not used | +| Inline [`mcpServers`](/docs/en/sub-agents#scope-mcp-servers-to-a-subagent) in the frontmatter of a subagent from the repository or an `--add-dir` directory | Not used, and no dialog is offered | Not used | +| Servers in `.mcp.json`, including ones the repository [approves in its own settings](/docs/en/mcp#project-server-approvals-and-workspace-trust) | Claude Code asks you before connecting them. The repository's own approvals don't count | Connected without asking, approved or not. The SDK loads them only when `settingSources` includes project settings. `claude mcp list` in the same folder still reports such a server as pending | +| A [`headersHelper`](/docs/en/mcp#trust-a-folder-before-its-headershelper-runs) on a server in `.mcp.json` | Not run until you accept the trust dialog, which appears again naming where the helper is declared. Claude Code connects the server with its static `headers` alone until then | Not run. Claude Code connects the server with its static `headers` alone and prints a [`headersHelper not run`](/docs/en/errors#headershelper-not-run) line per server to stderr | -For the rows that need this exact folder trusted and offer no dialog, trust it by hand: set `projects[""].hasTrustDialogAccepted` to `true` in `~/.claude.json`, where `` is the repository root, or the folder itself outside a repository. The debug log line for a skipped subagent hook and the stderr warning for skipped allow rules both print the exact key. +For the rows that need this exact folder trusted, trust it by hand: set `projects[""].hasTrustDialogAccepted` to `true` in `~/.claude.json`, where `` is the repository root, or the folder itself outside a repository. Claude Code prints the exact key in the debug log line for a skipped subagent hook or inline MCP server, in the stderr warning for skipped allow rules, and in the `headersHelper not run` line for a skipped helper. Before you run `claude -p` in a repository you didn't write, decide what it may run on your machine: diff --git a/content/en/docs/claude-code/plugin-hints.md b/content/en/docs/claude-code/plugin-hints.md index 0e7d5f5b80..30ebcd1609 100644 --- a/content/en/docs/claude-code/plugin-hints.md +++ b/content/en/docs/claude-code/plugin-hints.md @@ -110,6 +110,7 @@ Prompt frequency is bounded, and some sessions never prompt: * **Once per plugin**: after the prompt is shown, Claude Code records the plugin and never prompts for it again, regardless of the user's answer. * **Once per session**: across all CLIs on the machine, at most one hint prompt appears per Claude Code session. +* **Main interactive session only**: Claude Code shows the prompt only in the terminal session the user is typing into. Claude Code never prompts for a command that a [subagent](/docs/en/sub-agents) runs, and never prompts when the user runs Claude Code in [non-interactive mode](/docs/en/headless) with the `-p` flag or through the [Agent SDK](/docs/en/agent-sdk/overview). Claude Code still strips the hint line from the command output in all of these cases. * **Telemetry opt-outs**: sessions where analytics are disabled never show hint prompts. This includes sessions with `DISABLE_TELEMETRY` or `CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC` set, and sessions on third-party providers such as Amazon Bedrock or Google Cloud's Agent Platform where the [automatic telemetry opt-out](/docs/en/data-usage#default-behaviors-by-api-provider) applies. Selecting **Yes** installs the plugin to user scope. Selecting **No, and don't show plugin installation hints again** disables all future hint prompts for the user. diff --git a/content/en/docs/claude-code/plugin-marketplaces.md b/content/en/docs/claude-code/plugin-marketplaces.md index 630bf544d8..ad12f7b213 100644 --- a/content/en/docs/claude-code/plugin-marketplaces.md +++ b/content/en/docs/claude-code/plugin-marketplaces.md @@ -1230,7 +1230,9 @@ From a marketplace directory, Claude Code doesn't open the plugins' skill, agent To find skill, agent, and command files whose frontmatter doesn't parse, run `claude plugin validate` and name the directory that holds them. Claude Code doesn't look outside the directory you name. Every run except one against a plugin that has a `plugin.json` requires Claude Code v2.1.233 or later. -Pick the directory by what you want to check: +##### Pick the directory to name + +Claude Code checks different files depending on which directory you name. Find what you want to check in the first column, and run that row's command: | To check | Run | Claude Code checks | | :------------------------------------------------------------------------------------------- | :---------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -1240,21 +1242,41 @@ Pick the directory by what you want to check: | A project's three directories at once | `claude plugin validate .claude`, or the project root when it has no `.claude-plugin/` manifest | `.claude/skills`, `.claude/agents`, and `.claude/commands` | | Your user-level directories | `claude plugin validate ~/.claude` | `~/.claude/skills`, `~/.claude/agents`, and `~/.claude/commands` | -A plugin run also warns about a `CLAUDE.md` at the plugin root. For paths you set through the [component path fields](/docs/en/plugins-reference#component-path-fields) in `plugin.json`, it checks that each path exists but doesn't read the files there, and it doesn't check a `SKILL.md` at the plugin root. To check a plugin whose skill is its root `SKILL.md`, run the command twice when the plugin sits in a directory named `skills`: name that `skills` directory to check the root `SKILL.md`, and name the plugin directory to check the rest. When the plugin sits under another name, such as `plugins/`, only the second run is available, and no run checks its root `SKILL.md`. +##### Check a plugin whose skill is its root `SKILL.md` + +When you run `claude plugin validate` against a plugin directory, Claude Code doesn't check a `SKILL.md` at the plugin root. When the plugin sits in a directory named `skills`, run the command twice: + +* Name that `skills` directory to check the plugin's root `SKILL.md`. +* Name the plugin directory to check the rest. + +When the plugin sits under another name, such as `plugins/`, the `skills`-directory run isn't available, and no run checks its root `SKILL.md`. + +##### Check files behind symlinks -Claude Code doesn't follow symlinks inside the directory you name. What it does depends on where the link is: +When you run `claude plugin validate`, Claude Code doesn't follow symlinks inside the directory you name. What it does depends on where the link is: * **A linked `skills`, `agents`, or `commands` directory under the plugin or `.claude` root**: Claude Code warns that nothing in it was read. -* **A linked entry inside a `skills`, `agents`, or `commands` directory**: Claude Code skips it and warns, per directory, how many entries it skipped that a session would load. A plugin whose `skills` directory [links to a sibling plugin's skills](/docs/en/plugins-reference#share-files-within-a-marketplace-with-symlinks) passes with warnings; to check the linked skills, name the sibling plugin's directory. The same applies to a [symlinked skill entry](/docs/en/skills#where-skills-live) in `~/.claude/skills` or `.claude/skills`, which a session does follow; to check it, name a directory called `skills` that holds the real folder. +* **A linked entry inside a `skills`, `agents`, or `commands` directory**: Claude Code skips it and warns, per directory, how many entries it skipped that a session would load. * **The `skills`, `agents`, or `commands` directory you name is itself a symlink, or its parent `.claude` directory is**: Claude Code reports an error and checks nothing in it. Name the real directory instead. -A clean run ends with `Validation passed`. `No manifest found in directory` means Claude Code found no `plugin.json` or `marketplace.json` there, and no skill, agent, or command file in the directories it probes under it. Name the `skills`, `agents`, or `commands` directory that holds your files instead. +In two skills cases, the run passes with warnings. To check the linked files, run again and name a directory that holds them directly: + +* **A plugin whose `skills` directory [links to a sibling plugin's skills](/docs/en/plugins-reference#share-files-within-a-marketplace-with-symlinks)**: name the sibling plugin's directory. +* **A [symlinked skill entry](/docs/en/skills#where-skills-live) in `~/.claude/skills` or `.claude/skills`**: Claude Code follows the entry in a session. To check it, name a directory called `skills` that holds the real folder. + +##### Read the validation results + +A clean run ends with `Validation passed`. + +`No manifest found in directory` means Claude Code found no `plugin.json` or `marketplace.json` there, and no skill, agent, or command file in the directories it probes under it. Name the `skills`, `agents`, or `commands` directory that holds your files instead. Two of the errors Claude Code reports from these runs, with the fix for each: * `YAML frontmatter failed to parse: ...`: fix the YAML in the frontmatter block of the skill, agent, or command file. Until you do, a session reads no frontmatter fields from the file * `Invalid JSON syntax: ...` on `hooks/hooks.json`: fix the JSON syntax. Until you do, a session loads the plugin without the hooks in that file. Claude Code reports this error only in a plugin run +In a plugin run, Claude Code also warns about a `CLAUDE.md` at the plugin root. For paths you set through the [component path fields](/docs/en/plugins-reference#component-path-fields) in `plugin.json`, Claude Code checks that each path exists but doesn't read the files there. + ### Plugin installation failures **Symptoms**: Marketplace appears but plugin installation fails diff --git a/content/en/docs/claude-code/prompt-caching.md b/content/en/docs/claude-code/prompt-caching.md index 6049160539..29ef097c2c 100644 --- a/content/en/docs/claude-code/prompt-caching.md +++ b/content/en/docs/claude-code/prompt-caching.md @@ -35,7 +35,7 @@ The prefix-match rule explains most of the behaviors on this page. [Plan mode](/ Two settings aren't part of the prompt text at all, so they don't appear in the layer table, but both are part of the cache key: * **Model**: each model has its own cache. Switching models recomputes the entire request even when the content is identical. See [Switching models](#switching-models) below. -* **Effort level**: each effort level has its own cache for the same model. Changing it mid-session recomputes the entire request, and Claude Code asks you to confirm before applying the change. See [Changing effort level](#changing-effort-level) below. +* **Effort level**: each effort level has its own cache for the same model. Changing effort mid-session recomputes the entire request. See [Changing effort level](#changing-effort-level) below. Pick your model and effort level at the top of a session, then save `/compact` for natural breaks between tasks. The fewer changes you make mid-task, the higher your cache hit rate. @@ -73,13 +73,20 @@ These actions cause the next request to miss part or all of the cache. You see a Each model has its own cache. Switching with [`/model`](/docs/en/model-config#setting-your-model) means the next request reads the entire conversation history with no cache hits, even though the content is identical. +When you run `/model` at the terminal, Claude Code asks you to confirm the switch only while the current cache hasn't expired. Whether the cache has expired depends on how long it has been since Claude Code last sent a request in this conversation or Claude last responded: + +* **Less than one [cache TTL](#cache-lifetime) ago**: the cache is still warm. +* **One cache TTL or longer ago**: the cache has already expired, so Claude Code switches without asking. + +Before v2.1.238, Claude Code didn't check the cache TTL and asked even after the cache had expired. + The [`opusplan` model setting](/docs/en/model-config#opusplan-model-setting) resolves to Opus during plan mode and Sonnet during execution, so each plan-mode toggle is a model switch and starts a fresh cache. [Automatic model fallback](/docs/en/model-config#automatic-model-fallback) on Fable 5 and Opus 5 is also a model switch. When a safety classifier flags a request and the flagged category has a fallback model, Claude Code re-runs the request on that model and the session continues there. ### Changing effort level -The cache is keyed by [effort level](/docs/en/model-config#adjust-effort-level) as well as model, so switching with `/effort` means the next request reads the entire conversation history with no cache hits. Once a conversation has started, Claude Code shows a confirmation dialog before applying an effort change that would invalidate the cache. A change that resolves to the same level already in effect, such as setting the model's default explicitly, skips the dialog and keeps the cache. +The cache is keyed by [effort level](/docs/en/model-config#adjust-effort-level) as well as model, so switching with `/effort` means the next request reads the entire conversation history with no cache hits. Changing effort follows the same confirmation as [switching models](#switching-models). When a change resolves to the same level already in effect, such as setting the model's default explicitly, Claude Code keeps the cache and applies the change without asking. ### Turning on fast mode diff --git a/content/en/docs/claude-code/remote-control.md b/content/en/docs/claude-code/remote-control.md index e79454febd..9f0048b894 100644 --- a/content/en/docs/claude-code/remote-control.md +++ b/content/en/docs/claude-code/remote-control.md @@ -7,7 +7,7 @@ > Continue a local Claude Code session from your phone, tablet, or any browser using Remote Control. Works with claude.ai/code and the Claude mobile app. - Remote Control is in research preview and available on all plans. On Team and Enterprise, it is off by default until an Owner enables the Remote Control toggle in [Claude Code admin settings](https://claude.ai/admin-settings/claude-code). + Remote Control is available on all plans. On Team and Enterprise, it is off by default until an Owner enables the Remote Control toggle in [Claude Code admin settings](https://claude.ai/admin-settings/claude-code). Remote Control connects [claude.ai/code](https://claude.ai/code) or the Claude app for [iOS](https://apps.apple.com/us/app/claude-by-anthropic/id6473753684) and [Android](https://play.google.com/store/apps/details?id=com.anthropic.claude) to a Claude Code session running on your machine. Start a task at your desk, then pick it up from your phone on the couch or a browser on another computer. @@ -142,7 +142,7 @@ Once a Remote Control session is active, you have a few ways to connect from ano * **Scan the QR code** shown alongside the session URL to open it directly in the Claude app. With `claude remote-control`, press spacebar to toggle the QR code display. * **Open [claude.ai/code](https://claude.ai/code) or the Claude app** and find the session by name in the session list. In the Claude mobile app, tap **Code** in the navigation to reach the session list. Remote Control sessions show a computer icon with a green status dot when online. -When you connect, the device shows any subagents and workflows the session already has running in the background. +When you connect, the device shows any subagents and workflows the session already has running in the background. Stop one of them from the device, and Claude Code stops that task on your machine. The remote session title is chosen in this order: @@ -164,6 +164,8 @@ A connected device shows the conversation in your terminal as it happens. These * **Compaction and `/clear`**: while Claude Code [compacts the conversation](/docs/en/context-window#what-survives-compaction), connected devices show the progress and then where the conversation was compacted. When you run `/clear`, the conversation resets on connected devices too. * **Switching conversations with `/resume`**: the connected device doesn't receive the switched-to conversation's title or earlier history, but new messages in both directions go to and from whichever conversation is open in your terminal. To work on the original conversation from the device again, run `/resume` in your terminal and switch back to it. * **Messages from your other sessions**: with [cross-session messaging](/docs/en/cross-session-messaging), the same connection carries messages between your own sessions on different machines and from your [Claude Code on the web](/docs/en/claude-code-on-the-web) sessions, through Anthropic servers like the rest of Remote Control traffic. [Message sessions on other machines](/docs/en/cross-session-messaging#message-sessions-on-other-machines) covers the delivery rules and [Control inbound messages](/docs/en/cross-session-messaging#control-inbound-messages) covers the inbound controls. Requires Claude Code v2.1.224 or later. +* **Prompts you send mid-turn**: when you send a prompt from a connected device before the current turn ends, Claude Code queues it and keeps it in the device's transcript after that turn finishes. +* **Model**: when you pick a [model](/docs/en/model-config) from a connected device, Claude Code runs the session on that model. The terminal's `/model` picker, `/status`, and `/config` show that model. A pick from the device's model control lasts for the current session only. `/model ` sent from the device also sets your default for new sessions, the same as typing it in the terminal. * **Effort level**: when you set the [effort level](/docs/en/model-config#adjust-effort-level) from a connected device, with `/effort` or the device's effort control, Claude Code applies it to the session on your machine, and claude.ai/code shows the level the session is using. If you pinned a level with `CLAUDE_CODE_EFFORT_LEVEL`, the session keeps that level, and Claude Code refuses a different pick from the effort control. A level you pick from the effort control applies to the current session only and doesn't change your saved default. Picking a level from the effort control requires Claude Code v2.1.234 or later on your machine. * **Reconnecting after a connection failure**: run `/remote-control` to reconnect. If compaction rewrote the conversation or you switched conversations with `/resume` in the meantime, Claude Code archives the server session it was using instead of leaving it in the session list. You can still find it by [filtering for archived sessions](/docs/en/claude-code-on-the-web#archive-sessions). Switching conversations while a device is still connected doesn't archive the session. @@ -309,6 +311,8 @@ Claude Code skips mobile push notifications while you are typing in or focused o * **One remote session per interactive process**: outside of server mode, each Claude Code instance supports one remote session at a time. Use [server mode](#start-a-remote-control-session) to run multiple concurrent sessions from a single process. * **Local process must keep running**: Remote Control runs as a local process. If you close the terminal, quit VS Code, or otherwise stop the `claude` process, the session goes offline until you [bring it back](#resume-sessions-after-stopping-the-server). To keep a session running on a remote machine after you disconnect from SSH, start it inside `tmux` or `screen`. +* **Crashed sessions in server mode**: if a session served by `claude remote-control` crashes, send it a message from a connected device. Claude Code serves it again. You don't have to restart the server. +* **HTTP 403 refusals on a connected session**: once an interactive session is connected, Claude Code keeps retrying for up to three minutes when something between your machine and Anthropic's servers answers with HTTP 403, as can happen after a VPN or network change. If the refusals last longer, Claude Code disconnects, and the reason names what refused: a network edge, or a proxy, VPN, or firewall on your own network. * **Extended network outage**: if your machine is awake but can't reach the network, what you do next depends on the mode: * **Server mode**: Claude Code gives up after roughly 10 minutes and the `claude remote-control` process exits. Run `claude remote-control` again to start a new session. * **Interactive session**: keep working locally. Claude Code retries for as long as the outage lasts and reconnects on its own when the network returns. @@ -338,9 +342,13 @@ You're authenticated with a long-lived token from `claude setup-token` or the `C Your cached account information is stale or incomplete. Run `claude auth login` to refresh it. -### "Remote Control is not yet enabled for your account" +### "Remote Control isn't enabled for this account" -The Remote Control rollout has not reached your account, or your cached entitlements are out of date. If you recently changed plans, run `claude auth logout` then `claude auth login` to refresh them. Run `claude doctor` to see which individual eligibility check failed. Environment-variable conflicts, unreachable checks, and organization policy each produce their own message, so this error means the rollout gate itself. Before v2.1.154, a variable that disables feature-flag evaluation, such as `DISABLE_TELEMETRY` or `DO_NOT_TRACK`, also produced this message; the "Remote Control requires feature-flag evaluation" entry below covers that configuration. +Claude Code checked Remote Control availability for the account you're signed in with and the check came back off. The usual cause is cached entitlements that are out of date after a plan change. Run `claude auth logout` then `claude auth login` to refresh them, and update Claude Code if you're on an old version. + +Run `claude doctor` to see which individual eligibility check failed. Environment-variable conflicts, unreachable checks, and your organization's Remote Control setting each produce their own message, so this error means the account-level check itself. + +Before v2.1.239, this message read "Remote Control is not yet enabled for your account". Before v2.1.154, a variable that disables feature-flag evaluation, such as `DISABLE_TELEMETRY` or `DO_NOT_TRACK`, also produced this message; the "Remote Control requires feature-flag evaluation" entry below covers that configuration. ### "Couldn't verify Remote Control eligibility" diff --git a/content/en/docs/claude-code/routines.md b/content/en/docs/claude-code/routines.md index ec29be301f..82bf66e042 100644 --- a/content/en/docs/claude-code/routines.md +++ b/content/en/docs/claude-code/routines.md @@ -44,7 +44,7 @@ Each example pairs a trigger type with the kind of work routines are suited to: ## Create a routine -Create a routine from the web at [claude.ai/code/routines](https://claude.ai/code/routines), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app, click **Routines** in the sidebar, then **New routine**, and choose **Cloud**; choosing **Local** instead creates a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), which runs on your machine rather than in the cloud. +Create a routine from the web at [claude.ai/code/routines](https://claude.ai/code/routines), from the Desktop app, or from the CLI. All three surfaces write to the same cloud account, so a routine you create in one shows up in the others immediately. In the Desktop app's **Code** tab, click **Routines** in the sidebar, then **New routine**, and choose **Cloud**; choosing **Local** instead creates a [Desktop scheduled task](/docs/en/desktop-scheduled-tasks), which runs on your machine rather than in the cloud. The creation form sets up the routine's prompt, repositories, environment, connectors, and triggers. diff --git a/content/en/docs/claude-code/sandboxing.md b/content/en/docs/claude-code/sandboxing.md index 14ab2acb8d..97eda8e156 100644 --- a/content/en/docs/claude-code/sandboxing.md +++ b/content/en/docs/claude-code/sandboxing.md @@ -183,10 +183,11 @@ This syntax differs from [Read and Edit permission rules](/docs/en/permissions#r You can also deny write or read access using `sandbox.filesystem.denyWrite` and `sandbox.filesystem.denyRead`, and re-allow specific paths within a denied region using `sandbox.filesystem.allowRead`. When read rules overlap, the more specific path wins: -| Example rules | Result | -| :------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `"denyRead": ["~/"]` with `"allowRead": ["~/projects"]` | `~/projects` is readable and the rest of the home directory stays blocked. The narrower allow re-opens that part of the denied region | -| `"allowRead": ["~/"]` with `"denyRead": ["~/.env"]` | `~/.env` stays blocked and the rest of the home directory is readable. An exact deny holds inside a wider allow, so a broad allow can't silently re-expose a secret | +| Example rules | Result | +| :------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `"denyRead": ["~/"]` with `"allowRead": ["~/projects"]` | `~/projects` is readable and the rest of the home directory stays blocked. The narrower allow re-opens that part of the denied region | +| `"allowRead": ["~/"]` with `"denyRead": ["~/.env"]` | `~/.env` stays blocked and the rest of the home directory is readable. The deny holds inside a wider allow, so a broad allow can't silently re-expose a secret | +| `"allowRead": ["~/"]` with `"denyRead": ["~/**/.env"]` | Every `.env` under the home directory stays blocked and the rest is readable. A [wildcard deny](/docs/en/settings#sandbox-path-prefixes) holds inside a wider allow the same way an exact path does | The example below blocks reading from the entire home directory while still allowing reads from the current project. Place it in your project's `.claude/settings.json`, because the relative path `.` resolves to the project root only when the configuration lives in project settings: diff --git a/content/en/docs/claude-code/security-guidance.md b/content/en/docs/claude-code/security-guidance.md index a118256233..ac34a12150 100644 --- a/content/en/docs/claude-code/security-guidance.md +++ b/content/en/docs/claude-code/security-guidance.md @@ -14,7 +14,6 @@ The plugin is the in-session companion to [Code Review](/docs/en/code-review), w ## Prerequisites -* Claude Code CLI version 2.1.144 or later * Python 3.7 or later on your `PATH`. The agentic commit review needs Python 3.10 or later, as do all model-backed reviews when Claude Code uses a third-party provider such as Amazon Bedrock or Google Cloud's Agent Platform. The plugin prefers the versioned interpreters `python3.13` through `python3.10`, then falls back to `python3`, `python`, and `py -3` * A git repository for the directory you work in. The end-of-turn and commit reviews diff against git state and skip silently outside a repository. The per-edit pattern check works anywhere diff --git a/content/en/docs/claude-code/self-hosted-environments-configuration.md b/content/en/docs/claude-code/self-hosted-environments-configuration.md index 735eae8f6c..a4a947e0e0 100644 --- a/content/en/docs/claude-code/self-hosted-environments-configuration.md +++ b/content/en/docs/claude-code/self-hosted-environments-configuration.md @@ -132,7 +132,7 @@ The hook fires on every session end where a child process was spawned, whatever * `completed`: a clean exit, including a session archived or deleted while the child was still connected. * `failed`: a child crash or a setup failure after spawn. -* `interrupted`: an idle release, startup timeout, server deassign, drain, watchdog kill, or the [`released=false` backstop](/docs/en/self-hosted-environments-reference#session-lifecycle-counter-semantics). +* `interrupted`: an idle release, startup timeout, server deassign, drain, or watchdog kill. * `abandoned`: reserved for sessions another runner claimed; the hook doesn't currently fire in that case. The [session lifecycle counter semantics](/docs/en/self-hosted-environments-reference#session-lifecycle-counter-semantics) classify an idle release, a startup timeout, and a server deassign as `completed` instead: those are clean handoffs from the session's perspective even though this hook reports them as `interrupted`. @@ -162,6 +162,15 @@ done The hook pushes with whatever git credentials are available in its own environment on the runner host. Under the [no-credentials-in-the-image posture](/docs/en/self-hosted-environments-deploy#configure-git), including when the built-in clone goes through the Anthropic git proxy, there are none, so mint a short-lived push credential inside the hook before pushing: exchange the session token the hook receives in `CLAUDE_CODE_SESSION_ACCESS_TOKEN` with your own token service, verifying it as [Verify session identity](/docs/en/self-hosted-environments-identity) describes. When the hook holds a credential the session didn't, also pin where it pushes: replace `origin` with an operator-supplied URL and pass `-c credential.helper=` plus your own helper, so repo-local config the session wrote can't redirect the credentialed push. +#### Hook timing when the runner releases a session + +A released session can resume on another runner. On a runner on v2.1.236 or later, what the session was doing at release decides whether it can resume before this hook finishes: + +* **Idle after a turn, or timed out at startup**: the runner stops the child and runs this hook to completion. Only then does it release the session. A user message sent while the hook runs can't resume the session on another runner before the hook finishes. +* **Waiting for the user to answer a prompt, such as a permission prompt**: the runner releases the session first, then runs this hook. A user message sent while the hook runs can resume the session on another runner before the hook finishes. + +A release at the [`--retire-at`](/docs/en/self-hosted-environments-reference#runner-cli-flags) time follows the same two paths. During a `SIGTERM` drain, the runner holds the session lease until the hook finishes; see [Shutdown timing](/docs/en/self-hosted-environments-deploy#shutdown-timing). Before v2.1.236, the runner released the session first and then ran this hook on both paths. + ### command Runs once per session after checkout, in place of the built-in child spawn. The hook receives the same environment as a [wrapper script](#wrapper-scripts) and should `exec` into `"$CLAUDE_RUNNER_CLAUDE_BIN"` the same way. Use the `command` hook to keep all customization in one hooks directory; use `--exec-path` when the wrapper lives elsewhere. If `--exec-path` is also set, the flag takes precedence and the `command` hook is ignored. diff --git a/content/en/docs/claude-code/self-hosted-environments-deploy.md b/content/en/docs/claude-code/self-hosted-environments-deploy.md index a13a8fbd71..de3dca92b8 100644 --- a/content/en/docs/claude-code/self-hosted-environments-deploy.md +++ b/content/en/docs/claude-code/self-hosted-environments-deploy.md @@ -74,6 +74,35 @@ Deploy runner and session containers in a network segment or namespace whose out For details on which telemetry each session emits and how to turn it off, see [Telemetry](/docs/en/self-hosted-environments-reference#telemetry). +### Authenticate to an egress proxy + +Some corporate egress proxies require a `Proxy-Authorization` header on every connection. The token in that header often rotates too fast to write into the proxy URL you set in `HTTPS_PROXY`. Set `HTTPS_PROXY` or `HTTP_PROXY` to your proxy's URL as usual, then set `--proxy-authorization-command` or `--proxy-authorization-file` to tell the runner where to read the header value from. Both flags require Claude Code v2.1.238 or later. + +#### Choose where the `Proxy-Authorization` value comes from + +Pick the flag that matches how you produce the `Proxy-Authorization` token: + +* **[`--proxy-authorization-command `](/docs/en/self-hosted-environments-reference#runner-cli-flags)**: choose this for a token you generate on demand. The runner runs the shell command and uses its trimmed stdout as the header value, for example `Bearer `. +* **[`--proxy-authorization-file `](/docs/en/self-hosted-environments-reference#runner-cli-flags)**: choose this for a token another process rotates in place. The runner reads the file and uses its trimmed contents as the header value. + +#### Configurations the runner refuses to start with + +Each flag also has an environment variable form, listed beside it in the [runner CLI flags reference](/docs/en/self-hosted-environments-reference#runner-cli-flags). Before the runner contacts your proxy or the control plane, it checks the flags and their variables, and refuses to start in three cases: + +* **Both flags set**: one flag plus the other flag's environment variable counts as setting both. +* **No proxy URL**: neither `HTTPS_PROXY` nor `HTTP_PROXY` holds an `http://` or `https://` URL. The runner reads both variables in upper or lower case, and doesn't consult `ALL_PROXY`. +* **Either flag passed to the orchestrator subcommand**: `self-hosted-runner orchestrator` doesn't accept the flags or their environment variables. Pass the flag to each runner the orchestrator starts instead. + +#### What the runner changes while a proxy-authorization flag is set + +With either flag set, the runner starts a listener of its own and sends proxy traffic from itself, its lifecycle hooks, and its sessions through that listener. The listener adds the `Proxy-Authorization` header on the way to your proxy. + +* **Listener**: the listener is a forward proxy on `127.0.0.1`. The runner starts the listener before registering with the control plane, and exits at startup if the listener can't start. +* **Proxy variables**: the runner rewrites whichever of `HTTPS_PROXY` and `HTTP_PROXY` you set so that it points at the listener. That rewritten value reaches the runner itself, its lifecycle hooks, and every session it runs. +* **Token rotation**: a rotated token takes effect without a restart. For each connection the listener opens to your proxy, the runner runs your command or reads your file again and adds the result as the header. +* **Session environment**: a session reaches your proxy only through the listener. In each session's environment the runner removes `ALL_PROXY`, removes any spelling of `HTTPS_PROXY` or `HTTP_PROXY` that you didn't set, and pins `NO_PROXY` to the runner's own value. +* **Logs**: the runner never logs the header value. + ## Configure git The runner manages repository checkouts but doesn't configure git identity or credentials by default. You control the runner's image and process environment, so you control the git config. Choose one of two approaches: @@ -262,7 +291,7 @@ secrets: ## Shutdown timing -On `SIGTERM`, the runner stops taking new work, waits up to `--drain-wait-sec`, zero by default, for in-flight turns to finish, terminates each child process, and runs the [`post-session` lifecycle hook](/docs/en/self-hosted-environments-configuration#post-session). The full drain path needs up to `--session-stop-grace-sec` + `--drain-wait-sec` + `--post-session-hook-timeout-sec`, plus 15 seconds of fixed overhead for process cleanup, plus 30 more seconds when [`--push-outcome-on-release`](/docs/en/self-hosted-environments-reference#runner-cli-flags) is set. That is 80 seconds at defaults, and the runner logs the total at startup. Sessions drain in parallel under this one budget, so the total doesn't grow with `--capacity`. +On `SIGTERM`, the runner stops taking new work and, unless you set [`--defer-shutdown-max-min`](#defer-the-drain-past-the-first-signal), waits up to `--drain-wait-sec`, zero by default, for in-flight turns to finish, terminates each child process, and runs the [`post-session` lifecycle hook](/docs/en/self-hosted-environments-configuration#post-session). The full drain path needs up to `--session-stop-grace-sec` + `--drain-wait-sec` + `--post-session-hook-timeout-sec`, plus 15 seconds of fixed overhead for process cleanup, plus 30 more seconds when [`--push-outcome-on-release`](/docs/en/self-hosted-environments-reference#runner-cli-flags) is set. That is 80 seconds at defaults, and the runner logs the total at startup. Sessions drain in parallel under this one budget, so the total doesn't grow with `--capacity`. At the default `--drain-wait-sec 0`, a rolling restart interrupts in-flight turns; each session resumes on another runner, losing unpushed work as described under [Known issues](#additional-limitations). Set `--drain-wait-sec`, and raise the grace period to match, to let turns finish first. @@ -272,17 +301,38 @@ Give the runner at least the total it logs at startup before the host stops it. * **With a `SIGTERM` grace period**: set `terminationGracePeriodSeconds` on Kubernetes, `stop_grace_period` on Docker Compose, or your orchestrator's equivalent to at least that total. The Kubernetes default of 30 seconds is shorter than the runner's drain path, so Kubernetes stops the pod before the runner finishes draining. * **With [`--retire-at`](/docs/en/self-hosted-environments-reference#runner-cli-flags)**: size the margin between the retire time and the host's stop time to cover typical turns, plus the background-task hold that [Runner lifecycle](/docs/en/self-hosted-environments#runner-lifecycle) describes, plus that same total. Compute the retire time at each launch, for example `date +%s` plus the runner's intended lifetime. +* **With [`--defer-shutdown-max-min`](#defer-the-drain-past-the-first-signal)**: add two more parts to the drain-path total. The first is the minutes you configure. The second is the post-release grace that [Defer the drain past the first signal](#defer-the-drain-past-the-first-signal) describes, 75 seconds at defaults. With the flag set, the runner also prints the combined figure at startup, after the drain-path total. + +### Defer the drain past the first signal + +Set [`--defer-shutdown-max-min `](/docs/en/self-hosted-environments-reference#runner-cli-flags) if you want a runner you're restarting to go on serving the sessions it holds for up to `n` minutes, instead of draining them on the first signal. On the first `SIGTERM` or `SIGINT`, the runner stops taking new work and goes on serving the sessions it holds. It keeps polling so that the control plane doesn't requeue those sessions. Requires Claude Code v2.1.238 or later. + +#### What happens to the sessions the runner holds after the first signal + +In the first two stages that follow the signal, the runner releases sessions, and a released session resumes on a fresh runner when its user sends their next message. Counting from the first signal, the runner moves through three stages: + +* **For the first `n` minutes**: the runner serves its sessions normally and keeps enforcing `--startup-timeout-min` and `--kill-session-after-min`. If you also set [`--release-idle-session-min`](/docs/en/self-hosted-environments-reference#runner-cli-flags), the runner releases any session whose user has been idle that long; without it, the runner releases no session early, apart from a startup timeout. +* **When the `n` minutes run out**: the runner releases every session it still holds, idle or not. The runner waits for a mid-turn session's turn to end, and up to 60 seconds more for a turn's background tasks, before releasing that session. +* **When the post-release grace runs out**: the runner drains whatever sessions it still holds, and the control plane requeues each drained session to another runner right away. The post-release grace starts when the `n` minutes run out and is 75 seconds at defaults. If you set `--drain-wait-sec` above 60 seconds, the post-release grace is `--drain-wait-sec` plus 15 seconds instead. + +At any stage, the runner exits 0 as soon as it holds no sessions. A second signal cuts the stages short: the runner drains immediately, as it does on the first signal without `--defer-shutdown-max-min`. Once a drain is under way, the next signal force-exits the runner. That holds whether a second signal or the post-release grace running out started the drain. + +#### Size the stop timeout + +Give your host's stop timeout at least the sum of three parts: the `n` minutes you configure, the post-release grace, and the full drain path that [Shutdown timing](#shutdown-timing) describes. With default settings the post-release grace is 75 seconds and the drain path is 80 seconds, so allow `n` minutes plus 155 seconds. The runner prints this sum at startup whenever `--defer-shutdown-max-min` is set. + +If the stop timeout runs out before the runner finishes, the host kills the runner. The sessions it still holds get no `post-session` hook. The runner doesn't deregister, and the control plane requeues the sessions about a minute later. If you can't give the stop timeout that sum, leave `--defer-shutdown-max-min` unset so the runner drains on the first signal instead. ### What reaches a running post-session hook The `post-session` hook and the Claude session child each run in their own POSIX process group, separate from the runner's, so stop mechanisms reach them differently: -* **A second `SIGTERM` to the runner**: force-exits the runner immediately, skipping whatever remains of the drain path. Nothing signals a mid-run `post-session` hook, so on a bare host where an init process adopts orphans, it finishes on its own, but unsupervised: its timeout budget no longer applies, and a write to the closed log pipe can kill it with `SIGPIPE`, so a hook that needs to survive a forced exit there should redirect its own output to a file. In the container recipes on this page the runner is the container's PID 1 and its exit ends the container, and under systemd's default `KillMode=control-group` the cgroup kill in the third bullet applies; in both, treat a forced exit as fatal to the hook and rely on the grace period instead. +* **A `SIGTERM` while the runner is already draining**: force-exits the runner immediately, skipping whatever remains of the drain path. Without [`--defer-shutdown-max-min`](#defer-the-drain-past-the-first-signal), that is the second `SIGTERM` the runner receives. Nothing signals a mid-run `post-session` hook, so on a bare host where an init process adopts orphans, it finishes on its own, but unsupervised: its timeout budget no longer applies, and a write to the closed log pipe can kill it with `SIGPIPE`, so a hook that needs to survive a forced exit there should redirect its own output to a file. In the container recipes on this page the runner is the container's PID 1 and its exit ends the container, and under systemd's default `KillMode=control-group` the cgroup-wide kill reaches the hook too, as the **Cgroup-wide kills** entry describes; in both, treat a forced exit as fatal to the hook and rely on the grace period instead. * **Process-group-wide signals**, such as `kill -- -` in a wrapper script, shell job control, or a group-wide watchdog: reach the runner and a mid-`checkout`-hook subprocess, which stays group-attached deliberately, but not a mid-run `post-session` hook or the session child. * **Cgroup-wide kills**, such as systemd's default `KillMode=control-group` or the `SIGKILL` Kubernetes delivers to the whole container when `terminationGracePeriodSeconds` expires: reach everything, including the hook. Process-group isolation doesn't protect against these, which is why the grace period must cover the full drain path. * **The hook's own timeout**: when a hook exceeds `--post-session-hook-timeout-sec`, the runner sends `SIGTERM` to the hook's whole process group, then `SIGKILL` two seconds later, so a worker the hook forked, such as tar, rsync, or git, terminates with the wrapper shell instead of surviving as an orphan. The runner's supervision ends once the hook's stdio closes: a worker that redirected its own output to a file and outlives the `SIGTERM` stage is past the runner's reach. -On the first `SIGTERM`, and again on a forced exit, the runner logs how many `post-session` hooks are still running, so you can tell a quiet drain from one that's mid-snapshot. +When the drain starts, and again on a forced exit, the runner logs how many `post-session` hooks are still running, so you can tell a quiet drain from one that's mid-snapshot. ## Keep the base directory and capacity identical across runners @@ -362,6 +412,7 @@ Common issues: * **Runner exits at startup with `cannot create or write to base directory`**: the runner can't create or write to `--base-dir`, which defaults to `/workspace`. Fix the directory's ownership or point `--base-dir` at a writable path, as described in [Keep the base directory and capacity identical across runners](#keep-the-base-directory-and-capacity-identical-across-runners). If the runner instead logs `[runner:fatal]` saying the base directory check timed out, the directory is on a hung NFS or CSI mount. Check mount health rather than permissions. The runner prints both of these startup failures to stderr before it opens `--log-file`, so look for them in the terminal or your platform's container logs rather than the log file. Before v2.1.225, the runner didn't check the base directory at startup, and this misconfiguration failed sessions after pickup instead. * **Sessions stay queued**: every online runner may be locked to a different account. Check each runner's `claude_code_self_hosted_runner_locked_account` [metric](/docs/en/self-hosted-environments-reference#prometheus-metrics) or its `Picked up session` log lines to see which account holds it. Add replicas, or wait for an existing runner to drain and restart. If the environment uses on-demand runners, check the orchestrator instead; see [On-demand runners](/docs/en/self-hosted-environments-configuration#on-demand-runners). * **Sessions fail immediately after pickup**: open the session in claude.ai/code to see the error. The most common causes are missing [git credentials](#configure-git) in the runner image and build tools that aren't installed. An unwritable base directory stops the runner at startup instead of failing sessions. See the **Runner exits at startup with `cannot create or write to base directory`** entry in this list. +* **Sessions can't reach the network through an authenticating egress proxy**: when the source you set with [`--proxy-authorization-command` or `--proxy-authorization-file`](#authenticate-to-an-egress-proxy) fails, times out after 30 seconds, or yields an empty value, the runner answers that connection `502 Bad Gateway` and logs why. The runner redacts the command's stderr in that log and never logs the header value. With `--proxy-authorization-command`, run the command yourself on the host to confirm it prints the whole header value on stdout. If the runner instead exits at startup with `could not start the proxy-authorization listener`, it couldn't open its loopback listener. * **A session's branch no longer exists on the remote**: for a git source the session only reads from, the runner skips that source and continues on the remaining ones. For the source the session pushes results to, a deleted branch, typically because it was merged and auto-deleted, fails the session with an error naming the repository and branch and asking you to restore the branch and retry. The runner fails the session with the same error when skipping would leave it with no repository at all. Before v2.1.228, such a session started in an empty directory. * **Sessions take minutes to start**: the initial clone usually dominates. Watch the `claude_code_self_hosted_runner_session_init_duration_seconds` [metric](/docs/en/self-hosted-environments-reference#prometheus-metrics) to confirm, and cut the clone with a [pre-warmed checkout](#reuse-a-pre-warmed-checkout) or a smaller `CLAUDE_RUNNER_FETCH_DEPTH`. * **Pod is killed mid-drain**: raise `terminationGracePeriodSeconds` to at least the value the runner logs at startup. See [Shutdown timing](#shutdown-timing). diff --git a/content/en/docs/claude-code/self-hosted-environments-reference.md b/content/en/docs/claude-code/self-hosted-environments-reference.md index ecb3e25f5d..38e4cfdc99 100644 --- a/content/en/docs/claude-code/self-hosted-environments-reference.md +++ b/content/en/docs/claude-code/self-hosted-environments-reference.md @@ -18,35 +18,38 @@ Metric series and a few API fields still use `pool` for what these pages call an Most flags have a corresponding environment variable. When both are set, the flag takes precedence. Duration flags take minutes or seconds on the CLI, but the paired environment variable is always in milliseconds, indicated by the `_MS` suffix, and the Default column shows the flag's unit: `--exit-if-unused-min 10` is equivalent to `SELF_HOSTED_RUNNER_IDLE_SHUTDOWN_MS=600000`, and a Helm value like `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS: "15"` means 15 milliseconds, not the 15-minute default. -| Flag | Env var | Default | Description | -| :------------------------------------ | :------------------------------------------------ | :---------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `--api-url ` | none | `https://api.anthropic.com` | API base URL. Override only for testing. | -| `--base-dir ` | `SELF_HOSTED_RUNNER_BASE_DIR` | `/workspace`; none on Windows | Directory for repository checkouts and per-session working directories. The runner needs write access to this path or its parent. The runner creates the directory at startup and exits with `cannot create or write to base directory` when it can't create or write to it. Before v2.1.225, the runner created the directory when the first session started, so an unusable path failed sessions rather than startup. On Windows, which isn't a supported runner host, there is no default: the runner exits at startup unless you pass the flag or set the variable. Use the same value on every runner in an environment. See [Keep the base directory and capacity identical across runners](/docs/en/self-hosted-environments-deploy#keep-the-base-directory-and-capacity-identical-across-runners). | -| `--capacity ` | none | `1` | Maximum concurrent sessions this runner handles. All sessions belong to the same locked account. Use the same value on every runner in an environment; see [Keep the base directory and capacity identical across runners](/docs/en/self-hosted-environments-deploy#keep-the-base-directory-and-capacity-identical-across-runners). | -| `--configure-git` | `SELF_HOSTED_RUNNER_CONFIGURE_GIT=1` | off | Write global git identity and enable Anthropic commit signing at startup. See [Configure git](/docs/en/self-hosted-environments-deploy#configure-git). | -| `--confine-repo-settings ` | `SELF_HOSTED_RUNNER_CONFINE_REPO_SETTINGS` | `warn` | Sets the mode of the guard that flags a session when a repository's committed settings try to grant write or read access outside that session's own workspace, set environment variables, or override the operator's sandbox or hooks posture, such as `sandbox.enabled: false` or `disableAllHooks`. The default `warn` logs the violation and still starts the session, `enforce` refuses the session, and `off` disables the scan. See [Harden your deployment](/docs/en/self-hosted-environments-deploy#harden-your-deployment). | -| `--debug-token-dir ` | `SELF_HOSTED_RUNNER_DEBUG_TOKEN_DIR` | unset | Write live tokens to disk for inspection. Debug only; don't use in production. | -| `--drain-grace-sec ` | `SELF_HOSTED_RUNNER_DRAIN_GRACE_MS` | `0` | Controls when the runner exits after its active sessions finish: `0` exits immediately without polling for more, and a positive value keeps the runner alive and re-polling the locked account's queue for that many seconds first, at the cost of the per-session container isolation described in the [hardening section](/docs/en/self-hosted-environments-deploy#harden-your-deployment) | -| `--drain-wait-sec ` | `SELF_HOSTED_RUNNER_DRAIN_WAIT_MS` | `0` | On `SIGTERM`, wait up to N seconds for each session's in-flight turn and background tasks to finish before terminating the child. During this wait, the runner counts a background task that has just finished as still running until the follow-up turn that reads its result starts, for at most the [`SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS`](#environment-variable-only-settings) window. | -| `--environment-secret-file ` | `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET` | required | Path to a file containing the environment secret, or, for runners spawned by the [orchestrator](/docs/en/self-hosted-environments-configuration#on-demand-runners), the single-use work-order JWT. `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET` carries the secret value directly, not a file path. The older `--pool-secret-file` flag and `SELF_HOSTED_RUNNER_POOL_SECRET` variable still work and print a deprecation notice to stderr; preview-program runner builds older than 2.1.216 only recognize those older names. | -| `--exec-path ` | `SELF_HOSTED_RUNNER_EXEC_PATH` | own binary | Binary or wrapper script to spawn for each session. See [Wrapper scripts](/docs/en/self-hosted-environments-configuration#wrapper-scripts). | -| `--exit-if-unused-min ` | `SELF_HOSTED_RUNNER_IDLE_SHUTDOWN_MS` | `0` | Exit after N minutes of polling with no work ever assigned, for autoscaler scale-down. `0` disables. | -| `--git-host-rewrite =` | none | unset | Rewrite `https:///...` source URLs to `https:///...` before cloning, for split-horizon DNS. Repeatable; flag only. | -| `--git-ssh-rewrite ` | none | unset | Rewrite `https:///...` source URLs to `git@:...` before cloning, for SSH-only git hosts. Repeatable; flag only. | -| `--health-port ` | `SELF_HOSTED_RUNNER_HEALTH_PORT` | `8080` | Port for the `/healthz` and `/metrics` listener. Set `0` to disable. | -| `--hooks-dir ` | `SELF_HOSTED_RUNNER_HOOKS_DIR` | unset | Directory of lifecycle hook scripts. See [Lifecycle hooks](/docs/en/self-hosted-environments-configuration#lifecycle-hooks). | -| `--kill-session-after-min ` | `SELF_HOSTED_RUNNER_MAX_LIFETIME_MS` | `0` | Terminate a session child once it has lived N minutes wall-clock, as a safety limit for stuck sessions. A kill that falls mid-turn is deferred until the turn finishes, bounded by a grace window. `0` disables. | -| `--lock-to-account ` | `SELF_HOSTED_RUNNER_LOCK_TO_ACCOUNT` | unset | Pre-lock the runner to a specific account at startup instead of locking on first session. Accepts an email address or `user_...` ID in the environment's organization. | -| `--log-file ` | `SELF_HOSTED_RUNNER_LOG_FILE` | unset | Mirror runner logs to a file in addition to stdout and stderr, created with `0600` permissions. Required for `self-hosted-runner doctor` to tail logs locally. | -| `--log-level ` | none | `info` | `info` or `debug` | -| `--post-session-hook-timeout-sec ` | `SELF_HOSTED_RUNNER_POST_SESSION_HOOK_TIMEOUT_MS` | `60` | Budget for the [`post-session` hook](/docs/en/self-hosted-environments-configuration#post-session) on every session end, including runner shutdown | -| `--push-outcome-on-release` | `SELF_HOSTED_RUNNER_PUSH_OUTCOME_ON_RELEASE` | off | On a runner-initiated session end such as a drain or idle release, push tracked outcome branches to `origin` before deleting the workspace, so in-flight commits survive a restart. Best-effort; adds 30 seconds to the shutdown budget, and requires git 2.29 or newer to resume from the pushed branch. Restrict push access to `claude/*` refs before enabling; see [Resumed sessions lose unpushed work](/docs/en/self-hosted-environments-deploy#additional-limitations). Repositories checked out via a `checkout` lifecycle hook aren't pushed; snapshot those from the [`post-session` hook](/docs/en/self-hosted-environments-configuration#post-session) instead. | -| `--release-idle-session-min ` | `SELF_HOSTED_RUNNER_SESSION_IDLE_MS` | `0` | Release a session slot after N minutes of inactivity once a turn finishes or the session waits for the user's action. A session that's still mid-turn, including one holding a never-finishing background task or an approval requested from inside a running tool call, doesn't count as idle; pair with `--kill-session-after-min` as the hard backstop. After a session's background task finishes, the runner considers the session busy until the follow-up turn that reads the result starts, for at most the [`SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS`](#environment-variable-only-settings) window. A release that leaves the runner with no active sessions starts the same exit path as a normal drain, governed by `--drain-grace-sec`. `0` disables. | -| `--retire-at ` | `SELF_HOSTED_RUNNER_RETIRE_AT` | unset | Retire the runner at an absolute Unix timestamp in seconds, for infrastructure that kills the runner at a known time; [Runner lifecycle](/docs/en/self-hosted-environments#runner-lifecycle) describes the release sequence and how to size the margin. Values before 2001 or after the year 5138 are rejected by the flag and ignored by the environment variable. | -| `--session-stop-grace-sec ` | `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS` | `5` | How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child's own `SessionEnd` hooks need more time. | -| `--startup-timeout-min ` | `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS` | `15` | Release a session slot if the child hasn't signaled that it initialized within N minutes of spawn. Cleared by the child's init signal on the [activity channel](/docs/en/self-hosted-environments-configuration#keep-stdin-and-file-descriptor-3-attached), not by ordinary output, after which `--release-idle-session-min` takes over. `0` disables. | -| `--trust-workspace [bool]` | `SELF_HOSTED_RUNNER_TRUST_WORKSPACE` | on | Seed persisted trust for each session's repository paths so repo-committed `permissions.allow` and `additionalDirectories` are honored. Set `false` to drop repo-committed permission grants and configure allow rules in the host config's `settings.json` instead; repository-committed `sandbox.*` settings still apply either way, which is why the [repo-settings guard](/docs/en/self-hosted-environments-deploy#harden-your-deployment) scans them regardless of this flag. | -| `--use-anthropic-git-proxy` | `CLAUDE_RUNNER_USE_GIT_PROXY=1` | off | Clone via Anthropic's git proxy instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or newer; the runner refuses to start otherwise. Supersedes the rewrite flags. | +| Flag | Env var | Default | Description | +| :---------------------------------------- | :------------------------------------------------ | :---------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `--api-url ` | none | `https://api.anthropic.com` | API base URL. Override only for testing. | +| `--base-dir ` | `SELF_HOSTED_RUNNER_BASE_DIR` | `/workspace`; none on Windows | Directory for repository checkouts and per-session working directories. The runner needs write access to this path or its parent. The runner creates the directory at startup and exits with `cannot create or write to base directory` when it can't create or write to it. Before v2.1.225, the runner created the directory when the first session started, so an unusable path failed sessions rather than startup. On Windows, which isn't a supported runner host, there is no default: the runner exits at startup unless you pass the flag or set the variable. Use the same value on every runner in an environment. See [Keep the base directory and capacity identical across runners](/docs/en/self-hosted-environments-deploy#keep-the-base-directory-and-capacity-identical-across-runners). | +| `--capacity ` | none | `1` | Maximum concurrent sessions this runner handles. All sessions belong to the same locked account. Use the same value on every runner in an environment; see [Keep the base directory and capacity identical across runners](/docs/en/self-hosted-environments-deploy#keep-the-base-directory-and-capacity-identical-across-runners). | +| `--configure-git` | `SELF_HOSTED_RUNNER_CONFIGURE_GIT=1` | off | Write global git identity and enable Anthropic commit signing at startup. See [Configure git](/docs/en/self-hosted-environments-deploy#configure-git). | +| `--confine-repo-settings ` | `SELF_HOSTED_RUNNER_CONFINE_REPO_SETTINGS` | `warn` | Sets the mode of the guard that flags a session when a repository's committed settings try to grant write or read access outside that session's own workspace, set environment variables, or override the operator's sandbox or hooks posture, such as `sandbox.enabled: false` or `disableAllHooks`. The default `warn` logs the violation and still starts the session, `enforce` refuses the session, and `off` disables the scan. See [Harden your deployment](/docs/en/self-hosted-environments-deploy#harden-your-deployment). | +| `--debug-token-dir ` | `SELF_HOSTED_RUNNER_DEBUG_TOKEN_DIR` | unset | Write live tokens to disk for inspection. Debug only; don't use in production. | +| `--defer-shutdown-max-min ` | `SELF_HOSTED_RUNNER_DEFER_SHUTDOWN_MAX_MS` | `0` | On the first `SIGTERM` or `SIGINT`, keep serving the sessions already attached instead of draining them, then release whatever is still attached N minutes later and exit. Raise your host's stop timeout before you set this. See [Defer the drain past the first signal](/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal). `0` disables. Requires Claude Code v2.1.238 or later. | +| `--drain-grace-sec ` | `SELF_HOSTED_RUNNER_DRAIN_GRACE_MS` | `0` | Until the runner receives a shutdown signal or reaches its retire time, controls when the runner exits after its active sessions finish: `0` exits immediately without polling for more, and a positive value keeps the runner alive and re-polling the locked account's queue for that many seconds first, at the cost of the per-session container isolation described in the [hardening section](/docs/en/self-hosted-environments-deploy#harden-your-deployment). After a first signal you deferred with [`--defer-shutdown-max-min`](/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal), the runner exits as soon as it holds no sessions, whatever you set here. | +| `--drain-wait-sec ` | `SELF_HOSTED_RUNNER_DRAIN_WAIT_MS` | `0` | Once the drain starts, which is on `SIGTERM` unless you set [`--defer-shutdown-max-min`](/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal), wait up to N seconds for each session's in-flight turn and background tasks to finish before terminating the child. During this wait, the runner counts a background task that has just finished as still running until the follow-up turn that reads its result starts, for at most the [`SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS`](#environment-variable-only-settings) window. | +| `--environment-secret-file ` | `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET` | required | Path to a file containing the environment secret, or, for runners spawned by the [orchestrator](/docs/en/self-hosted-environments-configuration#on-demand-runners), the single-use work-order JWT. `SELF_HOSTED_RUNNER_ENVIRONMENT_SECRET` carries the secret value directly, not a file path. The older `--pool-secret-file` flag and `SELF_HOSTED_RUNNER_POOL_SECRET` variable still work and print a deprecation notice to stderr; preview-program runner builds older than 2.1.216 only recognize those older names. | +| `--exec-path ` | `SELF_HOSTED_RUNNER_EXEC_PATH` | own binary | Binary or wrapper script to spawn for each session. See [Wrapper scripts](/docs/en/self-hosted-environments-configuration#wrapper-scripts). | +| `--exit-if-unused-min ` | `SELF_HOSTED_RUNNER_IDLE_SHUTDOWN_MS` | `0` | Exit after N minutes of polling with no work ever assigned, for autoscaler scale-down. `0` disables. | +| `--git-host-rewrite =` | none | unset | Rewrite `https:///...` source URLs to `https:///...` before cloning, for split-horizon DNS. Repeatable; flag only. | +| `--git-ssh-rewrite ` | none | unset | Rewrite `https:///...` source URLs to `git@:...` before cloning, for SSH-only git hosts. Repeatable; flag only. | +| `--health-port ` | `SELF_HOSTED_RUNNER_HEALTH_PORT` | `8080` | Port for the `/healthz` and `/metrics` listener. Set `0` to disable. | +| `--hooks-dir ` | `SELF_HOSTED_RUNNER_HOOKS_DIR` | unset | Directory of lifecycle hook scripts. See [Lifecycle hooks](/docs/en/self-hosted-environments-configuration#lifecycle-hooks). | +| `--kill-session-after-min ` | `SELF_HOSTED_RUNNER_MAX_LIFETIME_MS` | `0` | Terminate a session child once it has lived N minutes wall-clock, as a safety limit for stuck sessions. A kill that falls mid-turn is deferred until the turn finishes, bounded by a grace window. `0` disables. | +| `--lock-to-account ` | `SELF_HOSTED_RUNNER_LOCK_TO_ACCOUNT` | unset | Pre-lock the runner to a specific account at startup instead of locking on first session. Accepts an email address or `user_...` ID in the environment's organization. | +| `--log-file ` | `SELF_HOSTED_RUNNER_LOG_FILE` | unset | Mirror runner logs to a file in addition to stdout and stderr, created with `0600` permissions. Required for `self-hosted-runner doctor` to tail logs locally. | +| `--log-level ` | none | `info` | `info` or `debug` | +| `--post-session-hook-timeout-sec ` | `SELF_HOSTED_RUNNER_POST_SESSION_HOOK_TIMEOUT_MS` | `60` | Budget for the [`post-session` hook](/docs/en/self-hosted-environments-configuration#post-session) on every session end, including runner shutdown | +| `--proxy-authorization-command ` | `SELF_HOSTED_RUNNER_PROXY_AUTHORIZATION_COMMAND` | unset | Shell command the runner runs for every connection to your egress proxy, using its trimmed stdout as the `Proxy-Authorization` header value. Requires `HTTPS_PROXY` or `HTTP_PROXY`, and can't be combined with `--proxy-authorization-file`. See [Authenticate to an egress proxy](/docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy). Requires Claude Code v2.1.238 or later. | +| `--proxy-authorization-file ` | `SELF_HOSTED_RUNNER_PROXY_AUTHORIZATION_FILE` | unset | File the runner reads for every connection to your egress proxy, using its trimmed contents as the `Proxy-Authorization` header value. Use this flag for a token another process rotates in place. Carries the same requirements as `--proxy-authorization-command`, and can't be combined with it. See [Authenticate to an egress proxy](/docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy). Requires Claude Code v2.1.238 or later. | +| `--push-outcome-on-release` | `SELF_HOSTED_RUNNER_PUSH_OUTCOME_ON_RELEASE` | off | On a runner-initiated session end such as a drain or idle release, push tracked outcome branches to `origin` before deleting the workspace, so in-flight commits survive a restart. Best-effort; adds 30 seconds to the shutdown budget, and requires git 2.29 or newer to resume from the pushed branch. Restrict push access to `claude/*` refs before enabling; see [Resumed sessions lose unpushed work](/docs/en/self-hosted-environments-deploy#additional-limitations). Repositories checked out via a `checkout` lifecycle hook aren't pushed; snapshot those from the [`post-session` hook](/docs/en/self-hosted-environments-configuration#post-session) instead. | +| `--release-idle-session-min ` | `SELF_HOSTED_RUNNER_SESSION_IDLE_MS` | `0` | Release a session slot after N minutes of inactivity once a turn finishes or the session waits for the user's action. A session that's still mid-turn, including one holding a never-finishing background task or an approval requested from inside a running tool call, doesn't count as idle; pair with `--kill-session-after-min` as the hard backstop. After a session's background task finishes, the runner considers the session busy until the follow-up turn that reads the result starts, for at most the [`SELF_HOSTED_RUNNER_BG_RESULT_GRACE_MS`](#environment-variable-only-settings) window. Until the runner receives a shutdown signal or reaches its retire time, a release that leaves the runner with no active sessions starts the same exit path as a normal drain, governed by `--drain-grace-sec`. After a first signal you deferred with [`--defer-shutdown-max-min`](/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal), the runner exits as soon as a release leaves it holding no sessions. `0` disables. | +| `--retire-at ` | `SELF_HOSTED_RUNNER_RETIRE_AT` | unset | Retire the runner at an absolute Unix timestamp in seconds, for infrastructure that kills the runner at a known time; [Runner lifecycle](/docs/en/self-hosted-environments#runner-lifecycle) describes the release sequence and how to size the margin. Values before 2001 or after the year 5138 are rejected by the flag and ignored by the environment variable. | +| `--session-stop-grace-sec ` | `SELF_HOSTED_RUNNER_SESSION_STOP_GRACE_MS` | `5` | How long to wait for the Claude process to exit cleanly after a session ends, before force-killing it. Raise the value if the child's own `SessionEnd` hooks need more time. | +| `--startup-timeout-min ` | `SELF_HOSTED_RUNNER_STARTUP_TIMEOUT_MS` | `15` | Release a session slot if the child hasn't signaled that it initialized within N minutes of spawn. Cleared by the child's init signal on the [activity channel](/docs/en/self-hosted-environments-configuration#keep-stdin-and-file-descriptor-3-attached), not by ordinary output, after which `--release-idle-session-min` takes over. `0` disables. | +| `--trust-workspace [bool]` | `SELF_HOSTED_RUNNER_TRUST_WORKSPACE` | on | Seed persisted trust for each session's repository paths so repo-committed `permissions.allow` and `additionalDirectories` are honored. Set `false` to drop repo-committed permission grants and configure allow rules in the host config's `settings.json` instead; repository-committed `sandbox.*` settings still apply either way, which is why the [repo-settings guard](/docs/en/self-hosted-environments-deploy#harden-your-deployment) scans them regardless of this flag. | +| `--use-anthropic-git-proxy` | `CLAUDE_RUNNER_USE_GIT_PROXY=1` | off | Clone via Anthropic's git proxy instead of customer-managed git auth. Requires `--capacity 1` and git 2.32 or newer; the runner refuses to start otherwise. Supersedes the rewrite flags. | Most duration flags have a maximum, chosen to keep each timeout inside the runtime's 32-bit timer ceiling of roughly 24.85 days. The `--*-min` flags cap at 10080 minutes, 7 days; `--drain-grace-sec` at 604800 seconds, also 7 days; and `--drain-wait-sec` at 86400 seconds, 24 hours. `--session-stop-grace-sec` and `--post-session-hook-timeout-sec` are uncapped. Overrunning a cap behaves differently per surface: @@ -288,7 +291,7 @@ The `sessions_started_total`, `sessions_completed_total`, `sessions_failed_total * `completed`: the session ended cleanly. This covers the child exiting on its own with code `0`, the session being archived or deleted while the child was still connected, and the runner releasing the slot as a clean handoff: an idle release, a startup timeout, or a server-side deassign the poll loop noticed before the child exited. Increments `sessions_completed_total`. * `failed`: the child exited on its own with a non-zero code, either a crash or a setup failure after spawn. Increments `sessions_failed_total`. -* `interrupted`: the runner terminated the child for an operational reason that's neither a session success nor a runner fault, such as a drain, for example a Kubernetes rolling restart sending `SIGTERM`, the max-lifetime watchdog `--kill-session-after-min`, or the `released=false` backstop: the runner terminates the child after the control plane declines three consecutive idle-release requests, each because a user message was still waiting to be processed. Increments `sessions_interrupted_total`. +* `interrupted`: the runner terminated the child for an operational reason that's neither a session success nor a runner fault, such as a drain or the max-lifetime watchdog `--kill-session-after-min`. A Kubernetes rolling restart sending `SIGTERM` is one example of a drain. Increments `sessions_interrupted_total`. The [`post-session` hook](/docs/en/self-hosted-environments-configuration#post-session)'s `CLAUDE_RUNNER_EXIT_REASON` doesn't use this classification for clean handoffs. The hook reports an idle release, a startup timeout, and a server deassign as `interrupted`, since from the hook's perspective the runner killed the child, while the counters above record those same events as `completed`, since nothing went wrong and the slot was handed back cleanly. If you reconcile hook receipts against `sessions_completed_total` directly, you undercount completions. Use the hook for per-session guarantees and the counters for aggregate rates. diff --git a/content/en/docs/claude-code/self-hosted-environments.md b/content/en/docs/claude-code/self-hosted-environments.md index 90f197001f..b136be11de 100644 --- a/content/en/docs/claude-code/self-hosted-environments.md +++ b/content/en/docs/claude-code/self-hosted-environments.md @@ -85,16 +85,18 @@ When a developer starts a session and selects your environment, Anthropic's cont 3. The child streams events back over HTTPS while the runner keeps polling; each poll refreshes the lease and doubles as the heartbeat. 4. If the runner stops polling for about 60 seconds, the server requeues the session for another runner. +The runner gives each poll request 10 seconds. When a request times out or is lost, the runner retries after a second or two instead of waiting for the next scheduled poll. Each further request that times out or is lost doubles the gap before the next retry, up to 20 seconds, and the runner shortens the gap whenever the lease is close to expiring. + ### Runner lifecycle -The first session a runner picks up locks the runner to the account of the user who started that session, and the runner runs up to `--capacity` concurrent sessions for that account. While the runner has active sessions, the runner keeps claiming the locked account's queued work. What happens once they finish depends on [`--drain-grace-sec`](/docs/en/self-hosted-environments-reference#runner-cli-flags): +The first session a runner picks up locks the runner to the account of the user who started that session, and the runner runs up to `--capacity` concurrent sessions for that account. While the runner has active sessions and hasn't received a shutdown signal or reached its retire time, the runner keeps claiming the locked account's queued work. What happens once they finish depends on [`--drain-grace-sec`](/docs/en/self-hosted-environments-reference#runner-cli-flags): * **At the default of `0`**: the runner exits as soon as its active sessions finish, without polling for more, so the orchestrator you deploy it under, such as Kubernetes, can restart it with a fresh disk, ready to serve any account. * **At a positive value**: the runner keeps polling the locked account's queue for that many seconds before exiting. This lifecycle isolates each user's checked-out code without requiring the runner to delete disk state between users. -A kill that delivers `SIGTERM` needs no flag: the runner drains as [Shutdown timing](/docs/en/self-hosted-environments-deploy#shutdown-timing) describes. If your infrastructure instead destroys hosts at a known wall-clock time without a signal, or with a grace period too short to drain, such as a sandbox lifetime cap or spot-instance reclamation, pass `--retire-at ` set to a few minutes before that time. At the retire time: +How your infrastructure stops a runner decides whether you need `--retire-at`. A kill that delivers `SIGTERM` needs no flag: the runner drains as [Shutdown timing](/docs/en/self-hosted-environments-deploy#shutdown-timing) describes, or keeps serving the sessions it already holds when you set [`--defer-shutdown-max-min`](/docs/en/self-hosted-environments-deploy#defer-the-drain-past-the-first-signal). If your infrastructure instead destroys hosts at a known wall-clock time without a signal, or with a grace period too short to drain, such as a sandbox lifetime cap or spot-instance reclamation, pass `--retire-at ` set to a few minutes before that time. At the retire time: 1. The runner stops taking new work. 2. The runner releases each active session through the same release path the [`--release-idle-session-min`](/docs/en/self-hosted-environments-reference#runner-cli-flags) flag uses, so the session resumes on a fresh runner when the user sends their next message. When the runner releases each session depends on its state: @@ -117,6 +119,8 @@ Model inference uses the Anthropic API. The control plane delivers the API endpo Corporate egress proxies are supported. The runner and the optional [autoscaling orchestrator](/docs/en/self-hosted-environments-configuration#on-demand-runners) honor the proxy and mTLS environment variables described in [Network configuration](/docs/en/network-config), such as `HTTPS_PROXY` and `NO_PROXY`; set them in each process's environment. The variables cover control-plane calls, the orchestrator's [SCM connector](/docs/en/self-hosted-environments-reference#scm-connector-flags) WebSocket, and the built-in clone for HTTPS remotes, and sessions inherit them from the runner. Session streaming uses server-sent events over HTTPS, so a proxy in the path must not buffer responses. +If your proxy also requires a `Proxy-Authorization` header, the runner can add it to each connection it opens to the proxy; see [Authenticate to an egress proxy](/docs/en/self-hosted-environments-deploy#authenticate-to-an-egress-proxy). + ## What stays on your infrastructure Repository checkouts, build artifacts, secrets, and any files a session creates or modifies stay on the machines you provision. The conversation itself, including prompts, responses, and tool results, goes to `api.anthropic.com` for model inference, and Anthropic stores the session transcript so you can resume the session from another [supported surface](#availability-and-limitations). diff --git a/content/en/docs/claude-code/server-managed-settings.md b/content/en/docs/claude-code/server-managed-settings.md index 61ca293f14..196bb96fc9 100644 --- a/content/en/docs/claude-code/server-managed-settings.md +++ b/content/en/docs/claude-code/server-managed-settings.md @@ -120,9 +120,9 @@ Server-managed settings have the following limitations: Server-managed settings and [endpoint-managed settings](/docs/en/settings#settings-files) both occupy the highest tier in the Claude Code [settings hierarchy](/docs/en/settings#settings-precedence). No other settings level can override them, including command line arguments, apart from the [exceptions to managed settings precedence](/docs/en/settings#exceptions-to-managed-settings-precedence). -Within the managed tier, a configured [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) preempts every other managed source, including server-managed settings: its output becomes the only managed configuration for the run. +Within the managed tier, Claude Code uses the first source that delivers a non-empty configuration. Server-managed settings are checked first, then endpoint-managed settings. Apart from the [exception keys covered next](#per-key-exceptions-across-managed-sources), sources don't merge: if server-managed settings deliver any keys at all, other endpoint-managed settings are ignored. If server-managed settings deliver nothing, endpoint-managed settings apply. -Otherwise, Claude Code uses the first source that delivers a non-empty configuration. Server-managed settings are checked first, then endpoint-managed settings. Apart from the [exception keys covered next](#per-key-exceptions-across-managed-sources), sources don't merge: if server-managed settings deliver any keys at all, other endpoint-managed settings are ignored. If server-managed settings deliver nothing, endpoint-managed settings apply. +If the winning source is an MDM or file-based source that configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output replaces it as the only managed configuration for the run. A `policyHelper` configured in MDM or file-based settings is not consulted while server-managed settings deliver a non-empty configuration. If you clear your server-managed configuration in the admin console with the intent of falling back to an endpoint-managed plist or registry policy, be aware that [cached settings](#fetch-and-caching-behavior) persist on client machines until the next successful fetch. Run `/status` to see which managed source is active. @@ -130,7 +130,7 @@ If you clear your server-managed configuration in the admin console with the int Two kinds of keys are exceptions to the no-merge rule: -* **Cross-source lock keys**: a small set of keys, such as the sandbox allowlist locks, [listed in the settings reference](/docs/en/settings#precedence-within-the-managed-tier). They are honored when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded, and when a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured, its output is the only source these checks read. +* **Cross-source lock keys**: a small set of keys, such as the sandbox allowlist locks, [listed in the settings reference](/docs/en/settings#precedence-within-the-managed-tier). They are honored when any admin-controlled managed source sets them; the user-writable HKCU registry tier is excluded, and when an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output is the only source these checks read. * **The `env` block**: apart from the telemetry unit and routing variables paired with a credential key, both covered below, it merges per key across the admin-controlled sources. For each environment variable, the highest-priority source defining it wins, and lower admin sources fill in variables the higher sources leave unset. An endpoint-managed `env` entry therefore applies whenever the server-managed configuration leaves that variable unset, or while a cached server value for it is [withheld pending server confirmation](#fetch-and-caching-behavior). Requires Claude Code v2.1.223 or later. Before v2.1.223, Claude Code applies the winning source's whole `env` block only. * **Telemetry unit**: the `OTEL_EXPORTER_OTLP_*` exporter keys, the `OTEL_LOG_*` content-capture toggles, `OTEL_LOGS_EXPORTER`, and the beta tracing variables `ENABLE_BETA_TRACING_DETAILED` and `BETA_TRACING_ENDPOINT` follow the highest source that sets any of them as a unit. A source that delivers the `otelHeadersHelper` credential key claims the unit too, but lands these variables only when it is the winning source: a non-winning source that delivers the key contributes none of them and still blocks lower sources from filling them in. Either way, an exporter endpoint from one source can never pair with credentials from another. * **Credential-paired routing**: a source that pairs routing variables with a winner-only credential key, such as `apiKeyHelper` or `otelHeadersHelper`, contributes those routing variables only when it wins the slot. @@ -193,7 +193,7 @@ To enable this, add the key to your managed settings configuration: } ``` -You can also set this key in an [endpoint-managed](/docs/en/settings#settings-files) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has been delivered. As of v2.1.191, this flag is an exception to the [precedence rule](#settings-precedence) above: it is honored when set in any admin-controlled managed source even if a cached server-managed payload is also present, so an MDM-delivered value is not ignored when server-managed settings exist. When a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper) is configured, its output replaces every other managed source, this key included. +You can also set this key in an [endpoint-managed](/docs/en/settings#settings-files) MDM profile or system `managed-settings.json` file to enforce fail-closed behavior on first launch, before any server payload has been delivered. As of v2.1.191, this flag is an exception to the [precedence rule](#settings-precedence) above: it is honored when set in any admin-controlled managed source even if a cached server-managed payload is also present, so an MDM-delivered value is not ignored when server-managed settings exist. When an MDM or file-based source wins and configures a [`policyHelper`](/docs/en/settings#compute-managed-settings-with-a-policy-helper), the helper's output replaces every other managed source, this key included. The settings fetch also sends a `Cache-Control: no-cache` header so intermediate HTTP proxies don't serve a stale response. diff --git a/content/en/docs/claude-code/settings.md b/content/en/docs/claude-code/settings.md index 672c4abcf4..1571c47e3c 100644 --- a/content/en/docs/claude-code/settings.md +++ b/content/en/docs/claude-code/settings.md @@ -422,7 +422,7 @@ Configure advanced sandboxing behavior. Sandboxing isolates bash commands from y | `filesystem.allowWrite` | Additional paths where sandboxed commands can write. Arrays are merged across all settings scopes: user, project, and managed paths are combined, not replaced. Also merged with paths from `Edit(...)` allow permission rules. See [path prefixes](#sandbox-path-prefixes) below. | `["/tmp/build", "~/.kube"]` | | `filesystem.denyWrite` | Paths where sandboxed commands cannot write. Arrays are merged across all settings scopes. Also merged with paths from `Edit(...)` deny permission rules. | `["/etc", "/usr/local/bin"]` | | `filesystem.denyRead` | Paths where sandboxed commands cannot read. Arrays are merged across all settings scopes. Also merged with paths from `Read(...)` deny permission rules. | `["~/.aws/credentials"]` | -| `filesystem.allowRead` | Paths to re-allow reading within `denyRead` regions. An `allowRead` path re-opens reading inside a broader `denyRead` region, and an exact path in `denyRead` stays blocked inside a broader `allowRead`; see the [overlap table](/docs/en/sandboxing#configure-sandboxing) for examples. Arrays are merged across all settings scopes. Use this to create workspace-only read access patterns. | `["."]` | +| `filesystem.allowRead` | Paths to re-allow reading within `denyRead` regions. An `allowRead` path re-opens reading inside a broader `denyRead` region. Claude Code keeps an exact or wildcard `denyRead` entry blocked inside a broader `allowRead`, as the [overlap table](/docs/en/sandboxing#configure-sandboxing) shows. Arrays are merged across all settings scopes. Use this to create workspace-only read access patterns. | `["."]` | | `filesystem.allowManagedReadPathsOnly` | (Managed settings only) Only `filesystem.allowRead` paths from managed settings are respected. `denyRead` still merges from all sources. Default: false | `true` | | `filesystem.disabled` | Skip filesystem isolation while keeping network isolation: sandboxed commands get unrestricted read and write access to the host filesystem, and network egress stays confined to `network.allowedDomains`. Only honored from user, managed, or CLI `--settings` settings. Default: false. Requires Claude Code v2.1.216 or later. See [Disable filesystem isolation](/docs/en/sandboxing#disable-filesystem-isolation) for which sources can set it and what changes when isolation is off | `true` | | `credentials.files` | Credential files or directories to [protect from sandboxed commands](/docs/en/sandboxing#protect-credentials). Each entry has a `path` and a `mode`. `deny` blocks reads inside the sandbox, the same read block as `filesystem.denyRead`, and requires Claude Code v2.1.187 or later. `mask` shows sandboxed commands a sentinel copy of the file on Linux and WSL2, while the sandbox proxy substitutes the real value on outbound requests to that entry's `injectHosts`; on macOS the file is unreadable inside the sandbox instead. It requires `network.tlsTerminate` and Claude Code v2.1.221 or later. [Mask credential files](/docs/en/sandboxing#mask-credential-files) covers which settings sources are honored and when an entry falls back to `deny`. Paths use the same [prefixes](#sandbox-path-prefixes) as `filesystem.*` settings. Arrays are merged across all settings scopes. | `[{ "path": "~/.aws/credentials", "mode": "deny" }]` | @@ -478,6 +478,8 @@ Claude Code also removes a trailing `/**`, so `~/build/**` and `~/build` cover t * **`allowWrite` and `denyWrite`**: on macOS, wildcards work. On Linux and WSL2, the sandbox mounts concrete paths, so Claude Code skips an entry that contains `*`, `?`, or `[` once the trailing `/**` is removed, and that entry has no effect. Claude Code adds the paths from your `Edit` permission rules to these lists, so the same limit applies to them, and the **Config** tab of `/sandbox` lists the `Edit` rules Claude Code skipped. * **`denyRead` and `allowRead`**: wildcards work on every platform. On Linux and WSL2, Claude Code expands a read entry to the concrete paths it matches, which it doesn't do for the write lists. +Claude Code blocks reads of the paths a wildcard `denyRead` entry such as `~/**/.env` matches, even inside a broader `allowRead` entry. When the wildcard matches a directory, Claude Code blocks reads of its contents as well. Before v2.1.236 on macOS, Claude Code re-opened the paths a wildcard `denyRead` entry matched wherever a broader `allowRead` entry covered them. On those macOS versions, Claude Code also left a matched directory's contents readable. + This syntax differs from [Read and Edit permission rules](/docs/en/permissions#read-and-edit), which use `//path` for absolute and `/path` for project-relative. Sandbox filesystem paths use standard conventions: `/tmp/build` is an absolute path. **Configuration example:** @@ -685,7 +687,7 @@ The helper writes a JSON envelope to stdout. Put the settings under a `managedSe } ``` -When the helper emits `managedSettings`, that object becomes the only managed settings source for the run: Claude Code ignores remote, MDM, and file-based sources, reads the [cross-source keys](#precedence-within-the-managed-tier) from the helper's output alone, and never merges [parent settings](#parent-settings-from-embedding-hosts). A helper that exits 0 without emitting `managedSettings` contributes no managed settings, and the other sources apply as usual. When the helper exits non-zero at startup, Claude Code prints the error and refuses to start, so a helper that needs outage resilience should serve from its own cache and exit `0`. +Claude Code reads `policyHelper` only from the source that wins [precedence within the managed tier](#precedence-within-the-managed-tier), so a helper configured in MDM or a managed settings file does not run while server-managed settings deliver a non-empty configuration. When the helper runs and emits `managedSettings`, that object becomes the only managed settings source for the run: Claude Code ignores the MDM and file-based sources, reads the [cross-source keys](#precedence-within-the-managed-tier) from the helper's output alone, and never merges [parent settings](#parent-settings-from-embedding-hosts). A helper that exits 0 without emitting `managedSettings` contributes no managed settings, and the other sources apply as usual. When the helper exits non-zero at startup, Claude Code prints the error and refuses to start, so a helper that needs outage resilience should serve from its own cache and exit `0`. ### Settings precedence @@ -734,7 +736,7 @@ A host platform that embeds Claude Code and sets [`CLAUDE_CODE_PROVIDER_MANAGED_ #### Precedence within the managed tier -A [`policyHelper`](#compute-managed-settings-with-a-policy-helper) can replace every source in this list; that section says when. Otherwise, apart from the cross-source keys listed after the ranking, Claude Code uses the first of these sources that delivers a non-empty configuration and ignores the rest rather than merging them: +Apart from the cross-source keys listed after the ranking, Claude Code uses the first of these sources that delivers a non-empty configuration and ignores the rest rather than merging them. When that winning source is an MDM policy or managed settings file that configures a [`policyHelper`](#compute-managed-settings-with-a-policy-helper), the helper's output then replaces it; that section says how. Claude Code checks the sources in this order: 1. Remote settings, delivered from claude.ai as [server-managed settings](/docs/en/server-managed-settings) or by a [Claude apps gateway](/docs/en/claude-apps-gateway) 2. MDM or OS-level policies diff --git a/content/en/docs/claude-code/skills.md b/content/en/docs/claude-code/skills.md index 4801d1faa4..3cf6b18b54 100644 --- a/content/en/docs/claude-code/skills.md +++ b/content/en/docs/claude-code/skills.md @@ -42,8 +42,6 @@ Three bundled skills work together to launch your app and confirm changes agains | `/verify` | Build and run your app to confirm a code change does what it should, without falling back to tests or type checks | | `/run-skill-generator` | Teach `/run` and `/verify` how to build and launch your project | -All three skills require Claude Code v2.1.145 or later. Check your version with `claude --version` or the `/status` command. - `/run` and `/verify` work without setup. They infer the launch from your project type (CLI, server, TUI, browser-driven) and from what's in your README, `package.json`, or `Makefile`. That inference gets unreliable for projects that need anything beyond a standard launch: a database, an env file, a graphical session, a multi-step build. `/run-skill-generator` records the recipe instead. It gets your app running from a clean environment, captures what worked (the install commands, the env vars, the launch script), and commits it as a per-project skill at `.claude/skills/run-/`. After that, `/run`, `/verify`, and any other agent in the repo follow the recorded recipe instead of rediscovering it. Run `/run-skill-generator` once per project, and again if the build or launch process changes. @@ -166,22 +164,8 @@ Project skills load from `.claude/skills/` in the directory where you start Clau Skills in nested `.claude/skills/` directories below your starting directory aren't loaded at startup. They load the first time Claude reads or edits a file inside that subdirectory, and stay available for the rest of the session. For example, after Claude edits a file under `packages/frontend/`, skills in `packages/frontend/.claude/skills/` become available. Until then, those skills don't appear in autocomplete and can't be invoked by name. -Each skill is a directory with `SKILL.md` as the entrypoint: - -```text theme={null} -my-skill/ -├── SKILL.md # Main instructions (required) -├── template.md # Template for Claude to fill in -├── examples/ -│ └── sample.md # Example output showing expected format -└── scripts/ - └── validate.sh # Script Claude can execute -``` - -The `SKILL.md` contains the main instructions and is required. Other files are optional and let you build more powerful skills: templates for Claude to fill in, example outputs showing the expected format, scripts Claude can execute, or detailed reference documentation. Reference these files from your `SKILL.md` so Claude knows what they contain and when to load them. See [Add supporting files](#add-supporting-files) for more details. - - Files in `.claude/commands/` support the same [frontmatter](#frontmatter-reference), except `name` and `paths`, which Claude Code ignores in a command file. You invoke a command file by its file name. Skills are recommended since they support additional features like supporting files. + Files in `.claude/commands/` support the same [frontmatter](#frontmatter-reference), except `name` and `paths`, which Claude Code ignores in a command file. You invoke a command file by its file name. Skills are recommended since they support additional features like [supporting files](#add-supporting-files). #### Skills from additional directories diff --git a/content/en/docs/claude-code/sub-agents.md b/content/en/docs/claude-code/sub-agents.md index a73955bea1..2187fa1145 100644 --- a/content/en/docs/claude-code/sub-agents.md +++ b/content/en/docs/claude-code/sub-agents.md @@ -311,7 +311,11 @@ Claude Code skips a file in a project, user, or managed `agents` directory, or i * **A `name` but no `description`**: Claude Code skips the file and writes the reason to the debug log. * **YAML that doesn't parse**: Claude Code reads no fields from the file, skips it, and writes the parse error to the debug log. -To see the debug log, run Claude Code with `--debug`. A [plugin subagent](/docs/en/plugins-reference#agents) whose frontmatter has no `name` or doesn't parse still loads, under its filename. +To see the debug log, run Claude Code with `--debug`. + +A [plugin subagent](/docs/en/plugins-reference#agents) whose frontmatter has no `name` or doesn't parse still loads, under its filename. + +##### Check an `agents` directory before a session To find files in an `agents` directory whose frontmatter doesn't parse, run `claude plugin validate` against the directory, for example `.claude/agents` or `~/.claude/agents`. Claude Code checks only [the directory you name](/docs/en/plugin-marketplaces#validate-a-plugin-or-a-directory-without-a-manifest), and doesn't flag a file whose frontmatter parses but has no `name`. Requires Claude Code v2.1.233 or later. @@ -430,7 +434,7 @@ The `Agent(agent_type)` allowlist syntax applies only to an agent running as the #### Scope MCP servers to a subagent -Use the `mcpServers` field to give a subagent access to [MCP](/docs/en/mcp) servers that aren't available in the main conversation. Inline servers defined here are connected when the subagent starts and disconnected when it finishes. String references share the parent session's connection. +Use the `mcpServers` field to give a subagent access to [MCP](/docs/en/mcp) servers that aren't available in the main conversation. Inline servers defined here are connected when the subagent starts, subject to the [trust rule for the agent file's folder](#inline-server-trust), and disconnected when it finishes. String references share the parent session's connection. The `mcpServers` field applies in both contexts where an agent file can run: @@ -438,7 +442,7 @@ Use the `mcpServers` field to give a subagent access to [MCP](/docs/en/mcp) serv * As a subagent, spawned through the Agent tool or an @-mention * As the main session, launched with [`--agent`](#invoke-subagents-explicitly) or the `agent` setting - When the agent is the main session, inline server definitions connect at startup alongside servers from [`.mcp.json`](/docs/en/mcp) and settings files. In `/mcp`, a remote (HTTP or SSE) server you've used before can show the [`cached` status](/docs/en/mcp#managing-your-servers) instead; Claude Code connects it when Claude first calls one of its tools. + When the agent is the main session, inline server definitions connect at startup alongside servers from [`.mcp.json`](/docs/en/mcp) and settings files, under the same [trust rule for the agent file's folder](#inline-server-trust). In `/mcp`, a remote (HTTP or SSE) server you've used before can show the [`cached` status](/docs/en/mcp#managing-your-servers) instead; Claude Code connects it when Claude first calls one of its tools. Each entry in the list is either an inline server definition or a string referencing an MCP server already configured in your session: @@ -464,6 +468,17 @@ Inline definitions use the same schema as `.mcp.json` server entries, keyed by t To keep an MCP server out of the main conversation entirely and avoid its tool descriptions consuming context there, define it inline here rather than in `.mcp.json`. The subagent gets the tools; the parent conversation doesn't. +Claude Code loads an inline server from an agent file in your project's `.claude/agents/` directory, or in an `--add-dir` directory's `.claude/agents/`, only after you [trust the folder the agent file came from](/docs/en/permissions#what-runs-before-you-trust-a-folder). Before v2.1.238, Claude Code loaded these servers without checking trust. + +* **Trust that doesn't count**: a parent folder's trust, and the automatic trust a `-p` or SDK session gets for [hooks in settings files](/docs/en/permissions#what-runs-before-you-trust-a-folder) +* **Until then**: Claude Code skips every inline server in that agent file and writes the exact `projects[""].hasTrustDialogAccepted` key for `~/.claude.json` to the debug log +* **`--add-dir` directories**: a directory outside your trusted workspace's repository needs its own trust entry, since its `.claude/agents/` files don't inherit your workspace's trust + +Claude Code loads two kinds of server without checking trust for the folder the agent file came from: + +* A name that references a server you already configured +* An inline server in an agent file from `~/.claude/agents/`, in one you pass with `--agents` or the SDK `agents` option, or in one that managed settings supplies + As of v2.1.153, the MCP restrictions that apply to the main session also cover servers declared in subagent frontmatter: * [`--strict-mcp-config`](/docs/en/cli-reference) and [`--bare`](/docs/en/cli-reference) diff --git a/content/en/docs/claude-code/terminal-config.md b/content/en/docs/claude-code/terminal-config.md index b09fcc7e13..1cf56a35d5 100644 --- a/content/en/docs/claude-code/terminal-config.md +++ b/content/en/docs/claude-code/terminal-config.md @@ -12,6 +12,7 @@ Claude Code works in any terminal without configuration. This page is for when s * [Option-key shortcuts do nothing on macOS](#enable-option-key-shortcuts-on-macos) * [No sound or alert when Claude finishes](#get-a-terminal-bell-or-notification) * [You run Claude Code inside tmux](#configure-tmux) +* [Backspace deletes a whole word on Windows](#fix-backspace-deleting-a-whole-word-on-windows) * [Display flickers or scrollback jumps](#switch-to-fullscreen-rendering) * [You want Vim keys in the prompt](#edit-prompts-with-vim-keybindings) @@ -119,6 +120,12 @@ set -as terminal-features 'xterm*:extkeys' The `allow-passthrough` line lets notifications and progress updates reach the outer terminal instead of being swallowed by tmux. The `extended-keys` lines let tmux distinguish Shift+Enter from plain Enter so the newline shortcut works. +## Fix Backspace deleting a whole word on Windows + +On Windows, Claude Code reads a Backspace that arrives as `^H` as Ctrl+Backspace, which [deletes the previous word](/docs/en/interactive-mode#text-editing), except when `TERM_PROGRAM` is `mintty` or `TERM` is `cygwin`. On macOS and Linux, Claude Code reads it as plain Backspace. + +If each press of Backspace deletes a whole word, your terminal sends `^H` for plain Backspace. Set [`CLAUDE_CODE_BS_AS_CTRL_BACKSPACE=0`](/docs/en/env-vars). Backspace and Ctrl+H then erase one character each. If Ctrl+Backspace erases only one character on macOS or Linux because your terminal sends `^H` for it, set the variable to `1` instead. + ## Match the color theme Use the `/theme` command, or the theme picker in `/config`, to choose a Claude Code theme that matches your terminal. Selecting the auto option detects your terminal's light or dark background, so the theme follows OS appearance changes whenever your terminal does. Claude Code does not control the terminal's own color scheme, which is set by the terminal application. @@ -273,7 +280,7 @@ If the display flickers or the scroll position jumps while Claude is working, sw If flicker is the only problem and your terminal supports synchronized output but isn't auto-detected, such as Emacs `eat`, set [`CLAUDE_CODE_FORCE_SYNC_OUTPUT=1`](/docs/en/env-vars) to stop the flicker without changing renderers. -Run `/tui fullscreen` to switch and save the preference. Your conversation relaunches intact and future sessions start in fullscreen. You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code: +Run `/tui fullscreen` to switch and save the preference. Your conversation relaunches intact and future sessions start in fullscreen unless a [fullscreen start fails](/docs/en/fullscreen#fullscreen-renderer-didnt-finish-starting). You can also set the `CLAUDE_CODE_NO_FLICKER` environment variable before starting Claude Code: ```bash Bash and Zsh theme={null} diff --git a/content/en/docs/claude-code/tools-reference.md b/content/en/docs/claude-code/tools-reference.md index 8a1fa26fea..2db7628613 100644 --- a/content/en/docs/claude-code/tools-reference.md +++ b/content/en/docs/claude-code/tools-reference.md @@ -16,52 +16,52 @@ To add custom tools, connect an [MCP server](/docs/en/mcp). To extend Claude wit On Pro, Max, and Team plans, Claude Code starts sessions in [auto mode](/docs/en/permission-modes#eliminate-prompts-with-auto-mode), where a classifier decides most of these prompts instead of you. The `Permission required` column shows whether the tool prompts in [Manual mode](/docs/en/permission-modes) for paths inside the working directory. File-access tools marked No, including `Read`, `Grep`, and `Glob`, still prompt for paths outside the [working directory and additional directories](/docs/en/permissions#working-directories). `Bash` is marked Yes but runs a built-in set of [read-only commands](/docs/en/permissions#read-only-commands) without prompting. -| Tool | Description | Permission required | -| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------ | -| `Agent` | Spawns a [subagent](/docs/en/sub-agents) with its own context window to handle a task. With [agent teams](/docs/en/agent-teams) enabled, a call that carries a `name` can launch a [teammate](/docs/en/agent-teams#how-claude-starts-agent-teams) instead. See [Agent tool behavior](#agent-tool-behavior) | No | -| `Artifact` | Publishes an HTML or Markdown file as an [artifact](/docs/en/artifacts): a private, interactive page on claude.ai. You can share it with a public link, or inside your organization on Team and Enterprise plans, where public sharing requires an Owner to [enable it](/docs/en/artifacts#control-public-sharing). Requires a Pro, Max, Team, or Enterprise plan and `/login` authentication; see [Availability](/docs/en/artifacts#availability) | Yes | -| `AskUserQuestion` | Asks multiple-choice questions to gather requirements or clarify ambiguity. Questions stay open until you answer them by default. See [AskUserQuestion tool behavior](#askuserquestion-tool-behavior) | No | -| `Bash` | Executes shell commands in your environment. See [Bash tool behavior](#bash-tool-behavior) | Yes | -| `CronCreate` | Schedules a recurring or one-shot prompt within the current session. Tasks are session-scoped and restored on `--resume` or `--continue` if unexpired. See [scheduled tasks](/docs/en/scheduled-tasks) | No | -| `CronDelete` | Cancels a scheduled task by ID | No | -| `CronList` | Lists all scheduled tasks in the session | No | -| `Edit` | Makes targeted edits to specific files. See [Edit tool behavior](#edit-tool-behavior) | Yes | -| `EndConversation` | Ends the session, in rare cases of sustained abusive input or when you ask Claude to demonstrate the tool. Requires Claude Code v2.1.213 or later. See [EndConversation tool behavior](#endconversation-tool-behavior) | No | -| `EnterPlanMode` | Switches to plan mode to design an approach before coding | No | -| `EnterWorktree` | Creates an isolated [git worktree](/docs/en/worktrees) and switches into it. Pass a `path` to switch into an existing worktree instead of creating a new one. On first entry the target may be a worktree of the current repository or, in a multi-repo workspace, of a repository nested inside it. Before v2.1.203, a nested repository's worktree was rejected. A `path` outside `.claude/worktrees/` prompts for your approval before entering, since it moves the session's working directory and write access to that location. New-worktree creation and paths under `.claude/worktrees/` don't prompt. Before v2.1.206, Claude entered paths outside `.claude/worktrees/` without a prompt. From within a worktree session, or from a subagent with a pinned working directory such as [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields), only the `path` form is available and the target must be under `.claude/worktrees/` of the session's repository | Yes | -| `ExitPlanMode` | Presents a plan for approval and exits plan mode | Yes | -| `ExitWorktree` | Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields) | No | -| `Glob` | Finds files based on pattern matching. See [Glob tool behavior](#glob-tool-behavior) | No | -| `Grep` | Searches for patterns in file contents. See [Grep tool behavior](#grep-tool-behavior) | No | -| `ListAgents` | Lists the agents Claude can message with `SendMessage`, apart from [agent team](/docs/en/agent-teams) teammates, which Claude reaches through the team's roster: subagents in the session, your other local Claude Code sessions, and, while this session is connected to [Remote Control](/docs/en/remote-control), your [Claude Code on the web](/docs/en/claude-code-on-the-web) sessions and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](/docs/en/cross-session-messaging). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](/docs/en/cross-session-messaging#availability) | No | -| `ListMcpResourcesTool` | Lists resources exposed by connected [MCP servers](/docs/en/mcp) | No | -| `LSP` | Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See [LSP tool behavior](#lsp-tool-behavior) | No | -| `Monitor` | Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See [Monitor tool](#monitor-tool) | Yes | -| `NotebookEdit` | Modifies Jupyter notebook cells. See [NotebookEdit tool behavior](#notebookedit-tool-behavior) | Yes | -| `PowerShell` | Executes PowerShell commands natively. See [PowerShell tool](#powershell-tool) for availability | Yes | -| `PushNotification` | Sends a desktop notification, and a phone push when [Remote Control](/docs/en/remote-control) is connected, so a long-running task or [scheduled task](/docs/en/scheduled-tasks) can reach you when you step away. Push delivery runs through Anthropic-hosted infrastructure, which is not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry | No | -| `Read` | Reads the contents of files. See [Read tool behavior](#read-tool-behavior) | No | -| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No | -| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/docs/en/routines) on claude.ai. Backs the `/schedule` command. The [`RemoteTrigger` input reference](/docs/en/agent-sdk/typescript#remotetrigger) documents every action and the organization policies that remove the tool. Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry. Also unavailable when you turn off [feature-flag fetching](/docs/en/env-vars#features-that-need-feature-flag-fetching) | No | -| `ReportFindings` | Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. Requires Claude Code v2.1.196 or later. As of v2.1.199, a finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list | No | -| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/docs/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](/docs/en/hooks#stop-input). Not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead. The same happens when you turn off [feature-flag fetching](/docs/en/env-vars#features-that-need-feature-flag-fetching) | No | -| `SendMessage` | Sends a message to another agent: an [agent team](/docs/en/agent-teams) teammate, a [subagent it resumes](/docs/en/sub-agents#resume-subagents) by agent ID or name, or one of your other Claude Code sessions, on this machine or beyond it. Messaging other sessions requires Claude Code v2.1.224 or later; [cross-session messaging](/docs/en/cross-session-messaging) covers which sessions Claude can reach and each case's requirements. A receiver never treats a message from another agent as your consent or approval. Claude can include an optional `summary` input, typically 5-10 words, that Claude Code shows as a one-line preview. When Claude omits it on a [plain-text message](/docs/en/cross-session-messaging#limitations), Claude Code uses the first line of the message as the summary. Claude Code truncates a summary longer than 200 characters with an ellipsis | No | -| `SendUserFile` | Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](/docs/en/remote-control) client is connected or the session runs in a managed cloud environment such as [Claude Code on the web](/docs/en/claude-code-on-the-web). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | -| `ShareOnboardingGuide` | Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes | -| `Skill` | Executes a [skill](/docs/en/skills#control-who-invokes-a-skill) within the main conversation | Yes | -| `TaskCreate` | Creates a new task in the task list. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | -| `TaskGet` | Retrieves full details for a specific task. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | -| `TaskList` | Lists all tasks with their current status. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | -| `TaskOutput` | Retrieves output from a background task. Deprecated in favor of `Read` on the task's output file path. When no task matches the ID, the error lists the running background agents by ID and description. Before v2.1.203, the error named only the missing ID | No | -| `TaskStop` | Stops a running background task by ID. It also accepts an [agent-team teammate](/docs/en/agent-teams) or a named background agent by agent ID or name. Before v2.1.198, it accepted only a background task ID. When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned. Before v2.1.203, the error listed running teammates and named agents but not background agents another agent spawned, so those couldn't be identified or stopped from the main conversation | No | -| `TaskUpdate` | Updates task status, dependencies, details, or deletes tasks. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | -| `TodoWrite` | Manages the session task checklist. Disabled by default in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Set `CLAUDE_CODE_ENABLE_TASKS=0` to re-enable it in [sessions that have the task-tracking tools](#task-tool-availability) | No | -| `ToolSearch` | Searches for and loads deferred tools when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is enabled | No | -| `WaitForMcpServers` | Waits for one or more [MCP servers](/docs/en/mcp) that are still connecting in the background, so a request can use their tools without restarting the session. Claude calls it when a needed server isn't connected yet. Only appears when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled, since `ToolSearch` handles the wait when it's enabled | No | -| `WebFetch` | Fetches content from a specified URL. See [WebFetch tool behavior](#webfetch-tool-behavior) | Yes | -| `WebSearch` | Performs web searches. See [WebSearch tool behavior](#websearch-tool-behavior) | Yes | -| `Workflow` | Runs a [dynamic workflow](/docs/en/workflows): a script that orchestrates many subagents in the background and returns one consolidated result | Yes | -| `Write` | Creates or overwrites files. See [Write tool behavior](#write-tool-behavior) | Yes | +| Tool | Description | Permission required | +| :--------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------ | +| `Agent` | Spawns a [subagent](/docs/en/sub-agents) with its own context window to handle a task. With [agent teams](/docs/en/agent-teams) enabled, a call that carries a `name` can launch a [teammate](/docs/en/agent-teams#how-claude-starts-agent-teams) instead. See [Agent tool behavior](#agent-tool-behavior) | No | +| `Artifact` | Publishes an HTML or Markdown file as an [artifact](/docs/en/artifacts): a private, interactive page on claude.ai. You can share it with a public link, or inside your organization on Team and Enterprise plans, where public sharing requires an Owner to [enable it](/docs/en/artifacts#control-public-sharing). Requires a Pro, Max, Team, or Enterprise plan and `/login` authentication; see [Availability](/docs/en/artifacts#availability) | Yes | +| `AskUserQuestion` | Asks multiple-choice questions to gather requirements or clarify ambiguity. Questions stay open until you answer them by default. See [AskUserQuestion tool behavior](#askuserquestion-tool-behavior) | No | +| `Bash` | Executes shell commands in your environment. See [Bash tool behavior](#bash-tool-behavior) | Yes | +| `CronCreate` | Schedules a recurring or one-shot prompt within the current session. Tasks are session-scoped and restored on `--resume` or `--continue` if unexpired. See [scheduled tasks](/docs/en/scheduled-tasks) | No | +| `CronDelete` | Cancels a scheduled task by ID | No | +| `CronList` | Lists all scheduled tasks in the session | No | +| `Edit` | Makes targeted edits to specific files. See [Edit tool behavior](#edit-tool-behavior) | Yes | +| `EndConversation` | Ends the session, in rare cases of sustained abusive input or when you ask Claude to demonstrate the tool. Requires Claude Code v2.1.213 or later. See [EndConversation tool behavior](#endconversation-tool-behavior) | No | +| `EnterPlanMode` | Switches to plan mode to design an approach before coding | No | +| `EnterWorktree` | Creates an isolated [git worktree](/docs/en/worktrees) and switches into it. Pass a `path` to switch into an existing worktree instead of creating a new one. On first entry the target may be a worktree of the current repository or, in a multi-repo workspace, of a repository nested inside it. Before v2.1.203, a nested repository's worktree was rejected. A `path` outside `.claude/worktrees/` prompts for your approval before entering, since it moves the session's working directory and write access to that location. New-worktree creation and paths under `.claude/worktrees/` don't prompt. Before v2.1.206, Claude entered paths outside `.claude/worktrees/` without a prompt. From within a worktree session, or from a subagent with a pinned working directory such as [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields), only the `path` form is available and the target must be under `.claude/worktrees/` of the session's repository | Yes | +| `ExitPlanMode` | Presents a plan for approval and exits plan mode | Yes | +| `ExitWorktree` | Exits a worktree session and returns to the original directory. Not available to subagents that already run in their own working directory, such as with [`isolation: worktree`](/docs/en/sub-agents#supported-frontmatter-fields) | No | +| `Glob` | Finds files based on pattern matching. See [Glob tool behavior](#glob-tool-behavior) | No | +| `Grep` | Searches for patterns in file contents. See [Grep tool behavior](#grep-tool-behavior) | No | +| `ListAgents` | Lists the agents Claude can message with `SendMessage`, apart from [agent team](/docs/en/agent-teams) teammates, which Claude reaches through the team's roster: subagents in the session, your other local Claude Code sessions, and, while this session is connected to [Remote Control](/docs/en/remote-control), your [Claude Code on the web](/docs/en/claude-code-on-the-web) sessions and your Remote Control sessions on other machines. Backs the `/list-agents` command. See [cross-session messaging](/docs/en/cross-session-messaging). Requires Claude Code v2.1.224 or later, and appears only in sessions where [cross-session messaging is enabled](/docs/en/cross-session-messaging#availability) | No | +| `ListMcpResourcesTool` | Lists resources exposed by connected [MCP servers](/docs/en/mcp) | No | +| `LSP` | Code intelligence via language servers: jump to definitions, find references, report type errors and warnings. See [LSP tool behavior](#lsp-tool-behavior) | No | +| `Monitor` | Runs a command in the background and feeds each output line back to Claude, so it can react to log entries, file changes, or polled status mid-conversation. Can also open a WebSocket and treat each incoming message as an event. See [Monitor tool](#monitor-tool) | Yes | +| `NotebookEdit` | Modifies Jupyter notebook cells. See [NotebookEdit tool behavior](#notebookedit-tool-behavior) | Yes | +| `PowerShell` | Executes PowerShell commands natively. See [PowerShell tool](#powershell-tool) for availability | Yes | +| `PushNotification` | Sends a desktop notification, and a phone push when [Remote Control](/docs/en/remote-control) is connected, so a long-running task or [scheduled task](/docs/en/scheduled-tasks) can reach you when you step away. Push delivery runs through Anthropic-hosted infrastructure, which is not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry | No | +| `Read` | Reads the contents of files. See [Read tool behavior](#read-tool-behavior) | No | +| `ReadMcpResourceTool` | Reads a specific MCP resource by URI | No | +| `RemoteTrigger` | Creates, updates, runs, and lists [Routines](/docs/en/routines) on claude.ai. Backs the `/schedule` command. The [`RemoteTrigger` input reference](/docs/en/agent-sdk/typescript#remotetrigger) documents every action and the organization policies that remove the tool. Routines live on claude.ai and require a Pro, Max, Team, or Enterprise plan, so this tool is not accessible from Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry. Also unavailable when you turn off [feature-flag fetching](/docs/en/env-vars#features-that-need-feature-flag-fetching) | No | +| `ReportFindings` | Reports code-review findings as a structured list, with a file, summary, and failure scenario per finding, so Claude Code can render them instead of printing them as text. Claude calls it when active code-review instructions tell it to. Requires Claude Code v2.1.196 or later. As of v2.1.199, a finding can also carry an optional `category` slug, such as `correctness` or `test-coverage`, shown next to the file location in the rendered list | No | +| `ScheduleWakeup` | Reschedules the next iteration of a [self-paced `/loop`](/docs/en/scheduled-tasks#let-claude-choose-the-interval). Claude calls this at the end of each iteration to pick when the next one runs, between one minute and one hour out; you don't call it directly. To end the loop instead, Claude calls it with `stop: true`, which cancels the pending wakeup. The `stop` field requires Claude Code v2.1.202 or later. The pending wakeup appears in `session_crons` in [Stop hook input](/docs/en/hooks#stop-input). Not available on Amazon Bedrock, Claude Platform on AWS, Google Cloud's Agent Platform, or Microsoft Foundry, where a `/loop` prompt with no interval runs on a fixed schedule instead. The same happens when you turn off [feature-flag fetching](/docs/en/env-vars#features-that-need-feature-flag-fetching) | No | +| `SendMessage` | Sends a message to another agent: an [agent team](/docs/en/agent-teams) teammate, a [subagent it resumes](/docs/en/sub-agents#resume-subagents) by agent ID or name, or one of your other Claude Code sessions, on this machine or beyond it. Messaging other sessions requires Claude Code v2.1.224 or later; [cross-session messaging](/docs/en/cross-session-messaging) covers which sessions Claude can reach and each case's requirements. A receiver never treats a message from another agent as your consent or approval. Claude can include an optional `summary` input, typically 5-10 words, that Claude Code shows as a one-line preview. When Claude omits it on a [plain-text message](/docs/en/cross-session-messaging#limitations), Claude Code uses the first line of the message as the summary. Claude Code truncates a summary longer than 200 characters with an ellipsis. With the `notify_when_idle` input, Claude can ask one of your other sessions on this machine to [send one notice when it next goes idle or exits](/docs/en/cross-session-messaging#get-a-notice-when-another-session-goes-idle). Requires Claude Code v2.1.236 or later in both sessions | No | +| `SendUserFile` | Sends files from the session to you with an optional caption, so a generated report, diagram, screenshot, or built artifact reaches your device instead of only being mentioned in the transcript. As of v2.1.196, the optional `display` input controls presentation: `render` opens the file inline in the client, `attach` shows a download card only, and when unset the client decides by file type. Available when a [Remote Control](/docs/en/remote-control) client is connected or the session runs in a managed cloud environment such as [Claude Code on the web](/docs/en/claude-code-on-the-web). Delivery runs through Anthropic-hosted infrastructure, so the tool is not available on Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry | No | +| `ShareOnboardingGuide` | Uploads `ONBOARDING.md` and returns a share link teammates can open in Claude Code. Called from `/team-onboarding` after the guide is written. Available to claude.ai subscribers on Pro, Max, Team, and Enterprise plans | Yes | +| `Skill` | Executes a [skill](/docs/en/skills#control-who-invokes-a-skill) within the main conversation | Yes | +| `TaskCreate` | Creates a new task in the task list. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | +| `TaskGet` | Retrieves full details for a specific task. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | +| `TaskList` | Lists all tasks with their current status. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | +| `TaskOutput` | Retrieves output from a background task. Deprecated in favor of `Read` on the task's output file path. When no task matches the ID, the error lists the running background agents by ID and description. Before v2.1.203, the error named only the missing ID | No | +| `TaskStop` | Stops a running background task by ID. It also accepts an [agent-team teammate](/docs/en/agent-teams) or a named background agent by agent ID or name. Before v2.1.198, it accepted only a background task ID. When no task matches the ID, the error lists the running background agents by ID and description, including agents that another agent spawned. Before v2.1.203, the error listed running teammates and named agents but not background agents another agent spawned, so those couldn't be identified or stopped from the main conversation | No | +| `TaskUpdate` | Updates task status, dependencies, details, or deletes tasks. Claude Code leaves it out on the models listed under [Task tool availability](#task-tool-availability) unless you opt in | No | +| `TodoWrite` | Manages the session task checklist. Disabled by default in favor of `TaskCreate`, `TaskGet`, `TaskList`, and `TaskUpdate`. Set `CLAUDE_CODE_ENABLE_TASKS=0` to re-enable it in [sessions that have the task-tracking tools](#task-tool-availability) | No | +| `ToolSearch` | Searches for and loads deferred tools when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is enabled | No | +| `WaitForMcpServers` | Waits for one or more [MCP servers](/docs/en/mcp) that are still connecting in the background, so a request can use their tools without restarting the session. Claude calls it when a needed server isn't connected yet. Only appears when [tool search](/docs/en/mcp#scale-with-mcp-tool-search) is disabled, since `ToolSearch` handles the wait when it's enabled | No | +| `WebFetch` | Fetches content from a specified URL. See [WebFetch tool behavior](#webfetch-tool-behavior) | Yes | +| `WebSearch` | Performs web searches. See [WebSearch tool behavior](#websearch-tool-behavior) | Yes | +| `Workflow` | Runs a [dynamic workflow](/docs/en/workflows): a script that orchestrates many subagents in the background and returns one consolidated result | Yes | +| `Write` | Creates or overwrites files. See [Write tool behavior](#write-tool-behavior) | Yes | ## Configure tools with permission rules and hooks diff --git a/content/en/docs/claude-code/vs-code.md b/content/en/docs/claude-code/vs-code.md index 219adf6899..3fdc5416bd 100644 --- a/content/en/docs/claude-code/vs-code.md +++ b/content/en/docs/claude-code/vs-code.md @@ -359,6 +359,23 @@ VS Code reads `initialPermissionMode` from your user settings and ignores worksp | `allowDangerouslySkipPermissions` | `false` | Adds Bypass permissions to the mode selector. Use it only in sandboxes with no internet access. | | `claudeProcessWrapper` | - | Executable used to launch the Claude process. The bundled binary path is passed as an argument when present. Set this to a separately installed `claude` binary if the extension build doesn't include one for your platform. In a wrapped setup, conversations start in Manual mode unless you set `initialPermissionMode` or picked Manual, Edit automatically, or Auto in an earlier conversation, because the extension skips the settings and built-in-default steps there; see [Switch permission modes](/docs/en/permission-modes#switch-permission-modes). An "Unsupported platform" error at activation means no binary is bundled for your platform; see [which platforms have prebuilt binaries](/docs/en/troubleshoot-install#native-binary-not-found-after-npm-install). | +## Use a screen reader + +The extension's chat panel works with screen readers. You don't need to turn anything on: the extension announces conversation activity for every user, with no visual change. This is separate from the CLI's opt-in [screen reader mode](/docs/en/accessibility), which adapts the terminal interface. + +Screen reader support in the chat panel requires Claude Code v2.1.236 or later. + +During a conversation, the extension announces: + +* **Claude's replies**: the extension announces each reply once, when it's complete, and stays silent while text streams in. Your screen reader reads code blocks as a line-count summary, reads links by their label, and reads tables cell by cell; the full reply stays readable in the transcript. +* **Permission requests and questions**: the extension announces a request when its permission prompt appears, naming the tool Claude wants to use. It announces in the same way when Claude asks you a question and when Claude finishes a plan and waits for your review. +* **Status changes**: the extension announces when Claude starts working, when Claude is ready for your input, and when Claude Code starts compacting the conversation. +* **Errors and model prompts**: the extension announces errors in the conversation, and announces when the [usage-credits consent prompt](/docs/en/model-config#fable-5-and-usage-credits) or the [flagged-request prompt](/docs/en/model-config#ask-before-switching) appears. + +Each turn in the transcript starts with a visually hidden heading labeled with the prompt that started the turn, so you can jump between turns with your screen reader's heading navigation. You can also move focus to the transcript itself with `Tab`, since the extension exposes it as a labeled region, and read it at your own pace. While Claude works, your screen reader reads a text label in place of the progress spinner's animation. + +When you reopen a session or switch to another one, the extension announces nothing: restored history, pending permission prompts, and in-progress status stay silent until something new happens. + ## VS Code extension vs. Claude Code CLI Claude Code is available as both a VS Code extension (graphical panel) and a CLI (command-line interface in the terminal). Some features are only available in the CLI. If you need a CLI-only feature, run `claude` in VS Code's integrated terminal. This requires the [standalone CLI install](/docs/en/setup): the extension does not add `claude` to your PATH. See [Run CLI in VS Code](#run-cli-in-vs-code). diff --git a/content/en/docs/claude-code/workflows.md b/content/en/docs/claude-code/workflows.md index 4482663472..eeb72c1ba1 100644 --- a/content/en/docs/claude-code/workflows.md +++ b/content/en/docs/claude-code/workflows.md @@ -85,10 +85,6 @@ Claude Code includes `/deep-research` as a built-in workflow: Workflows run in the background, so the session stays responsive while agents work. Run `/workflows` at any time to list running and completed workflows, then select one to open its progress view. -```text wrap theme={null} -/workflows -``` - The progress view shows each phase with its agent counts, token totals, and elapsed time. The footer lists the key for each action: | Key | Action | diff --git a/content/en/docs/claude-code/worktrees.md b/content/en/docs/claude-code/worktrees.md index e8adc92d84..fe602c57b2 100644 --- a/content/en/docs/claude-code/worktrees.md +++ b/content/en/docs/claude-code/worktrees.md @@ -42,6 +42,13 @@ You can also ask Claude to "work in a worktree" during a session, and it creates When Claude enters a path outside the repository's `.claude/worktrees/` directory, Claude Code asks for your approval first, because the move takes the session's working directory, write access, and project configuration such as `CLAUDE.md` and settings to that location. An `EnterWorktree` [permission rule](/docs/en/permissions) or choosing "don't ask again" doesn't suppress this prompt; only `bypassPermissions` mode skips it. Before v2.1.206, Claude could enter any existing worktree path without asking. + + **Hook paths don't follow the worktree.** After Claude enters a worktree, Claude Code keeps `${CLAUDE_PROJECT_DIR}` in your [hooks](/docs/en/hooks#reference-scripts-by-path) where it was and passes the worktree path to them a different way: + + * **`${CLAUDE_PROJECT_DIR}` stays put**: it still points at the project root where the session started, so a hook command such as `${CLAUDE_PROJECT_DIR}/.claude/hooks/check-style.sh` still runs the script in the main checkout. + * **`cwd` follows Claude**: the `cwd` field in the hook's [input JSON](/docs/en/hooks#common-input-fields) is the worktree root, and it moves again when Claude runs `cd`. Read it when a hook needs the worktree path. + + ## Clean up worktrees When you exit an interactive worktree session, Claude checks the worktree for work that removal would delete: changed or untracked files, and new commits. diff --git a/content/en/get-started.md b/content/en/get-started.md index 4da7512d49..86f0853933 100644 --- a/content/en/get-started.md +++ b/content/en/get-started.md @@ -436,7 +436,7 @@ description: Make your first API call to Claude and build a simple web search as } dependencies { - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") } application { @@ -462,7 +462,7 @@ description: Make your first API call to Claude and build a simple web search as com.anthropic anthropic-java - 2.53.0 + 2.57.0 diff --git a/content/en/manage-claude/api-and-data-retention.md b/content/en/manage-claude/api-and-data-retention.md index 394efb330c..ff1abb7c3f 100644 --- a/content/en/manage-claude/api-and-data-retention.md +++ b/content/en/manage-claude/api-and-data-retention.md @@ -87,7 +87,7 @@ Your signed BAA is the official source of truth for which features are covered. } ``` -The error message lists the non-eligible features detected in the request; remove them and retry. The phrase "without Zero Data Retention" is the API's own wording and does not change the resolution. +The error message lists the non-eligible features detected in the request; remove them and retry. The phrase "without Zero Data Retention" is the API's own wording and does not change the resolution. Client-side tools whose Details column in the [feature eligibility table](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility) says they are not blocked are accepted but remain outside HIPAA readiness. ### Getting started with HIPAA readiness @@ -105,7 +105,7 @@ There are two ways to set up HIPAA-ready API access. Most organizations can enab - HIPAA readiness controls are applied to your organization as soon as you accept. Once HIPAA readiness is enabled for your organization, the configuration is permanent and cannot be disabled by an administrator. The API automatically enforces feature restrictions, returning an error for requests that use non-eligible features. See [HIPAA error handling](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-error-handling). + HIPAA readiness controls are applied to your organization as soon as you accept. Once HIPAA readiness is enabled for your organization, the configuration is permanent and cannot be disabled by an administrator. The API automatically enforces feature restrictions, returning an error for requests that use non-eligible features. See [HIPAA error handling](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-error-handling) for the error and the client-side tool exception. @@ -163,7 +163,7 @@ Each eligibility column uses three values: * **Yes:** The feature is fully eligible under the arrangement. For ZDR, "Yes" also assumes you are using a model that does not require 30-day data retention; [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements) are not available under ZDR regardless of feature eligibility. * **Yes (qualified):** Your prompts and Claude's outputs are not stored, but a bounded technical artifact (named in the Details column) is retained briefly for the feature to function. See [How Anthropic approaches data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#how-anthropic-approaches-data-retention) for the commitments that govern these features. -* **No:** The feature is not eligible. Under HIPAA readiness, the API blocks requests that include a "No" feature and returns a `400` error. Under ZDR, the API does **not** block these features; using one is a choice to step outside your ZDR arrangement for that specific data, and the feature's own documented retention policy applies. Features marked "No" for ZDR are typically stateful (they store jobs, files, or container state), which is why they cannot be zero-retention. +* **No:** The feature is not eligible. Under HIPAA readiness, the API blocks requests that include a "No" feature and returns a `400` error, unless the feature's Details column says otherwise. Under ZDR, the API does **not** block these features; using one is a choice to step outside your ZDR arrangement for that specific data, and the feature's own documented retention policy applies. Features marked "No" for ZDR are typically stateful (they store jobs, files, or container state), which is why they cannot be zero-retention. | Feature | Endpoint | ZDR eligible | HIPAA eligible | Details | | -------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -173,11 +173,12 @@ Each eligibility column uses three values: | [Agent skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) | `/v1/messages` (with `skills`) / `/v1/skills` | No | No | Skill data retained per standard policy. See [Agent skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview#data-retention). | | [Bash tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/bash-tool) | `/v1/messages` (with `bash` tool) | Yes | Yes | Client-side tool executed in your environment. | | [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing) | `/v1/messages/batches` | No | No | 29-day retention; async storage required. See [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing#data-retention). | +| [Browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) | `/v1/messages` (with `browser` toolset) | Yes | No | Client-side tool. Anthropic does not run browser actions or retain page content beyond standard API handling. Not covered under HIPAA readiness; requests that include the browser use tool are not blocked. See [Browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#data-retention). | | [Cache diagnostics](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics) | `/v1/messages` (with `diagnostics`) | Yes (qualified) | No | Your prompts and Claude's outputs are not stored. A fingerprint of cryptographic hashes and token-count estimates is retained briefly to enable comparison against the next request. See [Cache diagnostics](https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics#data-retention). | | [Citations](https://platform.claude.com/docs/en/build-with-claude/citations) | `/v1/messages` | Yes | Yes | | | [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview) | `/v1/agents`, `/v1/sessions`, `/v1/environments` | No | No | Sessions are stateful resources; transcripts persist until you delete them. Applies to all Managed Agents sub-features, including [Self-hosted sandboxes](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes). | | [Code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) | `/v1/messages` (with `code_execution` tool) | No | No | Container data retained up to 30 days. See [Code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#data-retention). | -| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | `/v1/messages` (with `computer` tool) | Yes | Yes | Client-side tool where screenshots and files are captured and stored in your environment, not by Anthropic. See [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#data-retention). | +| [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) | `/v1/messages` (with `computer` toolset or tool) | Yes | Yes | Client-side tool where screenshots and files are captured and stored in your environment, not by Anthropic. See [Computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#data-retention). | | [Context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) | `/v1/messages` (with `context_management`) | Yes | No | Context edits (tool use clearing and thinking clearing) are applied in real time. | | [Context management (compaction)](https://platform.claude.com/docs/en/build-with-claude/compaction) | `/v1/messages` (with `context_management`) | Yes | No | Server-side compaction results are returned and round-tripped statelessly through the API response. | | [Data residency](https://platform.claude.com/docs/en/manage-claude/data-residency) | `/v1/messages` (with `inference_geo`) | Yes | Yes | | @@ -199,7 +200,7 @@ Each eligibility column uses three values: | [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) | `/v1/messages` (with `thinking`) | Yes | Yes | | | [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) | `/v1/messages/count_tokens` | Yes | Yes | Count tokens before sending requests. | | [Tool search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) | `/v1/messages` (with `tool_search` tool) | Yes | No | Server-side tool executed by Anthropic; the tool definitions in the request are searched in memory per call and nothing is stored after the response. | -| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `/v1/messages` (with `web_fetch` tool) | Yes | No | Fetched web content returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. Website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies. | +| [Web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool) | `/v1/messages` (with `web_fetch` tool) | Yes | No | Fetched web content returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. Website publishers may retain request data (such as fetched URLs and request metadata) according to their own policies. | | [Web search](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) | `/v1/messages` (with `web_search` tool) | Yes | Yes | Real-time web search results returned in the API response. [Dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering) is not eligible for ZDR or HIPAA. | ## Retention regardless of arrangement @@ -234,11 +235,11 @@ Even with ZDR or HIPAA arrangements in place, Anthropic may retain data where re
- The API returns a `400` error with an `invalid_request_error` type. The error message identifies which features are not available. Remove the non-eligible features from your request and retry. See [HIPAA error handling](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-error-handling). + The API returns a `400` error with an `invalid_request_error` type, except for the client-side tools whose Details column in the [feature eligibility table](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#feature-eligibility) says they are not blocked (those are accepted but remain outside HIPAA readiness). The error message identifies which features are not available. Remove those features from your request and retry. See [HIPAA error handling](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#hipaa-error-handling). - No. HIPAA readiness is enforced at the organization level and automatically blocks all non-eligible features. Use a separate organization for workloads that do not require HIPAA readiness. + No. HIPAA readiness is enforced at the organization level and automatically blocks non-eligible features (client-side tools noted in the table's Details column are the exception: they are not blocked, but they are still outside HIPAA readiness). Use a separate organization for workloads that do not require HIPAA readiness. @@ -281,5 +282,5 @@ Even with ZDR or HIPAA arrangements in place, Anthropic may retain data where re * [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) * [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) * [Batch processing](https://platform.claude.com/docs/en/build-with-claude/batch-processing) -* [Files API reference](https://platform.claude.com/docs/en/api/beta/files/upload) +* [Files API reference](https://platform.claude.com/docs/en/api/files/upload) * [Trust Center](https://trust.anthropic.com/resources) diff --git a/content/en/manage-claude/cmek.md b/content/en/manage-claude/cmek.md index d52730bef9..23d6f6f351 100644 --- a/content/en/manage-claude/cmek.md +++ b/content/en/manage-claude/cmek.md @@ -127,6 +127,7 @@ The following Claude Platform APIs and tools store data at rest under your key w | | Structured outputs (not available for Claude Fable 5 or Claude Mythos models in CMEK organizations) | | | Advisor tool | | | Computer use | +| | Browser use | | | Context management | ## Limited preservation outside your key diff --git a/content/en/manage-claude/user-management.md b/content/en/manage-claude/user-management.md index 5aa9f8b684..84ee042c55 100644 --- a/content/en/manage-claude/user-management.md +++ b/content/en/manage-claude/user-management.md @@ -7,7 +7,7 @@ description: "Manage the people in your Claude Enterprise organization with the This page covers managing the people in your **Claude Enterprise** (claude.ai) organization programmatically, using the [Admin API](https://platform.claude.com/docs/en/api/admin): list members and look them up by email address, change a member's role, remove members, send and withdraw invites, manage your enterprise's groups and their membership, and read your organization's custom roles. For Claude Console (Claude Platform) organizations, see the [Admin API guide for Claude Console](https://platform.claude.com/docs/en/manage-claude/admin-api). - **The endpoints on this page are generally available for Claude Enterprise organizations.** The [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-user-management-2026-07-13` is no longer required on group and custom-role requests; requests that still send it are accepted and behave identically. The group and custom-role examples on this page still send the header, which continues to work. + **The endpoints on this page are generally available for Claude Enterprise organizations.** The [beta header](https://platform.claude.com/docs/en/api/beta-headers) `anthropic-beta: ce-user-management-2026-07-13` is no longer required on group and custom-role requests; requests that still send it are accepted and behave identically. ## Which endpoints can your organization use? @@ -255,8 +255,7 @@ For complete parameter details and response schemas, see [List groups](https://p ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json @@ -285,8 +284,7 @@ For complete parameter details and response schemas, see [Get group](https://pla ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ### Create a group @@ -299,7 +297,6 @@ For complete parameter details and response schemas, see [Create group](https:// curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"name": "Engineering"}' ``` @@ -325,7 +322,6 @@ For complete parameter details and response schemas, see [Update group](https:// curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"name": "Platform Engineering"}' ``` @@ -337,8 +333,7 @@ For complete parameter details and response schemas, see [Delete group](https:// ```bash cURL curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json @@ -356,8 +351,7 @@ For complete parameter details and response schemas, see [List group members](ht ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members?limit=100" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json @@ -386,7 +380,6 @@ For complete parameter details and response schemas, see [Add group member](http curl -X POST "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members" \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" \ -d '{"user_id": "user_01AbCdEfGhIjKlMnOpQrSt"}' ``` @@ -408,8 +401,7 @@ For complete parameter details and response schemas, see [Remove group member](h ```bash cURL curl -X DELETE "https://api.anthropic.com/v1/organizations/rbac_groups/rbac_group_01UvWxYzAbCdEfGhIjKlMn/members/user_01AbCdEfGhIjKlMnOpQrSt" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json @@ -432,8 +424,7 @@ For complete parameter details and response schemas, see [List roles](https://pl ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json @@ -460,8 +451,7 @@ For complete parameter details and response schemas, see [Get role](https://plat ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ### List a role's permissions @@ -474,8 +464,7 @@ For complete parameter details and response schemas, see [List role permissions] ```bash cURL curl "https://api.anthropic.com/v1/organizations/rbac_roles/rbac_role_01CdEfGhIjKlMnOpQrStUv/permissions?limit=20" \ - -H "x-api-key: $ANTHROPIC_ADMIN_KEY" \ - -H "anthropic-beta: ce-user-management-2026-07-13" + -H "x-api-key: $ANTHROPIC_ADMIN_KEY" ``` ```json diff --git a/content/en/managed-agents/agent-setup.md b/content/en/managed-agents/agent-setup.md index b8a4a6bdc8..652a968cb9 100644 --- a/content/en/managed-agents/agent-setup.md +++ b/content/en/managed-agents/agent-setup.md @@ -52,17 +52,24 @@ The examples use curl, the `ant` CLI, or one of the SDKs. If you haven't set one AGENT_VERSION=$(jq -r '.version' <<< "$agent") ``` - ```bash CLI - agent=$(ant beta:agents create \ - --name "Coding Assistant" \ - --model '{id: claude-opus-5}' \ - --system "You are a helpful coding agent." \ - --tool '{type: agent_toolset_20260401}' \ - --format json) - - AGENT_ID=$(jq -r '.id' <<< "$agent") - AGENT_VERSION=$(jq -r '.version' <<< "$agent") - ``` + + ```bash CLI + agent=$(ant beta:agents create --format json < coding-assistant.agent.yaml) + + AGENT_ID=$(jq -r '.id' <<< "$agent") + ``` + + + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding agent. + tools: + - type: agent_toolset_20260401 + ``` + + ```python Python agent = client.beta.agents.create( @@ -221,15 +228,23 @@ The following example pins an agent to US inference and prints the `inference_ge echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" ``` - ```bash CLI - agent=$(ant beta:agents create \ - --name "Geo-pinned assistant" \ - --model '{id: claude-opus-5, inference_geo: us}' \ - --system "You are a helpful assistant." \ - --format json) + + ```bash CLI + agent=$(ant beta:agents create --format json < geo-pinned.agent.yaml) - echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" - ``` + echo "Inference geo: $(jq -r '.model.inference_geo' <<< "$agent")" + ``` + + + ```yaml + name: Geo-pinned assistant + model: + id: claude-opus-5 + inference_geo: us + system: You are a helpful assistant. + ``` + + ```python Python agent = client.beta.agents.create( @@ -352,12 +367,22 @@ Updating an agent generates a new version when the configuration changes. The `v echo "New version: $(jq -r '.version' <<< "$updated_agent")" ``` - ```bash CLI - ant beta:agents update \ - --agent-id "$AGENT_ID" \ - --version "$AGENT_VERSION" \ - --system "You are a helpful coding agent. Always write tests." - ``` + + ```bash CLI + ant beta:agents update --agent-id "$AGENT_ID" < coding-assistant.agent.yaml + ``` + + + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding agent. Always write tests. + tools: + - type: agent_toolset_20260401 + ``` + + ```python Python updated_agent = client.beta.agents.update( diff --git a/content/en/managed-agents/define-outcomes.md b/content/en/managed-agents/define-outcomes.md index 4cf334749f..ca44b1df03 100644 --- a/content/en/managed-agents/define-outcomes.md +++ b/content/en/managed-agents/define-outcomes.md @@ -54,10 +54,6 @@ Example rubric: Pass the rubric as inline text on `user.define_outcome` (see [Create a session with an outcome](https://platform.claude.com/docs/en/managed-agents/define-outcomes#create-a-session-with-an-outcome)), or upload it through the Files API for reuse across sessions. - - Uploading through the Files API doesn't require a beta header. The cURL example sends the `managed-agents-2026-04-01` header it uses throughout this walkthrough, which the Files API also accepts. - - ```bash cURL rubric=$(curl -fsSL https://api.anthropic.com/v1/files \ @@ -70,7 +66,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w ``` ```bash CLI - RUBRIC_ID=$(ant beta:files upload \ + RUBRIC_ID=$(ant files upload \ --file /tmp/rubric.md \ --transform id --raw-output) ``` @@ -94,7 +90,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w """ Path("/tmp/rubric.md").write_text(RUBRIC) - rubric = client.beta.files.upload(file=Path("/tmp/rubric.md")) + rubric = client.files.upload(file=Path("/tmp/rubric.md")) print(f"Uploaded rubric: {rubric.id}") ``` @@ -117,7 +113,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w `; await writeFile("/tmp/rubric.md", RUBRIC); - const rubric = await client.beta.files.upload({ + const rubric = await client.files.upload({ file: await toFile(readFile("/tmp/rubric.md"), "/tmp/rubric.md"), }); console.log(`Uploaded rubric: ${rubric.id}`); @@ -127,9 +123,9 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w using Anthropic; using Anthropic.Models.Beta.Agents; using Anthropic.Models.Beta.Environments; - using Anthropic.Models.Beta.Files; using Anthropic.Models.Beta.Sessions; using Anthropic.Models.Beta.Sessions.Events; + using Anthropic.Models.Files; var client = new AnthropicClient(); @@ -145,7 +141,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w """; await File.WriteAllTextAsync("/tmp/rubric.md", Rubric); - var rubric = await client.Beta.Files.Upload(new() + var rubric = await client.Files.Upload(new() { File = File.OpenRead("/tmp/rubric.md"), }); @@ -188,7 +184,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w panic(err) } - uploaded, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ + uploaded, err := client.Files.Upload(ctx, anthropic.FileUploadParams{ File: anthropic.File(f, "rubric.md", "text/markdown"), }) if err != nil { @@ -207,12 +203,12 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w import com.anthropic.models.beta.environments.BetaCloudConfigParams; import com.anthropic.models.beta.environments.EnvironmentCreateParams; import com.anthropic.models.beta.files.FileListParams; - import com.anthropic.models.beta.files.FileUploadParams; import com.anthropic.models.beta.sessions.SessionCreateParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsTextRubricParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserDefineOutcomeEventParams; import com.anthropic.models.beta.sessions.events.BetaManagedAgentsUserInterruptEventParams; import com.anthropic.models.beta.sessions.events.EventSendParams; + import com.anthropic.models.files.FileUploadParams; import java.io.InputStream; import java.nio.file.Files; @@ -234,7 +230,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w """; Files.writeString(Path.of("/tmp/rubric.md"), RUBRIC); - var rubric = client.beta().files().upload( + var rubric = client.files().upload( FileUploadParams.builder() .file(Path.of("/tmp/rubric.md")) .build()); @@ -242,6 +238,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. use Anthropic\Client; use Anthropic\Core\FileParam; @@ -283,7 +280,7 @@ Pass the rubric as inline text on `user.define_outcome` (see [Create a session w MD File.write("/tmp/rubric.md", RUBRIC) - rubric = client.beta.files.upload(file: Pathname.new("/tmp/rubric.md")) + rubric = client.files.upload(file: Pathname.new("/tmp/rubric.md")) puts "Uploaded rubric: #{rubric.id}" ``` @@ -715,11 +712,7 @@ You can either listen on the [event stream](https://platform.claude.com/docs/en/ ## Retrieve deliverables -The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session. - - - Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the files request. The SDK files methods send only the files beta automatically, so the examples pass it explicitly. - +The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly. ```bash cURL @@ -753,7 +746,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc --beta managed-agents-2026-04-01 \ --transform 'data[0].id' --raw-output) if [[ -n $FILE_ID ]]; then - ant beta:files download --file-id "$FILE_ID" --output /tmp/output.txt + ant files download --file-id "$FILE_ID" --output /tmp/output.txt fi ``` @@ -766,7 +759,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc # Download a file if files.data: - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) content.write_to_file("/tmp/output.txt") ``` @@ -783,7 +776,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc // Download a file if (files.data.length > 0) { - const content = await client.beta.files.download(files.data[0].id); + const content = await client.files.download(files.data[0].id); await writeFile("/tmp/output.txt", new Uint8Array(await content.arrayBuffer())); } ``` @@ -804,7 +797,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc // Download a file if (files.Items.Count > 0) { - using var download = await client.Beta.Files.Download(files.Items[0].ID); + using var download = await client.Files.Download(files.Items[0].ID); await using var output = File.Create("/tmp/output.txt"); await (await download.ReadAsStream()).CopyToAsync(output); } @@ -826,7 +819,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc // Download a file if len(files.Data) > 0 { - resp, err := client.Beta.Files.Download(ctx, files.Data[0].ID, anthropic.BetaFileDownloadParams{}) + resp, err := client.Files.Download(ctx, files.Data[0].ID) if err != nil { panic(err) } @@ -856,7 +849,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc // Download a file if (!files.data().isEmpty()) { - try (HttpResponse response = client.beta().files().download(files.data().getFirst().id())) { + try (HttpResponse response = client.files().download(files.data().getFirst().id())) { try (InputStream body = response.body()) { Files.copy(body, Path.of("/tmp/output.txt"), StandardCopyOption.REPLACE_EXISTING); } @@ -865,6 +858,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. // List files produced by this session // scope_id filtering requires the managed-agents beta on the files request $files = $client->beta->files->list(scopeID: $session->id, betas: ['managed-agents-2026-04-01']); @@ -887,7 +881,7 @@ The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Onc # Download a file if (first = files.data.first) - content = client.beta.files.download(first.id) + content = client.files.download(first.id) File.binwrite("/tmp/output.txt", content.read) end ``` diff --git a/content/en/managed-agents/environments.md b/content/en/managed-agents/environments.md index ea15c6dc44..6ea51d63ef 100644 --- a/content/en/managed-agents/environments.md +++ b/content/en/managed-agents/environments.md @@ -36,11 +36,21 @@ This page covers `type: cloud` environments. To run sandboxes on your own infras echo "Environment ID: $environment_id" ``` - ```bash CLI - ant beta:environments create \ - --name "python-dev" \ - --config '{type: cloud, networking: {type: unrestricted}}' - ``` + + ```bash CLI + ant beta:environments create < python-dev.environment.yaml + ``` + + + ```yaml + name: python-dev + config: + type: cloud + networking: + type: unrestricted + ``` + + ```python Python environment = client.beta.environments.create( @@ -241,22 +251,28 @@ The `packages` field pre-installs packages into the sandbox before the agent sta ) ``` - ```bash CLI - ant beta:environments create <<'YAML' - name: data-analysis - config: - type: cloud - packages: - pip: - - pandas - - numpy - - scikit-learn - npm: - - express - networking: - type: unrestricted - YAML - ``` + + ```bash CLI + ant beta:environments create < environment.yaml + ``` + + + ```yaml + name: data-analysis + config: + type: cloud + packages: + pip: + - pandas + - numpy + - scikit-learn + npm: + - express + networking: + type: unrestricted + ``` + + ```python Python environment = client.beta.environments.create( @@ -413,19 +429,25 @@ The following example creates an environment with `limited` networking: }' ``` - ```bash CLI - ant beta:environments create <<'YAML' - name: api-access - config: - type: cloud - networking: - type: limited - allowed_hosts: - - api.example.com - allow_mcp_servers: true - allow_package_managers: true - YAML - ``` + + ```bash CLI + ant beta:environments create < environment.yaml + ``` + + + ```yaml + name: api-access + config: + type: cloud + networking: + type: limited + allowed_hosts: + - api.example.com + allow_mcp_servers: true + allow_package_managers: true + ``` + + ```python Python environment = client.beta.environments.create( diff --git a/content/en/managed-agents/files.md b/content/en/managed-agents/files.md index 3f59282457..bd7ce90b21 100644 --- a/content/en/managed-agents/files.md +++ b/content/en/managed-agents/files.md @@ -24,18 +24,18 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b ``` ```bash CLI - FILE_ID=$(ant beta:files upload \ + FILE_ID=$(ant files upload \ --file data.csv \ --transform id --raw-output) ``` ```python Python - file = client.beta.files.upload(file=Path("data.csv")) + file = client.files.upload(file=Path("data.csv")) print(f"File ID: {file.id}") ``` ```typescript TypeScript - const file = await client.beta.files.upload({ + const file = await client.files.upload({ file: await toFile(readFile("data.csv"), "data.csv", { type: "text/csv" }), }); console.log(`File ID: ${file.id}`); @@ -43,7 +43,7 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b ```csharp C# await using var stream = File.OpenRead(csvPath); - var file = await client.Beta.Files.Upload(new() { File = stream }); + var file = await client.Files.Upload(new() { File = stream }); Console.WriteLine($"File ID: {file.ID}"); ``` @@ -54,7 +54,7 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b } defer csvFile.Close() - file, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ + file, err := client.Files.Upload(ctx, anthropic.FileUploadParams{ File: csvFile, }) if err != nil { @@ -64,13 +64,14 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b ``` ```java Java - var file = client.beta().files().upload( + var file = client.files().upload( FileUploadParams.builder().file(dataCsv).build() ); IO.println("File ID: " + file.id()); ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. $file = $client->beta->files->upload( FileParam::fromResource(fopen($csvPath, 'r'), filename: 'data.csv', contentType: 'text/csv'), ); @@ -78,7 +79,7 @@ First, upload a file using the [Files API](https://platform.claude.com/docs/en/b ``` ```ruby Ruby - file = client.beta.files.upload(file: Pathname(csv_path)) + file = client.files.upload(file: Pathname(csv_path)) puts "File ID: #{file.id}" ``` @@ -537,7 +538,7 @@ List all resources on a session with `resources.list`. To remove a file, call `r ## Listing and downloading session files -Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. +Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly. ```bash cURL @@ -551,7 +552,6 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) curl -fsSL "https://api.anthropic.com/v1/files/$FILE_ID/content" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: managed-agents-2026-04-01" \ -o output.txt ``` @@ -561,7 +561,7 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) --beta managed-agents-2026-04-01 # Download a file - ant beta:files download --file-id "$FILE_ID" --output output.txt + ant files download --file-id "$FILE_ID" --output output.txt ``` ```python Python @@ -574,11 +574,13 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) print(file.id, file.filename) # Download a file - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) content.write_to_file("output.txt") ``` ```typescript TypeScript + import { writeFile } from "node:fs/promises"; + // List files associated with a session const files = await client.beta.files.list({ scope_id: "sesn_abc123", @@ -589,21 +591,22 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) } // Download a file - const content = await client.beta.files.download(files.data[0].id); - await content.writeToFile("output.txt"); + const content = await client.files.download(files.data[0].id); + await writeFile("output.txt", new Uint8Array(await content.arrayBuffer())); ``` ```csharp C# // List files associated with a session - var files = await client.Beta.Files.List(new FileListParams + var files = await client.Beta.Files.List(new() { ScopeID = "sesn_abc123", Betas = ["managed-agents-2026-04-01"], }); // Download a file - byte[] content = await client.Beta.Files.Download(files.Data[0].ID); - await File.WriteAllBytesAsync("output.txt", content); + using var content = await client.Files.Download(files.Items[0].ID); + await using var output = File.Create("output.txt"); + await (await content.ReadAsStream()).CopyToAsync(output); ``` ```go Go @@ -617,7 +620,7 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) } // Download a file - resp, err := client.Beta.Files.Download(ctx, files.Data[0].ID, anthropic.BetaFileDownloadParams{}) + resp, err := client.Files.Download(ctx, files.Data[0].ID) if err != nil { panic(err) } @@ -640,7 +643,7 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) .build()); // Download a file - try (HttpResponse response = client.beta().files().download(files.data().get(0).id())) { + try (HttpResponse response = client.files().download(files.data().get(0).id())) { try (InputStream body = response.body()) { Files.copy(body, Path.of("output.txt"), StandardCopyOption.REPLACE_EXISTING); } @@ -648,6 +651,7 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) ``` ```php PHP + // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs. // List files associated with a session $files = $client->beta->files->list( scopeID: 'sesn_abc123', @@ -667,7 +671,7 @@ Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) ) # Download a file - content = client.beta.files.download(files.data[0].id) + content = client.files.download(files.data[0].id) File.binwrite("output.txt", content.read) ``` diff --git a/content/en/managed-agents/github.md b/content/en/managed-agents/github.md index 09e2cd6a13..8b6a07e5e2 100644 --- a/content/en/managed-agents/github.md +++ b/content/en/managed-agents/github.md @@ -47,16 +47,28 @@ First, create an agent that declares the GitHub MCP server. The agent definition ) ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "Code Reviewer" \ - --model '{id: claude-opus-5}' \ - --system "You are a code review assistant with access to GitHub." \ - --mcp-server '{type: url, name: github, url: https://api.githubcopilot.com/mcp/}' \ - --tool '{type: agent_toolset_20260401}' \ - --tool '{type: mcp_toolset, mcp_server_name: github}' \ - --transform id --raw-output) - ``` + + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < code-reviewer.agent.yaml) + ``` + + + ```yaml + name: Code Reviewer + model: + id: claude-opus-5 + system: You are a code review assistant with access to GitHub. + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + ``` + + ```python Python agent = client.beta.agents.create( diff --git a/content/en/managed-agents/mcp-connector.md b/content/en/managed-agents/mcp-connector.md index 7b278fcbc6..5362cb560c 100644 --- a/content/en/managed-agents/mcp-connector.md +++ b/content/en/managed-agents/mcp-connector.md @@ -51,15 +51,27 @@ Each declared server also needs a matching `mcp_toolset` entry in the `tools` ar agent_id=$(jq -r '.id' <<<"$agent_response") ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "GitHub Assistant" \ - --model '{id: claude-opus-5}' \ - --mcp-server '{type: url, name: github, url: "https://api.githubcopilot.com/mcp/"}' \ - --tool '{type: agent_toolset_20260401}' \ - --tool '{type: mcp_toolset, mcp_server_name: github}' \ - --transform id --raw-output) - ``` + + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < github-assistant.agent.yaml) + ``` + + + ```yaml + name: GitHub Assistant + model: + id: claude-opus-5 + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + ``` + + ```python Python agent = client.beta.agents.create( diff --git a/content/en/managed-agents/memory.md b/content/en/managed-agents/memory.md index b90c5f0257..d57195ab00 100644 --- a/content/en/managed-agents/memory.md +++ b/content/en/managed-agents/memory.md @@ -13,7 +13,7 @@ Each Managed Agents session starts with a fresh context by default. When a sessi Don't combine `agent-memory-2026-07-22` with `managed-agents-2026-04-01` on a memory store request: sending both returns a `400` error. If your code sets beta headers explicitly, replace `managed-agents-2026-04-01` with `agent-memory-2026-07-22` on memory store calls rather than adding a second value. Session endpoints, including attaching a memory store to a session, still use `managed-agents-2026-04-01`. - On July 22, 2026, the `managed-agents-2026-04-01` header adopts the same list behavior on `GET /v1/memory_stores/{memory_store_id}/memories`; sending `agent-memory-2026-07-22` opts you into that behavior now. Page cursors from requests made without the header aren't valid with it, so restart from the first page. + `GET /v1/memory_stores/{memory_store_id}/memories` behaves the same under either header: results come back in a stable, server-defined order, and `path_prefix` and `depth` apply the same way. ## Overview @@ -377,7 +377,7 @@ A maximum of **8 memory stores** are supported per session. Attach multiple stor ### How the agent accesses memory -Each attached store is mounted inside the session's sandbox as a directory under `/mnt/memory/`. The directory name is the store's display name sanitized to a filesystem-safe slug (lowercased; non-alphanumeric runs become a single hyphen), so a store named "Demo Memory" mounts at `/mnt/memory/demo-memory/`. The exact path is returned in the `mount_path` field on the session's memory-store resource; read it from there rather than constructing it yourself. The agent reads and writes the store with the standard [agent toolset](https://platform.claude.com/docs/en/managed-agents/tools). Writes under the mount path are persisted back to the store and stay in sync across sessions that share it; writes to any other path under `/mnt/memory/` land in container-local scratch and are lost when the session ends. A short description of each mount (display name, mount path, access mode, store `description`, and any `instructions`) is automatically added to the system prompt. +Each attached store is mounted inside the session's sandbox as a directory under `/mnt/memory/`. The directory name is the store's display name sanitized to a filesystem-safe slug (lowercased; non-alphanumeric runs become a single hyphen), so a store named "Demo Memory" mounts at `/mnt/memory/demo-memory/`. The exact path is returned in the `mount_path` field on the session's memory-store resource; read it from there rather than constructing it yourself. The agent reads and writes the store with the standard [agent toolset](https://platform.claude.com/docs/en/managed-agents/tools). Writes under the mount path are persisted back to the store and stay in sync across sessions that share it; writes to any other path under `/mnt/memory/` fail, because the sandbox mounts that parent directory read-only. A short description of each mount (display name, mount path, access mode, store `description`, and any `instructions`) is automatically added to the system prompt. `access` is enforced at the filesystem level: a `read_only` mount rejects writes, while writes to a `read_write` mount produce [memory versions](https://platform.claude.com/docs/en/managed-agents/memory#audit-memory-changes) attributed to the session. diff --git a/content/en/managed-agents/migration.md b/content/en/managed-agents/migration.md index f4085c59b1..102a1370b4 100644 --- a/content/en/managed-agents/migration.md +++ b/content/en/managed-agents/migration.md @@ -300,32 +300,40 @@ If you built an agent by calling `messages.create` in a `while` loop, running to kill "${stream_pid}" 2>/dev/null || true ``` - ```bash CLI - { read -r _ agent_id; read -r _ agent_version; } < <(ant beta:agents create \ - --name "Task Runner" \ - --model claude-opus-5 \ - --tool '{type: agent_toolset_20260401}' \ - --transform '{id,version}' --format yaml) - - session_id=$(ant beta:sessions create \ - --agent "{type: agent, id: $agent_id, version: $agent_version}" \ - --environment-id "$environment_id" \ - --transform id --raw-output) - - # Open the stream first, then send the user message - exec {stream}< <(ant beta:sessions:events stream \ - --session-id "$session_id" \ - --transform type --raw-output) - - ant beta:sessions:events send \ - --session-id "$session_id" \ - --event "{type: user.message, content: [{type: text, text: \"$task\"}]}" \ - > /dev/null - - # Wait for the session to go idle (grep exits at the first match) - grep -m1 -x 'session.status_idle' <&"$stream" > /dev/null - exec {stream}<&- - ``` + + ```bash CLI + { read -r _ agent_id; read -r _ agent_version; } < <(ant beta:agents create \ + --transform '{id,version}' --format yaml < task-runner.agent.yaml) + + session_id=$(ant beta:sessions create \ + --agent "{type: agent, id: $agent_id, version: $agent_version}" \ + --environment-id "$environment_id" \ + --transform id --raw-output) + + # Open the stream first, then send the user message + exec {stream}< <(ant beta:sessions:events stream \ + --session-id "$session_id" \ + --transform type --raw-output) + + ant beta:sessions:events send \ + --session-id "$session_id" \ + --event "{type: user.message, content: [{type: text, text: \"$task\"}]}" \ + > /dev/null + + # Wait for the session to go idle (grep exits at the first match) + grep -m1 -x 'session.status_idle' <&"$stream" > /dev/null + exec {stream}<&- + ``` + + + ```yaml + name: Task Runner + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + ``` + + ```python Python agent = client.beta.agents.create( @@ -1324,12 +1332,21 @@ When a new Claude model is released, migrating a Claude Managed Agents integrati --json "$(jq -n --argjson version "$AGENT_VERSION" '{version: $version, model: "claude-opus-5"}')" ``` - ```bash CLI - ant beta:agents update \ - --agent-id "$AGENT_ID" \ - --version "$AGENT_VERSION" \ - --model claude-opus-5 - ``` + + ```bash CLI + ant beta:agents update --agent-id "$AGENT_ID" < agent.yaml + ``` + + + ```yaml + name: Task Runner + model: claude-opus-5 + system: You are a task automation agent. Complete the task you are given end to end. + tools: + - type: agent_toolset_20260401 + ``` + + ```python Python client.beta.agents.update( diff --git a/content/en/managed-agents/multiagent-orchestration.md b/content/en/managed-agents/multiagent-orchestration.md index 18120d65dd..96054ff8c7 100644 --- a/content/en/managed-agents/multiagent-orchestration.md +++ b/content/en/managed-agents/multiagent-orchestration.md @@ -63,22 +63,28 @@ When [defining your agent](https://platform.claude.com/docs/en/managed-agents/ag ) ``` - ```bash CLI - ant beta:agents create < + ```bash CLI + ant beta:agents create < coordinator.agent.yaml + ``` + + + ```yaml + name: Engineering Lead + model: claude-opus-5 + system: You coordinate engineering work. Delegate code review to the reviewer agent and test writing to the test agent. + tools: + - type: agent_toolset_20260401 + multiagent: + type: coordinator + agents: + - type: agent + id: $REVIEWER_AGENT_ID # replace before running command + - type: agent + id: $TEST_WRITER_AGENT_ID # replace before running command + ``` + + ```python Python coordinator = client.beta.agents.create( @@ -420,40 +426,50 @@ MCP servers are agent-scoped (each agent definition declares its own servers and echo "$session_id" ``` - ```bash CLI - research_agent_id=$(ant beta:agents create --transform id --raw-output < + ```bash CLI + research_agent_id=$(ant beta:agents create --transform id --raw-output < researcher.agent.yaml) + ``` + + + ```yaml + name: researcher + model: claude-haiku-4-5 + mcp_servers: + - type: url + name: github + url: https://api.githubcopilot.com/mcp/ + tools: + - type: mcp_toolset + mcp_server_name: github + ``` + + + + ```yaml + name: coordinator + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + multiagent: + type: coordinator + agents: + - type: agent + id: $research_agent_id # replace before running command + ``` + + + ```bash CLI + coordinator_id=$(ant beta:agents create --transform id --raw-output < subagent-coordinator.agent.yaml) + + session_id=$(ant beta:sessions create \ + --agent "$coordinator_id" \ + --environment-id "$environment_id" \ + --vault-id "$vault_id" \ + --transform id --raw-output) + echo "$session_id" + ``` + ```python Python research_agent = client.beta.agents.create( diff --git a/content/en/managed-agents/permission-policies.md b/content/en/managed-agents/permission-policies.md index 016cc19ef3..2ddaa2dd7f 100644 --- a/content/en/managed-agents/permission-policies.md +++ b/content/en/managed-agents/permission-policies.md @@ -50,17 +50,23 @@ When creating an agent, you can apply a policy to every tool in `agent_toolset_2 }') ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Coding Assistant - model: claude-opus-5 - tools: - - type: agent_toolset_20260401 - default_config: - permission_policy: - type: always_ask - YAML - ``` + + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + + ```yaml + name: Coding Assistant + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + default_config: + permission_policy: + type: always_ask + ``` + + ```python Python agent = client.beta.agents.create( @@ -234,23 +240,29 @@ This example connects a GitHub MCP server and allows its tools to run without co }') ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Dev Assistant - model: claude-opus-5 - mcp_servers: - - type: url - name: github - url: https://mcp.example.com/github - tools: - - type: agent_toolset_20260401 - - type: mcp_toolset - mcp_server_name: github - default_config: - permission_policy: - type: always_allow - YAML - ``` + + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + + ```yaml + name: Dev Assistant + model: claude-opus-5 + mcp_servers: + - type: url + name: github + url: https://mcp.example.com/github + tools: + - type: agent_toolset_20260401 + - type: mcp_toolset + mcp_server_name: github + default_config: + permission_policy: + type: always_allow + ``` + + ```python Python agent = client.beta.agents.create( @@ -561,8 +573,8 @@ Use the `configs` array to override the default for individual tools. The `name` }, }, }, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{{ - OfBetaManagedAgentsBashToolConfigs: &anthropic.BetaManagedAgentsBashToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ + OfBash: &anthropic.BetaManagedAgentsBashToolConfigParams{ PermissionPolicy: anthropic.BetaManagedAgentsBashToolConfigParamsPermissionPolicyUnion{ OfAlwaysAsk: &anthropic.BetaManagedAgentsAlwaysAskPolicyParam{ Type: anthropic.BetaManagedAgentsAlwaysAskPolicyTypeAlwaysAsk, diff --git a/content/en/managed-agents/quickstart.md b/content/en/managed-agents/quickstart.md index 45489b5c5f..9a288e8a4a 100644 --- a/content/en/managed-agents/quickstart.md +++ b/content/en/managed-agents/quickstart.md @@ -37,7 +37,7 @@ This guide walks you through creating an agent, setting up an environment, start For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; @@ -88,7 +88,7 @@ ant --version ```groovy Gradle - implementation("com.anthropic:anthropic-java:2.53.0") + implementation("com.anthropic:anthropic-java:2.57.0") ``` @@ -161,16 +161,24 @@ export ANTHROPIC_API_KEY="your-api-key-here" echo "Agent ID: $AGENT_ID, version: $AGENT_VERSION" ``` - ```bash CLI - AGENT_ID=$(ant beta:agents create \ - --name "Coding Assistant" \ - --model '{id: claude-opus-5}' \ - --system "You are a helpful coding assistant. Write clean, well-documented code." \ - --tool '{type: agent_toolset_20260401}' \ - --transform id --raw-output) + + ```bash CLI + AGENT_ID=$(ant beta:agents create --transform id --raw-output < coding-assistant.agent.yaml) - echo "Agent ID: $AGENT_ID" - ``` + echo "Agent ID: $AGENT_ID" + ``` + + + ```yaml + name: Coding Assistant + model: + id: claude-opus-5 + system: You are a helpful coding assistant. Write clean, well-documented code. + tools: + - type: agent_toolset_20260401 + ``` + + ```python Python from anthropic import Anthropic @@ -358,14 +366,23 @@ export ANTHROPIC_API_KEY="your-api-key-here" echo "Environment ID: $ENVIRONMENT_ID" ``` - ```bash CLI - ENVIRONMENT_ID=$(ant beta:environments create \ - --name "quickstart-env" \ - --config '{type: cloud, networking: {type: unrestricted}}' \ - --transform id --raw-output) + + ```bash CLI + ENVIRONMENT_ID=$(ant beta:environments create --transform id --raw-output < quickstart.environment.yaml) - echo "Environment ID: $ENVIRONMENT_ID" - ``` + echo "Environment ID: $ENVIRONMENT_ID" + ``` + + + ```yaml + name: quickstart-env + config: + type: cloud + networking: + type: unrestricted + ``` + + ```python Python environment = client.beta.environments.create( diff --git a/content/en/managed-agents/self-hosted-sandboxes.md b/content/en/managed-agents/self-hosted-sandboxes.md index ec5d5a26f6..01a2fcdbd8 100644 --- a/content/en/managed-agents/self-hosted-sandboxes.md +++ b/content/en/managed-agents/self-hosted-sandboxes.md @@ -83,11 +83,19 @@ You need: }' ``` - ```bash CLI - ant beta:environments create \ - --name self-hosted \ - --config '{"type": "self_hosted"}' - ``` + + ```bash CLI + ant beta:environments create < environment.yaml + ``` + + + ```yaml + name: self-hosted + config: + type: self_hosted + ``` + + ```python Python client = anthropic.Anthropic() @@ -206,7 +214,7 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu For Linux environments, download the release binary directly. ```bash - VERSION=1.22.1 + VERSION=1.26.1 OS=$(uname -s | tr '[:upper:]' '[:lower:]') case $(uname -m) in x86_64) ARCH=amd64 ;; @@ -245,7 +253,7 @@ Choose **always-on** for the simplest setup: a long-running process polls the qu ```text FROM your-base-image - ARG ANT_VERSION=1.22.1 + ARG ANT_VERSION=1.26.1 ARG TARGETARCH RUN ARCH=$([ "$TARGETARCH" = "arm64" ] && echo arm64 || echo amd64) && \ curl -fsSL "https://github.com/anthropics/anthropic-cli/releases/download/v${ANT_VERSION}/ant_${ANT_VERSION}_linux_${ARCH}.tar.gz" \ @@ -670,7 +678,7 @@ The SDK provides three helpers at different levels of control. `EnvironmentWorke * `.run()`: runs indefinitely, picking up sessions as they arrive. * `.handle_item()`: handles a single claimed work item and exits. Pass the work, session, and environment identifiers explicitly, or let it read the `ANTHROPIC_*` variables that `ant beta:worker poll --on-work` sets for the process it spawns. To let the session mount its [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores), also pass the work item's `secret` as `work_secret` (`workSecret` in TypeScript, `WorkSecret` in Go) or set `ANTHROPIC_WORK_SECRET`; `ant beta:worker poll --on-work` does not set that variable, so read the secret from the work item JSON it writes to your script's standard input, as shown in [Run one sandbox per session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#run-one-sandbox-per-session). - * `memory_sync_interval` (`memorySyncIntervalMs` in TypeScript, `MemorySyncInterval` in Go) and `memory_sync_deletes` (`memoryRemoteDeletes`, `MemorySyncDeletes`): how often attached memory stores reconcile with the server while the session runs, and whether files the agent deletes locally are also deleted from the store. See [Configure sync](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#configure-sync) for units, defaults, and how to disable memory support. + * `memory_sync_interval` (`memorySyncIntervalMs` in TypeScript, `MemorySyncInterval` in Go) and `memory_sync_deletions` (`memorySyncDeletions`, `MemorySyncDeletions`): how often attached memory stores reconcile with the server while the session runs, and whether files the agent deletes locally are also deleted from the store. See [Configure sync](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#configure-sync) for units, defaults, and how to disable memory support. * **`work.poller()`:** polls the work queue on your behalf and gives you each claimed session. Use this when you want to decide what happens for each session, for example launching a sandbox rather than running tools in-process. @@ -1276,7 +1284,7 @@ The sandbox image also needs a writable `/mnt/memory` (see [Prepare the host](ht Two `EnvironmentWorker` options control memory behavior: * **`memory_sync_interval`** (Python, in seconds; `memorySyncIntervalMs` in TypeScript, in milliseconds; `MemorySyncInterval` in Go, a duration): how often attached stores reconcile with the server while the session runs. Defaults to 15 seconds; the minimum is 5 seconds. A shorter interval narrows the window in which another session sees stale memories, at the cost of more memory store requests. `None` in Python, `null` in TypeScript, or a negative duration in Go disables memory support entirely: the worker neither downloads nor syncs stores, and a session with memory stores attached runs without them even though its system prompt still describes them, so disable memory support only on workers whose sessions attach no memory stores. While memory support is enabled, a work item that arrives without a per-session `secret` for a session with attached stores fails rather than running without memory (see [Troubleshoot memory mounts](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#troubleshoot-memory-mounts)). -* **`memory_sync_deletes`** (`memoryRemoteDeletes` in TypeScript, `MemorySyncDeletes` in Go): whether a file the agent deletes locally is also deleted from the store. The value is one of `"enabled"` (the default), `"log_only"`, or `"disabled"` in Python and TypeScript, and one of the constants `environments.MemorySyncDeletesEnabled` (the zero value), `environments.MemorySyncDeletesLogOnly`, or `environments.MemorySyncDeletesDisabled` in Go. When enabled, the worker deletes the memory from the store once a later sync confirms the file is still gone; in log-only mode it runs the same checks but only logs what it would have deleted, which lets you watch what your workers would delete before you trust the enabled mode; when disabled, it never deletes from the store. Uploads and downloads are unaffected by this setting. +* **`memory_sync_deletions`** (`memorySyncDeletions` in TypeScript, `MemorySyncDeletions` in Go): whether a file the agent deletes locally is also deleted from the store. The value is one of `"enabled"` (the default), `"log_only"`, or `"disabled"` in Python and TypeScript, and one of the constants `environments.MemorySyncDeletionsEnabled` (the zero value), `environments.MemorySyncDeletionsLogOnly`, or `environments.MemorySyncDeletionsDisabled` in Go. When enabled, the worker deletes the memory from the store once a later sync confirms the file is still gone; in log-only mode it runs the same checks but only logs what it would have deleted, which lets you watch what your workers would delete before you trust the enabled mode; when disabled, it never deletes from the store. Uploads and downloads are unaffected by this setting. Set these options where you construct the worker, whether through the `EnvironmentWorker` constructor or, in Python and TypeScript, the `client.beta.environments.work.worker()` factory that the webhook handler uses. @@ -1290,7 +1298,7 @@ For example, to sync every 10 seconds and only log the deletes the worker would environment_key=environment_key, workdir="/workspace", memory_sync_interval=10, # seconds - memory_sync_deletes="log_only", + memory_sync_deletions="log_only", ) ``` @@ -1301,7 +1309,7 @@ For example, to sync every 10 seconds and only log the deletes the worker would environmentKey, workdir: "/workspace", memorySyncIntervalMs: 10_000, - memorySyncDeletes: "log_only" + memorySyncDeletions: "log_only" }); ``` @@ -1311,11 +1319,11 @@ For example, to sync every 10 seconds and only log the deletes the worker would ```go Go worker := environments.NewEnvironmentWorker(client, environments.EnvironmentWorkerOptions{ - EnvironmentID: environmentID, - EnvironmentKey: environmentKey, - Workdir: "/workspace", - MemorySyncInterval: 10 * time.Second, - MemorySyncDeletes: environments.MemorySyncDeletesLogOnly, + EnvironmentID: environmentID, + EnvironmentKey: environmentKey, + Workdir: "/workspace", + MemorySyncInterval: 10 * time.Second, + MemorySyncDeletions: environments.MemorySyncDeletionsLogOnly, }) ``` diff --git a/content/en/managed-agents/skills.md b/content/en/managed-agents/skills.md index 73b2448666..ab9e42ed06 100644 --- a/content/en/managed-agents/skills.md +++ b/content/en/managed-agents/skills.md @@ -1,7 +1,7 @@ --- title: Skills url: https://platform.claude.com/docs/en/managed-agents/skills -description: Attach reusable, filesystem-based expertise to your agent for domain-specific workflows. +description: Attach pre-built or custom skills to an agent in Claude Managed Agents to give it reusable, filesystem-based expertise for domain-specific workflows. --- Skills are reusable, filesystem-based resources that give your agent domain-specific expertise: workflows, context, and best practices that turn a general-purpose agent into a specialist. Each skill you add incurs a modest cost on the session's context window, adding instructions and metadata that help the model use the skill. Learn more in the [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) overview. @@ -21,21 +21,18 @@ To learn how to author custom skills, see [Agent Skills](https://platform.claude A custom skill is a directory containing a `SKILL.md` file plus any supporting files, uploaded to your workspace as a zip archive or as individual files. Creating the skill returns the `skill_*` ID you reference when attaching it to an agent. Anthropic pre-built skills are already available in every workspace and don't require this step. To use only pre-built skills, skip to [Attach skills to an agent](https://platform.claude.com/docs/en/managed-agents/skills#attach-skills-to-an-agent). -The Skills API doesn't require a beta header. The cURL example still sends `anthropic-beta: skills-2025-10-02`, and the CLI and SDK `beta` commands add it automatically; requests that include it continue to work unchanged. - -These examples omit the optional `display_title` field, so the skill's title is derived from `SKILL.md`. An explicitly passed `display_title` must be unique among the custom skills in your workspace. +These examples omit the optional `display_name` field, so the skill's display name is derived from the `name` field in `SKILL.md`. An explicit `display_name` can be up to 255 characters and doesn't need to be unique within your workspace. ```bash cURL curl -X POST "https://api.anthropic.com/v1/skills" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ - -H "anthropic-beta: skills-2025-10-02" \ -F "files[]=@example_skill.zip" ``` ```bash CLI - ant beta:skills create \ + ant skills create \ --file example_skill.zip ``` @@ -45,12 +42,12 @@ These examples omit the optional `display_title` field, so the skill's title is client = anthropic.Anthropic() - skill = client.beta.skills.create( + skill = client.skills.create( files=files_from_dir("example_skill"), ) print(f"Created skill: {skill.id}") - print(f"Latest version: {skill.latest_version}") + print(f"Latest version: {skill.latest_version_id}") ``` ```typescript TypeScript @@ -60,18 +57,18 @@ These examples omit the optional `display_title` field, so the skill's title is const client = new Anthropic(); - const skill = await client.beta.skills.create({ + const skill = await client.skills.create({ files: [await toFile(fs.createReadStream("example_skill.zip"), "example_skill.zip")] }); console.log(`Created skill: ${skill.id}`); - console.log(`Latest version: ${skill.latest_version}`); + console.log(`Latest version: ${skill.latest_version_id}`); ``` ```csharp C# using System.IO; using Anthropic; - using Anthropic.Models.Beta.Skills; + using Anthropic.Models.Skills; AnthropicClient client = new(); @@ -82,10 +79,10 @@ These examples omit the optional `display_title` field, so the skill's title is ], }; - var skill = await client.Beta.Skills.Create(parameters); + var skill = await client.Skills.Create(parameters); Console.WriteLine($"Created skill: {skill.ID}"); - Console.WriteLine($"Latest version: {skill.LatestVersion}"); + Console.WriteLine($"Latest version: {skill.LatestVersionID}"); ``` ```go Go @@ -110,7 +107,7 @@ These examples omit the optional `display_title` field, so the skill's title is } defer zipFile.Close() - skill, err := client.Beta.Skills.New(context.TODO(), anthropic.BetaSkillNewParams{ + skill, err := client.Skills.New(context.TODO(), anthropic.SkillNewParams{ Files: []io.Reader{zipFile}, }) if err != nil { @@ -118,7 +115,7 @@ These examples omit the optional `display_title` field, so the skill's title is } fmt.Printf("Created skill: %s\n", skill.ID) - fmt.Printf("Latest version: %s\n", skill.LatestVersion) + fmt.Printf("Latest version: %s\n", skill.LatestVersionID) } ``` @@ -126,8 +123,8 @@ These examples omit the optional `display_title` field, so the skill's title is import com.anthropic.client.AnthropicClient; import com.anthropic.client.okhttp.AnthropicOkHttpClient; import com.anthropic.core.MultipartField; - import com.anthropic.models.beta.skills.SkillCreateParams; - import com.anthropic.models.beta.skills.SkillCreateResponse; + import com.anthropic.models.skills.Skill; + import com.anthropic.models.skills.SkillCreateParams; import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; @@ -144,16 +141,15 @@ These examples omit the optional `display_title` field, so the skill's title is .build()) .build(); - SkillCreateResponse skill = client.beta().skills().create(params); + Skill skill = client.skills().create(params); IO.println("Created skill: " + skill.id()); - IO.println("Latest version: " + skill.latestVersion().orElseThrow()); + IO.println("Latest version: " + skill.latestVersionId()); } ``` ```php PHP - -To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/beta/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). +To list, retrieve, delete, and version custom skills, see [Managing custom skills](https://platform.claude.com/docs/en/build-with-claude/skills-guide#managing-custom-skills). For the full request and response schemas, see the [Create Skill API reference](https://platform.claude.com/docs/en/api/skills/create). Skill bundles upload directly to the Skills API rather than through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files). ## Attach skills to an agent @@ -223,19 +219,25 @@ Each entry in the `skills` array uses the following fields: ) ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Financial Analyst - model: claude-opus-5 - system: You are a financial analysis agent. - skills: - - type: anthropic - skill_id: xlsx - - type: custom - skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv - version: latest - YAML - ``` + + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + + ```yaml + name: Financial Analyst + model: claude-opus-5 + system: You are a financial analysis agent. + skills: + - type: anthropic + skill_id: xlsx + - type: custom + skill_id: skill_01AbCdEfGhIjKlMnOpQrStUv + version: latest + ``` + + ```python Python agent = client.beta.agents.create( diff --git a/content/en/managed-agents/tools.md b/content/en/managed-agents/tools.md index 3b1df1e105..889e3ff00b 100644 --- a/content/en/managed-agents/tools.md +++ b/content/en/managed-agents/tools.md @@ -129,8 +129,8 @@ Config entries for `web_search` and `web_fetch` also accept domain filters and o Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{{ - OfBetaManagedAgentsWebFetchToolConfigs: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{{ + OfWebFetch: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ Enabled: anthropic.Bool(false), }, }}, @@ -446,15 +446,15 @@ The following request creates an agent with this toolset and prints the `configs Tools: []anthropic.BetaAgentNewParamsToolUnion{{ OfAgentToolset20260401: &anthropic.BetaManagedAgentsAgentToolset20260401Params{ Type: anthropic.BetaManagedAgentsAgentToolset20260401ParamsTypeAgentToolset20260401, - Configs: []anthropic.BetaManagedAgentsAgentToolConfigUnionParamsUnion{ - {OfBetaManagedAgentsWebSearchToolConfigs: &anthropic.BetaManagedAgentsWebSearchToolConfigParams{ + Configs: []anthropic.BetaManagedAgentsAgentToolConfigParamsUnion{ + {OfWebSearch: &anthropic.BetaManagedAgentsWebSearchToolConfigParams{ AllowedDomains: []string{"docs.example.com", "arxiv.org"}, UserLocation: anthropic.BetaManagedAgentsUserLocationParam{ Country: anthropic.String("US"), Timezone: anthropic.String("America/Los_Angeles"), }, }}, - {OfBetaManagedAgentsWebFetchToolConfigs: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ + {OfWebFetch: &anthropic.BetaManagedAgentsWebFetchToolConfigParams{ BlockedDomains: []string{"ads.example.com"}, MaxContentTokens: anthropic.Int(50000), }}, @@ -691,25 +691,31 @@ If your sessions run in a self-hosted sandbox, the environment worker can [serve ) ``` - ```bash CLI - ant beta:agents create <<'YAML' - name: Weather Agent - model: claude-opus-5 - tools: - - type: agent_toolset_20260401 - - type: custom - name: get_weather - description: Get current weather for a location - input_schema: - type: object - properties: - location: - type: string - description: City name - required: - - location - YAML - ``` + + ```bash CLI + ant beta:agents create < agent.yaml + ``` + + + ```yaml + name: Weather Agent + model: claude-opus-5 + tools: + - type: agent_toolset_20260401 + - type: custom + name: get_weather + description: Get current weather for a location + input_schema: + type: object + properties: + location: + type: string + description: City name + required: + - location + ``` + + ```python Python agent = client.beta.agents.create( diff --git a/content/en/managed-agents/vaults.md b/content/en/managed-agents/vaults.md index ae4f4806de..59f2a1b99e 100644 --- a/content/en/managed-agents/vaults.md +++ b/content/en/managed-agents/vaults.md @@ -37,13 +37,20 @@ A vault is the collection of `credentials` associated with an end user. Give it echo "$vault_id" # "vlt_01ABC..." ``` - ```bash CLI - VAULT_ID=$(ant beta:vaults create \ - --display-name "Alice" \ - --metadata '{external_user_id: usr_abc123}' \ - --transform id --raw-output) - echo "$VAULT_ID" # "vlt_01ABC..." - ``` + + ```bash CLI + VAULT_ID=$(ant beta:vaults create --transform id --raw-output < alice.vault.yaml) + echo "$VAULT_ID" # "vlt_01ABC..." + ``` + + + ```yaml + display_name: Alice + metadata: + external_user_id: usr_abc123 + ``` + + ```python Python vault = client.beta.vaults.create( diff --git a/content/en/release-notes/overview.md b/content/en/release-notes/overview.md index 3f65f0db0f..c1af8d5e27 100644 --- a/content/en/release-notes/overview.md +++ b/content/en/release-notes/overview.md @@ -4,6 +4,8 @@ url: https://platform.claude.com/docs/en/release-notes/overview description: Updates to the Claude Platform, including the Claude API, client SDKs, and the Claude Console. --- +The Claude Platform release notes list changes to the Claude API, the client SDKs, and the Claude Console, newest first. + For release notes on Claude Apps, see the [Release notes for Claude Apps in the Claude Help Center](https://support.claude.com/en/articles/12138966-release-notes). @@ -12,15 +14,15 @@ description: Updates to the Claude Platform, including the Claude API, client SD ### August 19, 2026 -* The [Admin API](https://platform.claude.com/docs/en/api/admin) user-management endpoints for **Claude Enterprise** (claude.ai) organizations (members, invites, groups, and custom roles) are now generally available. The `anthropic-beta: ce-user-management-2026-07-13` header is no longer required on group and custom-role requests; requests that still send it are accepted unchanged. See [User management](https://platform.claude.com/docs/en/manage-claude/user-management). - -- The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is now generally available on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the GA response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). Storage is 1 TB per organization and the rate limit is 500 requests per minute. `/v1/files` requests that still send the beta header keep working and return the previous response format. - +* The [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) is now generally available on the Claude API as the `computer_toolset_20260801` toolset: no beta header, batch actions (several actions in one turn), `zoom` enabled by default, and per-member configuration through `configs`. Earlier beta versions remain available. Upgrading an existing integration changes the request shape and tool handling; see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124). +* We've launched the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`), a client toolset for driving a browser that your application hosts. It works inside a browser viewport rather than a whole desktop, reading the page itself (its accessibility tree, elements, forms, and tabs) and adding element references, form input, tab management, download reporting, and opt-in file upload on top of screenshot-and-click control. +* Both toolsets are available for Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, and Claude Opus 4.8 on the Claude API. +* The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is now generally available on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the GA response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). `/v1/files` requests that still send the beta header keep working and return the previous response format. * [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the Skills API (`/v1/skills`) are now generally available on the Claude API. Requests no longer require the `skills-2025-10-02` beta header, including Messages API requests that load Skills through the `container` parameter. Requests that still send the header continue to work unchanged. See [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide). - -- You can now restrict which sites a Claude Managed Agents agent's `web_search` and `web_fetch` tools can reach. Set `allowed_domains` or `blocked_domains` on the tool's entry in the `agent_toolset_20260401` `configs` array; `web_fetch` also accepts `max_content_tokens` and `web_search` accepts `user_location`. Each `configs` entry is identified by its `name` and typed by an optional `type`, and requests that pass only `name`, `enabled`, and `permission_policy` continue to work; in the typed SDKs, `configs` entries become per-tool types. See [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools#restrict-web-search-and-web-fetch-domains). -- Claude Managed Agents sessions that run in a [self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) can now attach [memory stores](https://platform.claude.com/docs/en/managed-agents/memory). The Python, TypeScript, and Go SDK workers download each attached store into the sandbox at its `mount_path` and sync the agent's changes back to the store. See [Use memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores). -- The session viewer in the Claude Console has been redesigned with a timeline minimap, a transcript grouped by model request, and an Inspector panel for session details and cost, raw events, per-tool statistics, mounted resources, and per-thread activity. See [Console observability](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#console-observability). +* The [Admin API](https://platform.claude.com/docs/en/api/admin) user-management endpoints for **Claude Enterprise** (claude.ai) organizations (members, invites, groups, and custom roles) are now generally available. The `anthropic-beta: ce-user-management-2026-07-13` header is no longer required on group and custom-role requests; requests that still send it are accepted unchanged. See [User management](https://platform.claude.com/docs/en/manage-claude/user-management). +* You can now restrict which sites a Claude Managed Agents agent's `web_search` and `web_fetch` tools can reach. Set `allowed_domains` or `blocked_domains` on the tool's entry in the `agent_toolset_20260401` `configs` array; `web_fetch` also accepts `max_content_tokens` and `web_search` accepts `user_location`. Each `configs` entry is identified by its `name` and typed by an optional `type`, and requests that pass only `name`, `enabled`, and `permission_policy` continue to work; in the typed SDKs, `configs` entries become per-tool types. See [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools#restrict-web-search-and-web-fetch-domains). +* Claude Managed Agents sessions that run in a [self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) can now attach [memory stores](https://platform.claude.com/docs/en/managed-agents/memory). The Python, TypeScript, and Go SDK workers download each attached store into the sandbox at its `mount_path` and sync the agent's changes back to the store. See [Use memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores). +* The session viewer in the Claude Console has been redesigned with a timeline minimap, a transcript grouped by model request, and an Inspector panel for session details and cost, raw events, per-tool statistics, mounted resources, and per-thread activity. See [Console observability](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#console-observability). ### August 18, 2026 @@ -380,7 +382,7 @@ description: Updates to the Claude Platform, including the Claude API, client SD * **Anthropic-managed Skills**: Pre-built Skills for working with PowerPoint (.pptx), Excel (.xlsx), Word (.docx), and PDF files * **Custom Skills**: Upload your own Skills through the Skills API (`/v1/skills` endpoints) to package domain expertise and organizational workflows * Skills require the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) to be enabled - * Learn more in [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and [API reference](https://platform.claude.com/docs/en/api/skills/create-skill) + * Learn more in [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and [API reference](https://platform.claude.com/docs/en/api/skills/create) ### October 15, 2025 diff --git a/content/github/anthropic-sdk-python/CHANGELOG.md b/content/github/anthropic-sdk-python/CHANGELOG.md index f8358ed120..194a0507b3 100644 --- a/content/github/anthropic-sdk-python/CHANGELOG.md +++ b/content/github/anthropic-sdk-python/CHANGELOG.md @@ -1,5 +1,32 @@ # Changelog +## 1.0.0 (2026-08-20) + +Full Changelog: [v0.125.0...v1.0.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.125.0...v1.0.0) + +### ⚠ BREAKING CHANGES + +* **client:** upgrade to httpx2 and some minor breaking changes. See MIGRATION.md for details + +### Features + +* **client:** upgrade to httpx2 and some minor breaking changes. See MIGRATION.md for details ([33e2967](https://github.com/anthropics/anthropic-sdk-python/commit/33e296749dda59c3b9af85d9bee37ae241b92a28)) + + +### Bug Fixes + +* **beta:** stop warning about `output_format=` on the parse/stream/tool_runner helpers ([59bf261](https://github.com/anthropics/anthropic-sdk-python/commit/59bf26106d3d66cef54b926aeae4268846bf13f2)) + + +### Chores + +* **streaming:** restore the original event imports in lib/streaming/_types.py ([87e9e01](https://github.com/anthropics/anthropic-sdk-python/commit/87e9e0157c08ad4b9bb4c44081171285499b1aa3)) + + +### Documentation + +* **examples:** use adaptive thinking in thinking examples ([b5870af](https://github.com/anthropics/anthropic-sdk-python/commit/b5870afda154cc12ab15fad5ca6f53a280e09ee3)) + ## 0.125.0 (2026-08-19) Full Changelog: [v0.124.0...v0.125.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.124.0...v0.125.0) diff --git a/content/github/anthropic-sdk-python/MIGRATION.md b/content/github/anthropic-sdk-python/MIGRATION.md new file mode 100644 index 0000000000..bd6d1c2c28 --- /dev/null +++ b/content/github/anthropic-sdk-python/MIGRATION.md @@ -0,0 +1,424 @@ +# Migrating to v1 + +- [Upgrading](#upgrading) +- [Environment requirements](#environment-requirements) +- [The SDK is built on `httpx2`](#the-sdk-is-built-on-httpx2) +- [`.with_raw_response` returns the new response classes](#with_raw_response-returns-the-new-response-classes) +- [Removed: the legacy Text Completions API](#removed-the-legacy-text-completions-api) +- [Removed: deprecated request parameters](#removed-deprecated-request-parameters) +- [Removed: deprecated type aliases and exports](#removed-deprecated-type-aliases-and-exports) +- [Removed: deprecated helper arguments and behaviour](#removed-deprecated-helper-arguments-and-behaviour) +- [Header names are matched case-insensitively](#header-names-are-matched-case-insensitively) +- [bytes header values no longer work](#bytes-header-values-no-longer-work) +- [Bedrock: a region is now required](#bedrock-a-region-is-now-required) +- [Bedrock: unknown streaming events are skipped](#bedrock-unknown-streaming-events-are-skipped) +- [Quick reference](#quick-reference) + +## Upgrading + +```sh +pip install --upgrade "anthropic>=1,<2" +``` + +If you use Claude Code, the fastest route through the rest of this guide is to let it do the edits: +run `/claude-api upgrade python` in your project and review the diff. + +A type checker (`pyright` / `mypy`) will flag almost everything below as an error after upgrading, which makes +it a good checklist even if you don't normally run one. + +## Environment requirements + +The minimum supported Python version has increased from 3.9 to 3.10. + +Nothing else about your environment needs to change. In particular Pydantic v1 and v2 both remain supported. + +## The SDK is built on `httpx2` + +The SDK's HTTP layer moved from `httpx`, which is no longer actively maintained, to [`httpx2`](https://github.com/pydantic/httpx2) - an API-compatible fork maintained by the Pydantic team. + +`httpx2` is a drop-in continuation of `httpx`, with the same classes, same behaviour, and security fixes included. +This only affects code that hands `httpx` objects **to** the SDK or inspects the ones it gets **back**. + +If you only ever pass plain values (`timeout=30.0`, `max_retries=3`, …) there is _likely_ nothing for you to do. +The exception is tooling that hooks `httpx` itself rather than your code — tracing / APM instrumentation and HTTP +mocking libraries. Those keep working but silently stop seeing the SDK's requests until you point them at `httpx2`; +see [Tracing, instrumentation and mocking libraries](#tracing-instrumentation-and-mocking-libraries) below. + +### Custom HTTP clients, transports, timeouts and limits + +Anything you construct from `httpx` and pass to the client must now come from `httpx2`. The simplest edit is +to alias the import; the SDK's own re-exports (`anthropic.Timeout`, `anthropic.DefaultHttpxClient`, +`anthropic.DefaultAsyncHttpxClient`, `anthropic.DefaultAioHttpClient`) already point at `httpx2` and keep working +unchanged. + +```python +# Before +import httpx +from anthropic import Anthropic, DefaultHttpxClient + +client = Anthropic( + timeout=httpx.Timeout(60.0, connect=5.0), + http_client=DefaultHttpxClient( + proxy="http://my.proxy.example", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), +) + +# After +import httpx2 as httpx # or `import httpx2` and rename the references +from anthropic import Anthropic, DefaultHttpxClient + +client = Anthropic( + timeout=httpx.Timeout(60.0, connect=5.0), + http_client=DefaultHttpxClient( + proxy="http://my.proxy.example", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), +) +``` + +Passing an `httpx.Client` / `httpx.AsyncClient` (from the old package) as `http_client=` raises a `TypeError` +at construction time, so this cannot fail silently. + +If you would rather not edit imports — or other code in your application still imports `httpx` and has to +share clients, transports or exception types with the SDK — call `httpx2.alias_httpx()` once at start-up instead. +It makes `import httpx` (and `import httpcore`) resolve to `httpx2` (and `httpcore2`) for the whole process. It has +to run before anything imports `httpx` (it raises a `RuntimeError` otherwise), and it is meant for applications: +a library should never call it on behalf of its users. + +```python +# the very first lines of your entry point +import httpx2 + +httpx2.alias_httpx() + +import httpx # this is now the httpx2 module + +assert httpx.Client is httpx2.Client +``` + +### Response and error objects + +The objects the SDK returns are now `httpx2` types: `APIStatusError.response`, `APIConnectionError.request`, +`response.http_response` / `.headers` / `.url` on raw responses, and the `response=` argument your custom +`http_client` event hooks receive. They have exactly the same attributes as before; only `isinstance` checks and +type annotations that name `httpx.Response` / `httpx.Request` / `httpx.Headers` need to switch to `httpx2`. + +```python +# Before +def log_failure(err: anthropic.APIStatusError) -> None: + response: httpx.Response = err.response + print(response.status_code, response.headers.get("request-id")) + + +# After +def log_failure(err: anthropic.APIStatusError) -> None: + response: httpx2.Response = err.response + print(response.status_code, response.headers.get("request-id")) +``` + +### `aiohttp` support + +`pip install anthropic[aiohttp]` and `http_client=DefaultAioHttpClient()` work as they did before. +However the `aiohttp` extra no longer installs the `httpx_aiohttp` package as it now ships inside the SDK. + +### Tracing, instrumentation and mocking libraries + +Libraries that observe or stub HTTP traffic by patching `httpx` — for example OpenTelemetry's +`HTTPXClientInstrumentor`, Sentry's `httpx` integration, [`respx`](https://lundberg.github.io/respx/), +`pytest-httpx` or `vcrpy` — patch the `httpx` package, which the SDK no longer uses. These libraries can silently +fail, making it difficult to identify failure points. You can holistically fix this by running `httpx2.alias_httpx()` +before anything else imports `httpx`. + +In an application, call it at the top of your entry point as shown above. Under pytest, an early plugin is the +least intrusive way to run it before `respx` / `pytest-httpx` and your test modules are imported: + +```python +# tests/_alias_httpx.py +import httpx2 + +httpx2.alias_httpx() # makes `import httpx` / `import httpcore` resolve to httpx2 / httpcore2 +``` + +```toml +# pyproject.toml +[tool.pytest.ini_options] +addopts = "-p tests._alias_httpx" +pythonpath = ["."] +``` + +### Removed old `httpx` re-exports + +The top-level `anthropic.Transport` and `anthropic.ProxiesTypes` exports were unused aliases of `httpx` types and +are gone. Use `httpx2.BaseTransport`, `httpx2.AsyncBaseTransport` and `httpx2.Proxy` (or a proxy URL string) directly. + +## `.with_raw_response` returns the new response classes + +`.with_raw_response` used to return a `LegacyAPIResponse` class for both the sync and the async client. It now returns +the same `APIResponse` / `AsyncAPIResponse` classes that `.with_streaming_response` already used. Two things change: + +**On the async client, reading the response is now async.** `parse()`, `read()`, `text()` and `json()` are +coroutines on `AsyncAPIResponse`. + +```python +# Before +response = await client.messages.with_raw_response.create(...) +print(response.headers["request-id"]) +message = response.parse() + +# After +response = await client.messages.with_raw_response.create(...) +print(response.headers["request-id"]) # metadata is still plain attribute access +message = await response.parse() +``` + +**`.text` and `.content` became methods.** This applies to the sync client too. The new classes also expose +`json()` and the `iter_bytes()` / `iter_text()` / `iter_lines()` iterators directly, which previously meant +reaching for the underlying `response.http_response`. + +| `LegacyAPIResponse` (before) | `APIResponse` (sync, after) | `AsyncAPIResponse` (async, after) | +| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------- | +| `response.parse()` | `response.parse()` | `await response.parse()` | +| `response.text` | `response.text()` | `await response.text()` | +| `response.content` | `response.read()` | `await response.read()` | +| — (only `response.http_response.json()`) | `response.json()` | `await response.json()` | +| — (only `response.http_response.iter_bytes()` …) | `response.iter_bytes()` / `.iter_text()` / `.iter_lines()` | `async for chunk in response.iter_bytes():` … | +| `.headers`, `.status_code`, `.url`, `.request_id`, `.retries_taken`, `.http_response`, `.elapsed` | unchanged | unchanged | + +## Removed: the legacy Text Completions API + +`client.completions.create()` (the `/v1/complete` endpoint), its types (`Completion`, +`CompletionCreateParams`) and the `anthropic.HUMAN_PROMPT` / `anthropic.AI_PROMPT` prompt constants have been +removed. Every current model is served through the Messages API, which has been the recommended interface since +2023 — see [Using the Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) +if you still have code calling the legacy endpoint. + +## Removed: deprecated request parameters + +These parameters were deprecated by the API and are no longer accepted by the generated methods (passing them is +a `TypeError`, and a type checker flags it). They are also gone from the per-request `params` of +`messages.batches.create()`, where a type checker flags the key but the SDK still forwards it at runtime: + +| Method(s) | Removed parameter | Use instead | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `messages.create()`, `messages.stream()`, `messages.parse()` and their `beta.messages` counterparts, `beta.messages.tool_runner()`, and the per-request `params` of `messages.batches.create()` | `temperature`, `top_p`, `top_k` | Remove them. Current models do not use these sampling parameters; for an older model that still does, pass them through `extra_body` (see below). | +| `beta.messages.create()`, `beta.messages.count_tokens()`, batch request params | `output_format` | `output_config={"format": {...}}` — see [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs). The `output_format=MyModel` argument of the `parse()` / `stream()` / `count_tokens()` / `tool_runner()` **helpers** still takes a type; those helpers no longer accept a schema dict there either. | + +```python +# Before +client.beta.messages.create( + ..., + temperature=0.2, + output_format={"type": "json_schema", "schema": Order.model_json_schema()}, +) + +# After +client.beta.messages.create( + ..., + output_config={"format": {"type": "json_schema", "schema": Order.model_json_schema()}}, +) +# or let the helper build the schema and parse the result: +client.beta.messages.parse(..., output_format=Order) +``` + +The sampling parameters are only gone from the method signatures, not from the API: models that predate the +change still honour them. If you are pinned to such a model and really need a sampling setting, pass it through +`extra_body`, which is merged into the request JSON as-is (for `messages.batches.create()`, put the key straight into +the request's `params` dict): + +```python +# Before +client.messages.create(..., model="claude-sonnet-4-6", temperature=0.2) + +# After +client.messages.create(..., model="claude-sonnet-4-6", extra_body={"temperature": 0.2}) +``` + +The `output_format=` argument of `messages.parse()` / `stream()` / `count_tokens()` and `beta.messages.parse()` / +`stream()` / `tool_runner()` now only accepts a **type**. `messages.stream()`, +`messages.count_tokens()` and `beta.messages.stream()` used to accept a raw schema dict there too and forward it as +`output_config.format`; that form raises a `TypeError` now. Pass schema dicts via `output_config` and keep +`output_format=` for classes — the `DeprecationWarning` that `beta.messages.parse()` / `stream()` / `tool_runner()` used to +emit for the class form is gone, since that is now the only form they take: + +```python +# Before +client.messages.count_tokens(..., output_format={"type": "json_schema", "schema": {...}}) +client.messages.count_tokens(..., output_format=Order) + +# After +client.messages.count_tokens(..., output_config={"format": {"type": "json_schema", "schema": {...}}}) +client.messages.count_tokens(..., output_format=Order) # unchanged +``` + +## Removed: deprecated type aliases and exports + +| Removed | Replacement | +| ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | +| `anthropic.types.beta.BetaBase64PDFBlockParam` | `anthropic.types.beta.BetaRequestDocumentBlockParam` | +| `anthropic.Transport`, `anthropic.ProxiesTypes` (and `anthropic._types.AsyncTransport` / `ProxiesDict`) | `httpx2.BaseTransport`, `httpx2.Proxy` (`httpx2.AsyncBaseTransport`) | +| `anthropic.HUMAN_PROMPT`, `anthropic.AI_PROMPT` | none — see [the Text Completions section](#removed-the-legacy-text-completions-api) | +| `anthropic.lib.tools.agent_toolset.READ_MAX_BYTES` | `anthropic.lib.tools.agent_toolset.DEFAULT_MAX_FILE_BYTES` | + +## Removed: deprecated helper arguments and behaviour + +### `messages.parse(stream=True)` + +`parse()` always performs a non-streaming request; the `stream` argument never worked and has been removed from +`messages.parse()` / `beta.messages.parse()`. Use the streaming helper, which supports the same structured +output types: + +```python +# Before (which would crash) +client.messages.parse(..., output_format=Order, stream=True) + +# After +with client.messages.stream(..., output_format=Order) as stream: + for event in stream: + ... + order = stream.get_final_message().parsed_output +``` + +### `tool_runner(compaction_control=...)` + +Client-side compaction in the tool runner (the `compaction_control=` argument and the `CompactionControl` dict) +has been removed in favour of server-side compaction, which summarises the conversation inside the API instead of +with an extra client round-trip: + +```python +# Before +runner = client.beta.messages.tool_runner( + ..., + compaction_control={"enabled": True, "context_token_threshold": 100_000}, +) + +# After +runner = client.beta.messages.tool_runner( + ..., + betas=["compact-2026-01-12"], + context_management={ + "edits": [ + {"type": "compact_20260112", "trigger": {"type": "input_tokens", "value": 100_000}} + ] + }, +) +``` + +The trigger threshold must be at least 50,000 tokens. See [compaction](https://platform.claude.com/docs/en/build-with-claude/compaction) +for the other options (`pause_after_compaction`, custom `instructions`). + +### Raw bytes as `body=` on `client.get/post/put/patch/delete` + +The low-level request methods accepted `bytes` for `body=` with a deprecation warning. `body=` is now always +JSON-serialised and raw payloads go through `content=` (which also accepts iterators for streaming uploads): + +```python +# Before +client.post("/v1/example", body=b"raw payload", cast_to=httpx.Response) + +# After +client.post("/v1/example", content=b"raw payload", cast_to=httpx2.Response) +``` + +### `isinstance(stream, anthropic.Stream)` for message streams + +`MessageStream` / `AsyncMessageStream` (what `client.messages.stream()` yields) stopped inheriting from +`Stream` / `AsyncStream` many releases ago; a compatibility shim kept `isinstance()` checks passing with a +`DeprecationWarning`. The shim is gone, so such checks now return `False`. Check for the concrete classes instead: + +```python +# Before +from anthropic import Stream + +if isinstance(obj, Stream): + ... + +# After +from anthropic.lib.streaming import MessageStream + +if isinstance(obj, MessageStream): + ... # or `Stream` if you really mean a raw `create(stream=True)` stream +``` + +## Header names are matched case-insensitively + +HTTP header names are case-insensitive, and the SDK now treats them that way everywhere it merges headers. An entry +in `default_headers`, `extra_headers`, `with_options(default_headers=...)` or the `ANTHROPIC_CUSTOM_HEADERS` +environment variable replaces a header of the same name whatever its casing — including the headers the SDK sets +itself — instead of being sent alongside it, and `omit` removes one the same way. + +```python +from anthropic import Anthropic, omit + +client = Anthropic(default_headers={"USER-AGENT": "my-app/1.0"}) +client.messages.create(..., extra_headers={"x-api-key": other_key, "X-Stainless-Timeout": omit}) + +# Before: sent `User-Agent: Anthropic/Python ...` and `USER-AGENT: my-app/1.0`, both API keys, +# and still sent `x-stainless-timeout` +# After: sends `USER-AGENT: my-app/1.0`, only `x-api-key: `, and no `x-stainless-timeout` header +``` + +If you relied on two casings of a name producing two header lines, send one comma-joined value instead. + +## `bytes` header values no longer work + +Previously even though the type annotations did not allow it, you could pass `bytes` as header values, this now raises an error: + +```python +# Before (worked despite the type error) +client.messages.create(..., extra_headers={"X-Signature": signature_bytes}) + +# After +client.messages.create(..., extra_headers={"X-Signature": signature_bytes.decode()}) +``` + +## Bedrock: a region is now required + +`AnthropicBedrock` / `AsyncAnthropicBedrock` used to log a warning and silently fall back to `us-east-1` when no +AWS region could be found. They now raise a `ValueError` at construction time instead. + +The region is resolved from, in order: + +- the `aws_region=` argument +- the `AWS_REGION` / `AWS_DEFAULT_REGION` environment variables +- the configuration of the boto3 session for the given `aws_profile` (previously the profile argument was ignored for region lookup). + +```python +# Before — implicitly us-east-1 if nothing was configured +client = AnthropicBedrock() + +# After +client = AnthropicBedrock(aws_region="us-east-1") # or export AWS_REGION / configure your profile +``` + +## Bedrock: unknown streaming events are skipped + +Previously all streaming events that the Bedrock API returned would be yielded by the SDK, now they are skipped. + +The only known case this affects is an `amazon-bedrock-invocationMetrics` event. + +If you made use of this event please open an issue to let us know. + +## Quick reference + +| You have… | Do this | +| ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| Python 3.9 | upgrade to Python ≥ 3.10 | +| `import httpx` objects passed to / received from the SDK | `import httpx2 as httpx` (or rename); annotations `httpx.X` → `httpx2.X` | +| `respx` / `pytest-httpx` / `vcrpy`, or OpenTelemetry / Sentry `httpx` instrumentation | run `httpx2.alias_httpx()` before anything imports `httpx` | +| `httpx_aiohttp` in your requirements | drop it; `anthropic[aiohttp]` is enough | +| `await client.….with_raw_response.…()` then `.parse()` / `.text` / `.content` | `await response.parse()` / `await response.text()` / `await response.read()` | +| sync `.with_raw_response` then `.text` / `.content` | `response.text()` / `response.read()` | +| `client.completions.create()`, `HUMAN_PROMPT`, `AI_PROMPT` | move to `client.messages.create()` | +| `temperature=` / `top_p=` / `top_k=` on message methods | remove; use `extra_body={"temperature": ...}` if an older model still needs it | +| `output_format={...}` (a schema dict) on any message method or helper | `output_config={"format": {...}}`; helpers keep `output_format=Model` for a class | +| `BetaBase64PDFBlockParam` | `BetaRequestDocumentBlockParam` | +| `anthropic.Transport` / `ProxiesTypes` (or `anthropic._types.AsyncTransport`) | `httpx2.BaseTransport` / `Proxy` / `AsyncBaseTransport` | +| `messages.parse(stream=True)` | `messages.stream(...)` | +| `tool_runner(compaction_control=...)` | server-side `context_management` compaction | +| `client.post(..., body=b"...")` | `content=b"..."` | +| `isinstance(x, Stream)` meant for message streams | `isinstance(x, MessageStream)` | +| two casings of one header name across `default_headers` / `extra_headers` | the later one now replaces the earlier; join the values yourself if you need both | +| `bytes` header values | `.decode()` them — header values must be `str` | +| `AnthropicBedrock()` with no region configured | pass `aws_region=` or set `AWS_REGION` | +| `agent_toolset.READ_MAX_BYTES` | `DEFAULT_MAX_FILE_BYTES` | diff --git a/content/github/anthropic-sdk-python/README.md b/content/github/anthropic-sdk-python/README.md index 44c191cb84..1de7fe261b 100644 --- a/content/github/anthropic-sdk-python/README.md +++ b/content/github/anthropic-sdk-python/README.md @@ -14,6 +14,8 @@ Full documentation is available at **[platform.claude.com/docs/en/api/sdks/pytho pip install anthropic ``` +Upgrading from a `0.x` release? See the [v1 migration guide](MIGRATION.md). + ## Getting started ```python @@ -42,7 +44,7 @@ print(message.content) ## Requirements -Python 3.9+ +Python 3.10+ ## Contributing diff --git a/content/github/anthropic-sdk-python/api.md b/content/github/anthropic-sdk-python/api.md index 15e4b52280..962efa4e50 100644 --- a/content/github/anthropic-sdk-python/api.md +++ b/content/github/anthropic-sdk-python/api.md @@ -708,7 +708,6 @@ from anthropic.types.beta import ( BetaWebSearchToolResultBlockParamContent, BetaWebSearchToolResultError, BetaWebSearchToolResultErrorCode, - BetaBase64PDFBlock, ) ``` diff --git a/content/github/anthropic-sdk-python/src/anthropic/_vendor/httpx_aiohttp/NOTICE.md b/content/github/anthropic-sdk-python/src/anthropic/_vendor/httpx_aiohttp/NOTICE.md new file mode 100644 index 0000000000..5b1635b6f7 --- /dev/null +++ b/content/github/anthropic-sdk-python/src/anthropic/_vendor/httpx_aiohttp/NOTICE.md @@ -0,0 +1,28 @@ +# httpx_aiohttp (vendored) + +This directory contains a vendored copy of **httpx-aiohttp**, which provides the +aiohttp-backed transport behind this SDK's `DefaultAioHttpClient`. + +- **Library:** httpx-aiohttp () +- **Version:** 0.2.0 +- **Copyright:** © 2025, Karen Petrosyan +- **License:** BSD-3-Clause — full text in `LICENSE` in this directory +- **Source:** the `httpx2` variant only — `src/httpx_aiohttp/httpx2/{__init__,client,transport}.py` + from the published `httpx_aiohttp-0.2.0.tar.gz` sdist + (sha256 `d4796b981f04734f1d1db9b4d9326ea16bc994f126460b93b69036262cd4a9d8`). + The upstream package's httpx-1.x variant is not vendored. +- **Integrity:** the copied files are byte-identical to that sdist apart from the + attribution header added at the top of each — + `__init__.py` sha256 `f1925ca049c372847b66b7842408ba7dd603751ccf07a3af97cc19e1f4a72aa5` (305 bytes), + `client.py` sha256 `c7f6cb750732322ef8bbc18ae129d74076e45b0245ebfb09ce2425d2b1461fa8` (1,805 bytes), + `transport.py` sha256 `d87ff5540bd66964700e29c1e69ca0c0cdef9780facf530c17050f22d564f93c` (7,109 bytes). +- **Modifications:** none to the code. Anthropic PBC added a provenance header to + each file in 2026; no other change was made. + +The code is vendored rather than depended on so the `aiohttp` extra resolves from +any package index. It is excluded from this SDK's own linting and type-checking +(see the `_vendor` entries in `pyproject.toml`) so it stays byte-comparable with +upstream. Do not edit these files by hand — re-copy from upstream to update. + +Attribution here records provenance only. Nothing in this SDK is endorsed or +promoted by the authors of httpx-aiohttp. diff --git a/content/github/anthropic-sdk-python/src/anthropic/lib/google_cloud/README.md b/content/github/anthropic-sdk-python/src/anthropic/lib/google_cloud/README.md index 74546b4fc3..e1b5f9fbde 100644 --- a/content/github/anthropic-sdk-python/src/anthropic/lib/google_cloud/README.md +++ b/content/github/anthropic-sdk-python/src/anthropic/lib/google_cloud/README.md @@ -4,7 +4,7 @@ Batches, Files, Admin, and every beta surface — served through Google Cloud. You authenticate with Google Cloud IAM credentials, billing flows through Google Cloud Marketplace, and model strings are the same first-party identifiers used -with the `Anthropic` client. The deprecated Completions endpoint is not exposed. +with the `Anthropic` client. This client never reads `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, or `ANTHROPIC_BASE_URL`; it authenticates with Google credentials only. diff --git a/content/github/claude-code-action/docs/configuration.md b/content/github/claude-code-action/docs/configuration.md index 5c62d46d03..989f2af7d3 100644 --- a/content/github/claude-code-action/docs/configuration.md +++ b/content/github/claude-code-action/docs/configuration.md @@ -275,6 +275,29 @@ For provider-specific models: # ... other inputs ``` +### 1M context models through an API gateway + +When `ANTHROPIC_BASE_URL` points to an Anthropic-compatible API gateway, +Claude Code may not be able to verify that the gateway supports a model's native +1M context window and can budget the session at 200K instead. Append the +`[1m]` selector to explicitly use the 1M context window for supported models, +including Claude Opus 5 and Claude Sonnet 5: + +```yaml +- uses: anthropics/claude-code-action@v1 + with: + claude_args: | + --model "claude-opus-5[1m]" + # ... other inputs +``` + +Use the same selector when setting a model through `ANTHROPIC_MODEL` or another +Claude Code model environment variable. The selector is resolved by Claude Code +before requests are sent to the provider. The action's sanitized result output +includes each model's resolved +`contextWindow` and `maxOutputTokens` under `modelUsage`, so these limits are +visible without enabling `show_full_output`. + ## Claude Code Settings You can provide Claude Code settings to customize behavior such as model selection, environment variables, permissions, and hooks. Settings can be provided either as a JSON string or a path to a settings file. diff --git a/content/github/claude-plugins-official/.claude-plugin/marketplace.json b/content/github/claude-plugins-official/.claude-plugin/marketplace.json index 4ccefd77fd..47a522a8ff 100644 --- a/content/github/claude-plugins-official/.claude-plugin/marketplace.json +++ b/content/github/claude-plugins-official/.claude-plugin/marketplace.json @@ -46,7 +46,7 @@ "url": "https://github.com/adobe/skills.git", "path": "plugins/creative-cloud/adobe-for-creativity", "ref": "main", - "sha": "cbaeec4138c6006fcdb499c94f545c2a4fa8f568" + "sha": "1307e2c03b9cd20c49872be8cbdfda7ee9aa8c7e" }, "homepage": "https://github.com/adobe/skills/tree/main/plugins/creative-cloud/adobe-for-creativity" }, @@ -370,7 +370,7 @@ "url": "https://github.com/auth0/agent-skills.git", "path": "plugins/auth0", "ref": "main", - "sha": "abab92beb4b7c703313fe2309567b018474e48a0" + "sha": "09a0d450c1e52de3bf0b50502a80e3018653cc11" }, "homepage": "https://auth0.com" }, @@ -386,7 +386,7 @@ "url": "https://github.com/aws/agent-toolkit-for-aws.git", "path": "plugins/aws-agents", "ref": "main", - "sha": "f986ec60a09a9fbcc31e950ecb6ec3d07d7fa9ec" + "sha": "4b8f1820ef4efa55bf3941191beec031f2681ae4" }, "homepage": "https://github.com/aws/agent-toolkit-for-aws" }, @@ -528,7 +528,7 @@ "source": { "source": "url", "url": "https://github.com/microsoft/azure-sql-database-container.git", - "sha": "eca81cf0974b714fdff30e8f665e746a03304758" + "sha": "72b6d5f45ea2a59c538e31a23941c7f5ee7ee9ba" }, "homepage": "https://github.com/microsoft/azure-sql-database-container" }, @@ -555,7 +555,7 @@ "url": "https://github.com/Bigdata-com/bigdata-plugins-marketplace.git", "path": "plugins/bigdata-com", "ref": "main", - "sha": "74ec89c998c78c04c3f4c2a3d1396c5e5935847a" + "sha": "2a52a001366227e205cfa7565d78e8198dc42fa8" }, "homepage": "https://docs.bigdata.com" }, @@ -569,7 +569,7 @@ "source": { "source": "url", "url": "https://github.com/gemini-cli-extensions/bigquery-data-analytics.git", - "sha": "bc689647122cb5cc61995295e01d9eaee2dd3dbe" + "sha": "5450d45e46cf5b4abc89cf2817b63f5f01c586e4" }, "homepage": "https://github.com/gemini-cli-extensions/bigquery-data-analytics" }, @@ -689,7 +689,7 @@ "url": "https://github.com/carta/plugins.git", "path": "plugins/carta-cap-table", "ref": "main", - "sha": "a26da2682642a04a5ddb0bffd89c596bb931230b" + "sha": "7be35157286a6654783f82c701e46d06c40dcfb1" }, "homepage": "https://carta.com" }, @@ -705,7 +705,7 @@ "url": "https://github.com/carta/plugins.git", "path": "plugins/carta-crm", "ref": "main", - "sha": "a9f9af826bcc6319a50cd776d9410da64eb6ae90" + "sha": "3aa656ea870e1d8d7f73d0418c49043cab9df01a" }, "homepage": "https://carta.com" }, @@ -721,7 +721,7 @@ "url": "https://github.com/carta/plugins.git", "path": "plugins/carta-investors", "ref": "main", - "sha": "0f0e2f5a07d5f80a0272d6b3232d56d6757ce447" + "sha": "7be35157286a6654783f82c701e46d06c40dcfb1" }, "homepage": "https://carta.com" }, @@ -1237,7 +1237,7 @@ "url": "https://github.com/awslabs/agent-plugins.git", "path": "plugins/databases-on-aws", "ref": "main", - "sha": "bc78579b3d65d590de8a3f3abef4b23e72ff9e59" + "sha": "e244b4036b717959ee8d5114aa2364822cfb78b0" }, "homepage": "https://github.com/awslabs/agent-plugins" }, @@ -1309,7 +1309,7 @@ "source": { "source": "url", "url": "https://github.com/datarobot-oss/datarobot-agent-skills.git", - "sha": "a37519e9abc02a0c1418f22ea381e7c24e7e94f8" + "sha": "b901f1c491c1742ebf9282820cd2d5c00d7db2bf" }, "homepage": "https://datarobot.com" }, @@ -1468,7 +1468,7 @@ "url": "https://github.com/expo/skills.git", "path": "plugins/expo", "ref": "main", - "sha": "d1c68a21ec6a9249cfd2e3885364bb47b243adb2" + "sha": "472d040092900dc8bbf84dc7efb0c90abff77a0d" }, "homepage": "https://github.com/expo/skills/blob/main/plugins/expo/README.md" }, @@ -1516,7 +1516,7 @@ "source": { "source": "url", "url": "https://github.com/figma/mcp-server-guide.git", - "sha": "72fcf1f4b170bcaa78fa8bef2f27cce15f4d58f4" + "sha": "7f6562c4900fafb46e5e8fd3cc8ced954779bab3" }, "homepage": "https://github.com/figma/mcp-server-guide" }, @@ -1629,7 +1629,7 @@ "source": { "source": "url", "url": "https://github.com/gemini-cli-extensions/google-cloud-storage.git", - "sha": "7b4a44e40e65f9926f5e88fcee912432e5a791d4" + "sha": "b1f252b5d60d917b8083284d3a1523364f61c2f6" }, "homepage": "https://cloud.google.com/storage" }, @@ -1760,7 +1760,7 @@ "source": { "source": "url", "url": "https://github.com/hostinger/claude-plugin.git", - "sha": "70a43bc67ffde48062bf51db1e1bbaec26e65881" + "sha": "569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff" }, "homepage": "https://www.hostinger.com" }, @@ -1799,7 +1799,7 @@ "source": { "source": "url", "url": "https://github.com/heygen-com/hyperframes.git", - "sha": "3e4b08cdc18642d468d53f34c2fb64ab437807ae" + "sha": "42b94fd5dbab4a278a9094a26836b8ceaf96b27f" }, "homepage": "https://hyperframes.heygen.com" }, @@ -1869,7 +1869,7 @@ "source": { "source": "url", "url": "https://github.com/jfrog/claude-plugin.git", - "sha": "b15bdaadc2e9d410098e6658f20c168b56689ac6" + "sha": "7ef5a992792991c7aff5502cda63f2ed48c7eb4e" }, "homepage": "https://jfrog.com" }, @@ -2159,7 +2159,7 @@ "source": { "source": "url", "url": "https://github.com/mattpocock/skills.git", - "sha": "885e2ca4d842d139e9aef4e48d366c63cb1b8013" + "sha": "0ab1b63a410a03d3627979a109c8695de27af954" }, "homepage": "https://github.com/mattpocock/skills" }, @@ -2584,7 +2584,7 @@ "source": { "source": "url", "url": "https://github.com/paypal/AI-Toolkit.git", - "sha": "a9c0586fe495b1e5d18fc6660c87dccb984eb207" + "sha": "310b4962f0e5b3d09ff1c909d96ad5e226703ecb" }, "homepage": "https://developer.paypal.com/" }, @@ -2958,7 +2958,7 @@ "source": { "source": "url", "url": "https://github.com/resend/resend-skills.git", - "sha": "1187c26406662d8f4f6d68f24dc47146381bdfae" + "sha": "d63dcfdc07910a91c0c21555d0841b5d5518065a" }, "homepage": "https://resend.com" }, @@ -3133,7 +3133,7 @@ "url": "https://github.com/SAP/open-ux-tools.git", "path": "packages/fiori-mcp-server", "ref": "main", - "sha": "aa5846b65167576f3cf17ed22c488a4377d7859d" + "sha": "232bb1b8a4a9eef73a871a08b8d67e0c92f26766" }, "homepage": "https://github.com/SAP/open-ux-tools/tree/main/packages/fiori-mcp-server" }, @@ -3457,7 +3457,7 @@ "url": "https://github.com/stripe/ai.git", "path": "providers/claude/plugin", "ref": "main", - "sha": "96cfe6bf30e661f674950cd8dbd47beaeadc5b6e" + "sha": "e8f9aee6f9a34a633243e632e650401a76c36c41" }, "homepage": "https://github.com/stripe/ai/tree/main/providers/claude/plugin" }, @@ -3493,7 +3493,7 @@ "source": { "source": "url", "url": "https://github.com/superdesigndev/superdesign-skill.git", - "sha": "fee6e17b43cf74022172106a8a65865a11c1de92" + "sha": "16c99dbc1502a7bc1e490d2f8704194b2f6befc5" }, "homepage": "https://superdesign.dev" }, @@ -3568,7 +3568,7 @@ "source": { "source": "url", "url": "https://github.com/JetBrains/teamcity-cli.git", - "sha": "d8eff9844666f3deb75f172aa303aa5903e4b9d3" + "sha": "80d4c8b3ae705299be4ba5081713d04573324683" }, "homepage": "https://www.jetbrains.com/teamcity/" }, @@ -3743,7 +3743,7 @@ "url": "https://github.com/val-town/plugins.git", "path": "plugin", "ref": "main", - "sha": "0afe7b73671e39021b945f1f154bd9059bc7f39a" + "sha": "2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b" }, "homepage": "https://val.town" }, @@ -3796,7 +3796,7 @@ "source": { "source": "url", "url": "https://github.com/explorium-ai/vibeprospecting-plugin.git", - "sha": "804bab5e0500d7a0f8613a83a3cfe5b79e6a31c3" + "sha": "9b4067473305dbba80be0fa9a492be39b96f455e" }, "homepage": "https://www.vibeprospecting.ai/product/claude-plugin" }, @@ -3956,7 +3956,7 @@ "source": { "source": "url", "url": "https://github.com/langfuse/skills.git", - "sha": "0f9a20a874f6ae847eddff2b81ab48cadf9eedc9" + "sha": "ff47830ae782fe422c565361b0742789e5dc9f62" }, "homepage": "https://langfuse.com" }, diff --git a/content/github/cwc-workshops/ship-your-first-managed-agent/README.md b/content/github/cwc-workshops/ship-your-first-managed-agent/README.md index 15473750ac..12bf745149 100644 --- a/content/github/cwc-workshops/ship-your-first-managed-agent/README.md +++ b/content/github/cwc-workshops/ship-your-first-managed-agent/README.md @@ -36,6 +36,8 @@ source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt cp .env.example .env # then put your ANTHROPIC_API_KEY in .env + +python data/generate_log.py # writes data/app.log (70k lines, not in git) streamlit run app.py ``` @@ -50,7 +52,7 @@ in and the panel comes online one step at a time. | # | Function | API call | Lines | |---|---|---|---| -| 1 | `setup_agent()` | `client.beta.agents.create` | 3 | +| 1 | `setup_agent()` | `client.beta.skills.create` + `agents.create` | 7 | | 2 | `setup_environment()` | `client.beta.environments.create` | 4 | | 3 | `upload_log()` | `client.beta.files.upload` | 2 | | 4 | `start_session()` | `client.beta.sessions.create` | 5 | @@ -58,8 +60,8 @@ in and the panel comes online one step at a time. | 6 | `handle_tool()` | runs locally — reads `data/*.json` | 7 | | 7 | `delete_session()` | `client.beta.sessions.delete` | 1 | -That's ~34 lines total. Everything else — the system prompt, tool schemas, -the chat UI, the session picker — is provided in `provided.py`. +That's ~38 lines total. Everything else — the system prompt, tool schemas, +the runbook skill, the chat UI, the session picker — is provided. Stuck? `agent_complete.py` has the finished versions. @@ -85,6 +87,9 @@ The agent has to correlate all four to name the root cause. It does. resources, in the order the [quickstart](https://platform.claude.com/docs/en/managed-agents/quickstart) introduces them +- **Skills** — `incident-triage-runbook/SKILL.md` packages this team's runbook; + uploaded and attached inside `setup_agent()` so every session follows the + same conventions - **Sandboxed code execution** — the agent writes and runs Python in a managed container you never provision - **Custom tools** — the agent in the cloud calls functions on your laptop @@ -104,6 +109,7 @@ e2e.py ← headless test of the full path app.py ← incident overview pages/ ← Metrics, Logs, Deploys +incident-triage-runbook/ ← the team's runbook skill (SKILL.md) data/ ← log + metrics + deploys + diff fixtures ui.py, assets/ ← styling ``` diff --git a/content/github/cwc-workshops/ship-your-first-managed-agent/incident-triage-runbook/SKILL.md b/content/github/cwc-workshops/ship-your-first-managed-agent/incident-triage-runbook/SKILL.md new file mode 100644 index 0000000000..d582f91b93 --- /dev/null +++ b/content/github/cwc-workshops/ship-your-first-managed-agent/incident-triage-runbook/SKILL.md @@ -0,0 +1,36 @@ +--- +name: incident-triage-runbook +description: The SRE team's runbook for triaging production latency and error-rate incidents. Use this whenever investigating an incident, a latency spike, elevated error rates, or when asked "what caused X" about a production service. +--- + +# Incident triage + +If you change the order below, say why in #sre. + +## Order of operations + +1. Pull deploys for the last 6h. Don't open the log first. +2. Line the deploy timestamps up against `p99_latency_ms` / `error_rate` for the paged service. State the gap ("deploy 14:31, p99 moves 14:33"). +3. If a deploy lines up: pull the diff, read it. Check for the stuff in the next section. +4. Then grep the log to confirm. Don't grep to fish. +5. No deploy lines up → check `db_pool_utilization` across checkout/cart/auth/inventory, then upstream deps. + +## Things that have burned us + +In rough order of how often: + +- per-row query where there used to be a batch +- cache decorator removed "temporarily" +- new query, no index +- blocking call in an async handler +- retry loop with no backoff + +## Write-up + +One line at the bottom: + +> **Root cause:** `` — one sentence on the mechanism. + +If it wasn't a deploy, put the component or upstream dep where the sha goes (`db-primary`, `stripe-api`, whatever). Still one sentence. + +Everything above that line is evidence. Keep it short; the long version goes in the postmortem doc. diff --git a/content/mcp/community/interest-groups/auth.md b/content/mcp/community/interest-groups/auth.md index 54e3f82bc7..83b8b06b6c 100644 --- a/content/mcp/community/interest-groups/auth.md +++ b/content/mcp/community/interest-groups/auth.md @@ -12,37 +12,39 @@ ## Mission Statement -The Authorization Interest Group provides a venue for MCP implementers, identity-provider vendors, and security practitioners to surface real-world authorization challenges encountered when deploying MCP clients and servers. The group gathers use cases, documents gaps in the current OAuth 2.1–based authorization specification, and incubates validated problems until they are scoped well enough to propose a focused Working Group via the standard [group-creation process](/community/working-interest-groups#creating-a-working-group) to drive the corresponding [SEPs](/community/sep-guidelines). +The Authorization Interest Group is the single chartered venue for MCP authorization work. It brings MCP implementers, identity-provider vendors, and security practitioners together to surface real-world authorization problems, decide whether they are worth solving and whether they belong in MCP, and give authors a reliable place to present [SEPs](/community/sep-guidelines), [ext-auth](https://github.com/modelcontextprotocol/ext-auth) drafts, prototypes, and deployment results for cross-topic feedback. The charter defines the scope; discussion and rough consensus happen in one channel and one recurring call, and the work products are drafts and demos rather than new standing groups. ## Scope ### In Scope * **Deployment experience reports**: how implementers have integrated the current authorization spec (OAuth 2.1, [RFC 9728](https://www.rfc-editor.org/rfc/rfc9728) Protected Resource Metadata, [RFC 7591](https://www.rfc-editor.org/rfc/rfc7591) Dynamic Client Registration, Client ID Metadata Documents) with real authorization servers, and where it falls short +* **Extension interoperability reports**: results of pairing independent implementations of the [ext-auth](https://github.com/modelcontextprotocol/ext-auth) extensions end to end (for example IdP, client, and authorization server through the [Enterprise-Managed Authorization](/extensions/auth/enterprise-managed-authorization) ID-JAG exchange), including IdP capability gaps, workarounds, and conformance scenario input * **Enterprise identity integration**: requirements and friction points when connecting MCP servers to enterprise IdPs (Okta, Entra ID, Ping, Keycloak, etc.), including SSO, tenant isolation, and admin consent flows * **Delegated and agentic access**: use cases for on-behalf-of token exchange, downstream resource access, audience restriction, and consent when an MCP client acts through chains of agents or tools -* **Scope and permission granularity**: whether and how MCP servers should advertise fine-grained scopes (per-tool, per-resource) and how clients should request and present them +* **Scope and permission granularity**: whether and how MCP servers should advertise fine-grained scopes (per-tool, per-resource) and how clients should request and present them, and authorization granularity beyond scope strings (Rich Authorization Requests, structured denials, remediation hints) * **Credentials for non-HTTP transports**: patterns for stdio, WebSocket, and future transports where the HTTP authorization spec does not directly apply * **Client identity and registration**: operator experience with Dynamic Client Registration, Client ID Metadata Documents, software statements, and pre-registered clients * **Threat modelling input**: cataloguing authorization-related attack surfaces (token confusion, confused-deputy, audience mismatch, redirect handling) to inform Security Best Practices documentation -* **Proposing Working Groups**: once a problem is validated and scoped, the IG submits a Working Group creation proposal via the standard `#wg-ig-group-creation` process; approval remains with community moderators and core maintainers -* **Problem statements and requirements**: use-case catalogues and recommendations published to GitHub Discussions for consumption by SEP authors and Working Groups +* **SEP and draft feedback**: authorization-related SEPs, ext-auth drafts, reference implementations, and demos are presented on the call and in `#auth-ig` threads for feedback before and during the [SEP process](/community/sep-guidelines); the IG's rough consensus is recorded in meeting notes for sponsors and Core Maintainers to draw on +* **Problem statements and requirements**: use-case catalogues and recommendations shared in `#auth-ig` threads and on SEP pull requests for consumption by SEP authors ### Out of Scope +* **Accepting SEPs or extensions**: the IG gives feedback and signals support; sponsorship and acceptance follow the [SEP guidelines](/community/sep-guidelines) and remain with Maintainers and Core Maintainers * **Authentication of end users to MCP clients**: how a host application authenticates its own users is a host concern, not a protocol concern * **Transport security (TLS, mTLS, certificate handling)**: belongs to the Transports WG * **Server identity, provenance, and trust signalling**: belongs to the Server Card / Registry efforts -* **End-user product configuration walk-throughs**: the IG discusses patterns, not step-by-step setup for individual IdP products. Vendor-reported constraints on what an authorization server can or cannot implement *are* in scope as deployment experience +* **End-user product configuration walk-throughs**: the IG discusses patterns, not step-by-step setup for individual IdP products. Vendor-reported constraints on what an authorization server or IdP can or cannot implement *are* in scope as deployment experience * **Competitively sensitive or non-public business information**, per the [MCP Antitrust Policy](/community/antitrust) ### Related Groups -* **[Enterprise-Managed Authorization IG](/community/interest-groups/enterprise-managed-authorization)**: coordinates IdP, client, and server interoperability testing for the EMA extension produced by the Profiles WG; spec-change requests surfaced there are routed back to this group +* **[Security IG](/community/interest-groups/security)**: token-audience confusion, issuer validation, and account-linking risks sit at the boundary between the two groups * **Transports WG**: authorization is currently specified at the HTTP transport level; changes to transports affect where credentials are carried * **Agents WG**: delegated/on-behalf-of access and consent for multi-agent chains overlap heavily with agentic use cases * **[Server Card WG](/community/working-groups/server-card) / [Registry](/community/working-groups/registry)**: client and server identity, discovery metadata, and trust establishment intersect with how authorization servers and resource servers are located and verified -* **SDK Maintainers**: SDKs ship the auth client implementations; IG findings should inform cross-SDK auth ergonomics +* **SDK Maintainers**: SDKs ship the auth client implementations; IG findings should inform cross-SDK auth ergonomics and defaults ## Leadership @@ -54,37 +56,62 @@ The Authorization Interest Group provides a venue for MCP implementers, identity ## Membership -Open to anyone; no formal membership or approval step is required to join the channel, attend calls, or contribute. +Open to anyone; no formal membership or approval step is required to join the channel, attend calls, or contribute. The group particularly seeks identity-provider vendors, MCP client and server implementers shipping authorization support, and operators integrating MCP with enterprise IdPs. -Join the `#auth-ig` channel on the [MCP Contributors Discord](/community/communication#discord) or open a thread in the Authorization category of [GitHub Discussions](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions). If your topic clearly matches one of the Working Groups in the table below, you can post directly in that WG's channel. Calls are open and attendance is optional — async participation via Discord and GitHub is equally valued. +Join the `#auth-ig` channel on the [MCP Contributors Discord](/community/communication#discord) and start or join a thread for your topic. Calls are open and attendance is optional — async participation in Discord threads is equally valued. ## Operations -| Meeting | Frequency | Duration | Purpose | -| --------------- | ------------- | -------- | ---------------------------------------------------------------------------- | -| Discussion Call | Every 2 weeks | 45 min | Use-case sharing, problem triage, WG proposal decisions, implementer reports | +| Meeting | Frequency | Duration | Purpose | +| ------------ | ------------- | -------- | --------------------------------------------------------------------------------- | +| Auth IG Call | Every 2 weeks | 45 min | Agenda-driven: problem pitches, SEP and draft progress, demos, deployment reports | Discord: [#auth-ig](https://discord.com/channels/1358869848138059966/1360835991749001368) -### Working Group Incubation +### One channel, threads per topic -A topic graduates to a Working Group proposal when it has a written problem statement in GitHub Discussions and rough consensus on a bi-weekly call (recorded in published notes). A facilitator then files the standard WG creation template in `#wg-ig-group-creation`, citing that discussion. The IG's role ends at the proposal; approval remains with community moderators and core maintainers. +All authorization discussion happens in `#auth-ig`, with one Discord thread per topic (for example a SEP number, a draft name, or a deployment pairing). There are no per-topic channels. Meeting agendas and notes live in the channel's per-call agenda thread, with a link cross-posted to [GitHub Discussions](https://github.com/modelcontextprotocol/modelcontextprotocol/discussions) as the [group governance rules](/community/working-interest-groups) require. + +### Agenda-driven calls + +The call keeps a fixed biweekly slot, but each meeting is built from its agenda: + +1. A facilitator opens an agenda thread in `#auth-ig` ahead of each call. Anyone may request a slot by replying with the topic, the ask (feedback, decision, awareness), and the time needed. +2. Facilitators agree the agenda and hand out time slots before the call. +3. If the agenda is thin, the call is cancelled in the thread and the slot is kept for next time. + +Typical slots are a problem pitch, a progress update on a SEP or ext-auth draft, a demo of a prototype or reference implementation, or a deployment or interoperability report from implementers of a shipped extension. + +### From problem to SEP + +Two standing questions are asked of every problem pitch before anyone invests in a SEP: + +* **Is this a problem worth solving?** Is there real deployment demand, and is the gap in the protocol rather than in one product? +* **Does it belong here?** Is the right home the core specification, an official extension in ext-auth, an unofficial extension, or an upstream standards body? + +When the answer to both is yes, the proposer drafts a SEP or ext-auth pull request through the normal [SEP process](/community/sep-guidelines), finds a sponsor, and returns to the call to present progress and demos as the draft matures. The IG does not charter a sub-group, channel, or meeting series per topic. Contributors who already meet separately on a topic are welcome to keep doing so, and bring outcomes back to the call as agenda slots. A separate [Working Group](/community/working-interest-groups) can still be proposed through the standard process when a deliverable genuinely needs its own decision rights, but that is the exception rather than the default path. ## Deliverables & Success Metrics -The IG incubates problems until they are well-scoped, then proposes focused Working Groups to drive specific SEPs. Each spawned WG maintains its own charter; this list is a directory, not a substitute. The IG stewards [modelcontextprotocol/ext-auth](https://github.com/modelcontextprotocol/ext-auth), where individual WGs land authorization extension specifications via PR. +The IG's outputs are the drafts and demos that pass through it: authorization SEPs and ext-auth specifications with recorded IG feedback, reference implementations and conformance scenarios, interoperability and deployment reports, and published meeting notes. The IG stewards [modelcontextprotocol/ext-auth](https://github.com/modelcontextprotocol/ext-auth), where authorization extension specifications land via PR. Success looks like authorization proposals reaching Core Maintainer review with cross-topic feedback already incorporated, and shipped extensions accumulating independent interoperable implementations. + +### Consolidated channels + +The following Discord channels previously hosted authorization sub-groups. They are archived (read-only) as of this re-charter and their topics continue as `#auth-ig` threads and agenda slots. The [Enterprise-Managed Authorization IG](/community/interest-groups/enterprise-managed-authorization) is folded into this group on the same basis: EMA implementers bring interoperability and deployment progress to the call as presentation slots rather than to a standing separate group. -| Working Group | Discord | Focus | Status | Charter | -| -------------------------- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------- | -| Client Registration | `#auth-wg-client-registration` | Dynamic Client Registration, Client ID Metadata Documents, software statements, and pre-registered client workflows | Completed | — | -| Mix-up Protection | `#auth-wg-mixup-protection` | Mitigating OAuth authorization-server mix-up and token-audience confusion attacks | Completed | — | -| Profiles | `#auth-wg-profiles` | Extension specifications for additional grant types and token-binding mechanisms (Client Credentials, Enterprise-Managed Authorization, DPoP, Workload Identity Federation) | Completed | — | -| Tool Scopes | `#auth-wg-tool-scopes` | Per-tool OAuth scope advertisement, step-up authorization / scope challenge, and client-side scope accumulation — mechanics within the OAuth scope-string model | Active | Pending | -| Fine-Grained Authorization | `#auth-wg-fine-grained-authz` | Authorization granularity beyond scope strings — Rich Authorization Requests ([RFC 9396](https://www.rfc-editor.org/rfc/rfc9396)), remediation hints, and multi-credential handling | Active | Pending | -| Improve DevX | `#auth-wg-improve-devx` | Best-practices guidance and tutorials for building secure MCP clients and servers, beyond the normative spec | Completed | — | +| Former channel | Topic | State at consolidation | Continues as | +| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------- | --------------------------------------------------------- | +| `#auth-wg-client-registration` | Dynamic Client Registration, Client ID Metadata Documents, software statements, pre-registration | Completed | `#auth-ig` threads as needed | +| `#auth-wg-mixup-protection` | Authorization-server mix-up and token-audience confusion mitigations | Completed | `#auth-ig` threads as needed | +| `#auth-wg-profiles` | Client Credentials, Enterprise-Managed Authorization, DPoP, Workload Identity Federation extensions | Completed | `#auth-ig` DPoP and Workload Identity Federation threads | +| `#auth-wg-tool-scopes` | Per-tool scope advertisement, step-up authorization, client-side scope accumulation | Active | `#auth-ig` thread | +| `#auth-wg-fine-grained-authz` | Rich Authorization Requests ([RFC 9396](https://www.rfc-editor.org/rfc/rfc9396)), structured denials, remediation hints | Active | `#auth-ig` SEP-2643 / fine-grained authorization thread | +| `#auth-wg-improve-devx` | Best-practices guidance and tutorials beyond the normative spec | Dormant | `#auth-ig` threads as needed | +| `#enterprise-managed-auth-ig` | EMA extension interoperability (IdP, client, authorization server) | Active | `#auth-ig` EMA interop thread and deployment-report slots | ## Changelog -| Date | Change | -| ---------- | --------------- | -| 2026-06-02 | Initial charter | +| Date | Change | +| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| 2026-08-17 | Re-charter: single venue and channel for authorization work; agenda-driven calls; SEP feedback in scope; `#auth-wg-*` channels and the Enterprise-Managed Authorization IG folded in | +| 2026-06-02 | Initial charter | diff --git a/content/mcp/community/interest-groups/enterprise-managed-authorization.md b/content/mcp/community/interest-groups/enterprise-managed-authorization.md index f2484efba5..b112c33f58 100644 --- a/content/mcp/community/interest-groups/enterprise-managed-authorization.md +++ b/content/mcp/community/interest-groups/enterprise-managed-authorization.md @@ -6,6 +6,14 @@ > Charter for the MCP Enterprise-Managed Authorization Interest Group. + + As of 2026-08-17 this Interest Group is folded into the [Authorization + IG](/community/interest-groups/auth). EMA interoperability and deployment + progress is presented as agenda slots on the Auth IG call, discussion + continues in `#auth-ig` threads, and `#enterprise-managed-auth-ig` is + archived. This page is kept for reference. + + ## Group Type **Interest Group** @@ -64,6 +72,7 @@ Discord: [#enterprise-managed-auth-ig](https://discord.com/channels/135886984813 ## Changelog -| Date | Change | -| ---------- | --------------- | -| 2026-06-16 | Initial charter | +| Date | Change | +| ---------- | -------------------------------------------------- | +| 2026-08-17 | Folded into the Authorization IG; channel archived | +| 2026-06-16 | Initial charter | diff --git a/content/mcp/community/working-interest-groups.md b/content/mcp/community/working-interest-groups.md index 6be55905db..8b72940764 100644 --- a/content/mcp/community/working-interest-groups.md +++ b/content/mcp/community/working-interest-groups.md @@ -232,15 +232,14 @@ The quarterly updates are provided as a document posted in the [GitHub Discussio **Working Group Formation:** * There must be a widely acknowledged concern requiring coordination -* PR for creation of WG into `docs/community/working-groups//overview.mdx`, gated by CODEOWNERS requiring approval by Maintainers -* PR for charter into `docs/community/working-groups/.mdx`, gated by CODEOWNERS requiring approval from Core Maintainers +* PR adding the WG charter as `docs/community/working-groups/.mdx`, written from the [Group Charter Template](/community/charter-template) and including the corresponding navigation entry in `docs/docs.json`, gated by CODEOWNERS requiring approval from Core Maintainers * Initial member list approved by WG Lead **Interest Group Formation:** * Fill out the creation template in the `#wg-ig-group-creation` channel on [Discord](https://discord.gg/6CSzBmMkjX) * A Core Maintainer reviews the proposal; the IG and its Facilitator(s) must be sponsored by at least two Core Maintainers or one Lead Maintainer -* Once sponsored, the Facilitator(s) organize the IG and create a charter +* Once sponsored, the Facilitator(s) organize the IG and create a charter via a PR adding `docs/community/interest-groups/.mdx`, written from the same template and including the corresponding navigation entry in `docs/docs.json`, gated by CODEOWNERS requiring approval from Core Maintainers **Retirement:** diff --git a/content/mcp/specification/2026-07-28/basic/patterns/subscriptions.md b/content/mcp/specification/2026-07-28/basic/patterns/subscriptions.md index 2bf54d391f..b127a86c72 100644 --- a/content/mcp/specification/2026-07-28/basic/patterns/subscriptions.md +++ b/content/mcp/specification/2026-07-28/basic/patterns/subscriptions.md @@ -121,8 +121,8 @@ A subscription ends when: * The **client** cancels it — close the SSE stream (HTTP) or send `notifications/cancelled` referencing the `subscriptions/listen` request ID (stdio). -* The **server** tears it down (e.g., during shutdown) — it **SHOULD** send the - empty `subscriptions/listen` response to signal a graceful end (see +* The **server** tears it down (e.g., during shutdown) — it **SHOULD** send a + successful `subscriptions/listen` response to signal a graceful end (see [Graceful Closure](#graceful-closure)), then close the stream. * The underlying transport closes (HTTP timeout, TCP disconnect, stdio process exit). @@ -131,10 +131,11 @@ A subscription ends when: When the server ends a subscription on its own initiative (for example, during shutdown), it **SHOULD** respond to the original `subscriptions/listen` request -with an empty result before closing the stream. This is the JSON-RPC response to -the long-lived request, correlated by its `id`, and signals that the subscription -ended gracefully — as opposed to an abrupt transport drop, which carries no -response. +with a completion result before closing the stream. The result carries no +method-specific data beyond the standard result fields and subscription +metadata. This is the JSON-RPC response to the long-lived request, correlated by +its `id`, and signals that the subscription ended gracefully — as opposed to an +abrupt transport drop, which carries no response. ```json theme={null} { diff --git a/content/mcp/specification/draft/basic/patterns/subscriptions.md b/content/mcp/specification/draft/basic/patterns/subscriptions.md index d7dbc5851f..01c39ac85d 100644 --- a/content/mcp/specification/draft/basic/patterns/subscriptions.md +++ b/content/mcp/specification/draft/basic/patterns/subscriptions.md @@ -121,8 +121,8 @@ A subscription ends when: * The **client** cancels it — close the SSE stream (HTTP) or send `notifications/cancelled` referencing the `subscriptions/listen` request ID (stdio). -* The **server** tears it down (e.g., during shutdown) — it **SHOULD** send the - empty `subscriptions/listen` response to signal a graceful end (see +* The **server** tears it down (e.g., during shutdown) — it **SHOULD** send a + successful `subscriptions/listen` response to signal a graceful end (see [Graceful Closure](#graceful-closure)), then close the stream. * The underlying transport closes (HTTP timeout, TCP disconnect, stdio process exit). @@ -131,10 +131,11 @@ A subscription ends when: When the server ends a subscription on its own initiative (for example, during shutdown), it **SHOULD** respond to the original `subscriptions/listen` request -with an empty result before closing the stream. This is the JSON-RPC response to -the long-lived request, correlated by its `id`, and signals that the subscription -ended gracefully — as opposed to an abrupt transport drop, which carries no -response. +with a completion result before closing the stream. The result carries no +method-specific data beyond the standard result fields and subscription +metadata. This is the JSON-RPC response to the long-lived request, correlated by +its `id`, and signals that the subscription ended gracefully — as opposed to an +abrupt transport drop, which carries no response. ```json theme={null} { diff --git a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md index d20a183cd1..a0555998f1 100644 --- a/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md +++ b/content/support/10310342-how-do-i-log-out-of-all-active-sessions.md @@ -38,7 +38,7 @@ To regain access to your account on any device, you'll need to authenticate agai If you used your Claude account to authenticate into Claude Code, you can manage your authorization tokens by navigating to **[Settings > Claude Code](https://claude.ai/settings/claude-code)**. To remove a token and log out of Claude Code, click the trash can icon. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1787244300&signature=4a3d288167c1cf36d7ad1c68ef4eb54c2de76ad77c727ad2e5bd54b90bfa0a91&req=dSYnHst4nohdWvMW1HO4zVuHihv%2F0mO4AQofdwM8qVdAcw7NKSKsTjtqnZfN%0AVr7FlYpjIhkvDgtr4Gg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1608263923/b4fa7d6f6f08f2adffb4ea63bc58/image+%287%29.png?expires=1787280300&signature=97227bdfe14d4ce378cced5bd2578565e87524f1b3f39d46cdeb932bc9c2140e&req=dSYnHst4nohdWvMW1HO4zVuHihv%2F3me4AQofdwM8qVfasoV9w4GjVRXHPMQc%0ALUxeaIkImz2ipGzuvGk%3D%0A) ## Unable to access your account? diff --git a/content/support/10366376-how-can-i-delete-my-claude-console-account.md b/content/support/10366376-how-can-i-delete-my-claude-console-account.md index 12157da3d5..132ea3ea4c 100644 --- a/content/support/10366376-how-can-i-delete-my-claude-console-account.md +++ b/content/support/10366376-how-can-i-delete-my-claude-console-account.md @@ -36,7 +36,7 @@ If you followed the steps above to delete your Console organization but want to If you have an outstanding balance, you will see a message during the deletion flow that prompts you to pay the balance first by routing you to [Settings > Billing](https://platform.claude.com/settings/billing). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957766/5c2dd87c0818a0400099a833c9b3/4cc3130a-f696-4967-9fe3-e5623c6f02bd?expires=1787244300&signature=8444cb07ba7ec5d97956f002b318c7f49783e5557cef5e5535ff6e3c8dbe21b4&req=dSkgFcB7moZZX%2FMW1HO4zbYXUBBgWOAYFZRyvJPpBZ9VMMXYYfJEy4FIPmo6%0AOY1KQ4I9twdW48Dq4sk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957766/5c2dd87c0818a0400099a833c9b3/4cc3130a-f696-4967-9fe3-e5623c6f02bd?expires=1787280300&signature=73c25f1fb5be0c6d1035819c8af0b30dfaeabc67ad1d4fe845e38c8b50dc9855&req=dSkgFcB7moZZX%2FMW1HO4zbYXUBBgVOQYFZRyvJPpBZ9omwUmZX7LH0bIp6On%0AqULmMso6Zk2nhet7TTs%3D%0A) You must pay this outstanding balance before you’re able to move forward with the deletion process. @@ -44,6 +44,6 @@ You must pay this outstanding balance before you’re able to move forward with There are some scenarios where you will need to contact our team to delete your account. If this is the case, it will be noted when you try to delete your organization: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957765/19dda72a40db95d78c00c27a1a1c/6ce89be6-93ce-409c-bbea-d34be09db348?expires=1787244300&signature=d79bc5a46ed9ac9c08ded2483ce10c42eaee68302d0b37867e1591be7021a865&req=dSkgFcB7moZZXPMW1HO4zRW12%2BLPfKD6ZxDZGlqR6Ggacza26ktb0uYxKqoR%0AXWI0alapjjnL2OHnL%2FY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1973957765/19dda72a40db95d78c00c27a1a1c/6ce89be6-93ce-409c-bbea-d34be09db348?expires=1787280300&signature=1440d0fab90096bd225c966d76878743b7e0dc38e1db114e1cbd239fa4c6a366&req=dSkgFcB7moZZXPMW1HO4zRW12%2BLPcKT6ZxDZGlqR6GhtUAeLH2g%2FK4K16WsH%0ATZTBnWwNgBgwHol8PVo%3D%0A) If you are seeing this message, this indicates that your Console organization cannot be deleted via the self-service pathway. \ No newline at end of file diff --git a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md index c4dfdd890f..7ad57f4d7f 100644 --- a/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md +++ b/content/support/10504844-manage-user-feedback-settings-on-team-and-enterprise-plans.md @@ -6,6 +6,6 @@ As a Primary Owner or Owner of a Team or Enterprise plan, you can manage the abi 2. Use the toggle to change the **Rate chats** setting for your organization: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1787244300&signature=c95ee689235ffda5615dbdc534fb5b262fbd97ec33feaa3781c82a0d4d27f8ed&req=diAiHst3n4dfWvMW1HO4zYGm8iAeFKzP085gFtEpvcRLZEqbErJNLYsdyF%2Ft%0AqRVTIRDIEfPdzTo2Bqo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2058292603/75752add0bed6a9f3ab217f01708/CleanShot%2B2026-02-12%2Bat%2B08_55_14-402x.png?expires=1787280300&signature=3ac456b175ca487146db13f92e9e18f8c376721d9f4df149d7524efee6f35a20&req=diAiHst3n4dfWvMW1HO4zYGm8iAeGKjP085gFtEpvcQYcBDC1mMBk4coqOT4%0ACijpysuATBbURWP8I0o%3D%0A) More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: **[How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data)** \ No newline at end of file diff --git a/content/support/10504853-manage-user-feedback-settings-on-claude-console.md b/content/support/10504853-manage-user-feedback-settings-on-claude-console.md index ced5b641fe..ce062befe8 100644 --- a/content/support/10504853-manage-user-feedback-settings-on-claude-console.md +++ b/content/support/10504853-manage-user-feedback-settings-on-claude-console.md @@ -8,6 +8,6 @@ To manage feedback for your Console organization: 2. Toggle the feedback switch on or off. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1729186182/ebf4032a12a8c56959ca927726ce/Screenshot+2025-09-16+at+12_32_31%E2%80%AFPM.png?expires=1787244300&signature=efbd3a13d9c3a85ded80b82ed6b58990fa6cfc48965de5dea69a45288143be23&req=dSclH8h2m4BXW%2FMW1HO4zVpN5HAfXWxGJ%2FadMup7FQcMOF6Aw8gwjhnMhiFY%0Atr03geYq2WTE4KS%2FxSw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1729186182/ebf4032a12a8c56959ca927726ce/Screenshot+2025-09-16+at+12_32_31%E2%80%AFPM.png?expires=1787280300&signature=dd891b4562a504e7385894353119bdf110aa69a26884f94a7a159f3bbb0db11f&req=dSclH8h2m4BXW%2FMW1HO4zVpN5HAfUWhGJ%2FadMup7FQdAmOwp9X3hWVl1tmQL%0ArmkPRUxkbKKB00JdXBU%3D%0A) More information on how Anthropic collects, uses, and stores feedback data can be found in our Privacy Center: [How long do you store my organization’s data?](https://privacy.claude.com/en/articles/7996866-how-long-do-you-store-my-organization-s-data) \ No newline at end of file diff --git a/content/support/10593882-share-and-unshare-chats.md b/content/support/10593882-share-and-unshare-chats.md index a19596e6c4..30492f42af 100644 --- a/content/support/10593882-share-and-unshare-chats.md +++ b/content/support/10593882-share-and-unshare-chats.md @@ -38,12 +38,12 @@ To unshare a chat: Users on free, Pro, or Max plans can review a log of shared chats by navigating to **[Settings > Privacy](https://claude.ai/settings/data-privacy-controls)**. Find the **Privacy settings** section and click “Manage” next to **Shared chats:** -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1787244300&signature=ac4de0181e3beb75f5c73a3251425caddd584a55822111224b866a1513c8edaa&req=dSklF894lIheWvMW1HO4zWn5HzQfZkFoc9cNIYuX0GHBdtQRW282fjeRjmT1%0A6CRHzuD7ipozTCdM3YI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1921669913/7cc7be48cfc7a18f9f469d6cd83c/CleanShot+2026-01-08+at+10_20_43%402x.png?expires=1787280300&signature=4073f9fdf27c86c10a896a5fc3e3dff3742f61e705fb0ed97bb0ceb09c2c9358&req=dSklF894lIheWvMW1HO4zWn5HzQfakVoc9cNIYuX0GEF6O4x4ARikRKoeDJp%0A4pKEZpIlA5%2FCKDqYqwc%3D%0A) This will open a **Shared chats** modal listing the title, date shared, and link to each chat, allowing you to easily review and access all your previously-shared content. From here, you also have the option to click “Unshare” next to each listed chat to revoke access to the last snapshot you shared: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1787244300&signature=c87ded3666e9da85bf7acd7f68682a6a99b4f7dec93adeba41ccc31b434eb4ad&req=dSYlEst6noleWfMW1HO4ze44eCBjkBY9guvTv9woD7bOEokFsi%2BhG5vhV69l%0Am3VjtzPKPmzPxcN3lz8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243810/e6fe1d262597446c7fe21dff9f10/AD_4nXdW-GhByF8uKV7fCq9lTbkVB91FglSL6TSyXAOUk_MLcTV9YsEMBMkm9rgm1oXqv0k3sJh1JhlzZP6tHVkKbDJJ71pDRRtM3aVNG64MDuKDIzgmknh-XDZdNa7biTsTdwGoPr5GRg?expires=1787280300&signature=19e9509a5fd3d346a425fded315678214584cf67963f85f90b5581ecd8268d99&req=dSYlEst6noleWfMW1HO4ze44eCBjnBI9guvTv9woD7YYWIupI3rdhcZRKKGS%0AtNX2PUmDXXE5qzMaBfc%3D%0A) If you don’t have any shared chat snapshots, the **Shared chats** modal will show “No shared content found”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1787244300&signature=e5f590be24c5657f094e07145244a89d9d79dc4cc7357f70dd9003a0998d1348&req=dSYlEst6nolfUfMW1HO4zdaFncJ2hY2yDeZsm0Gz1Hs6oJpyQmEFDzsO%2FCOc%0AEZ8rC24VWF73H%2BcvETU%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1624243808/b025db8e598f0c88fb16d83d48d5/AD_4nXeUwCKnmFzzrjMHhfr5By4zk5pJlkEn3wbJ8-aNfu13Yl99IjBywpqPx9G07QRzpH1EwRY7uG7Q9m9fib98Gql1cIV7XwUCTzEgBNu79Ey8tCOS5CEVmwveIcEOxJ4fonBhe3g9MA?expires=1787280300&signature=6559844f38f91d1893db1d5a855182309c1fec2bc40d11282e027ce0d0307bb4&req=dSYlEst6nolfUfMW1HO4zdaFncJ2iYmyDeZsm0Gz1HtrOFdMmm6O3XUQRgum%0AHwDn7woBLxKAnxxp0x4%3D%0A) \ No newline at end of file diff --git a/content/support/10684626-enable-and-use-web-search.md b/content/support/10684626-enable-and-use-web-search.md index bffcc84682..985330fa0a 100644 --- a/content/support/10684626-enable-and-use-web-search.md +++ b/content/support/10684626-enable-and-use-web-search.md @@ -24,7 +24,7 @@ Web search expands Claude's knowledge with real-time data, helping you make bett An Owner or Primary Owner must first enable web search for the entire workspace. This can be found in **[Admin settings > Capabilities](https://claude.ai/admin-settings/capabilities)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2032032614/ad907328c4d9a26ee4bd9ca27a52/CleanShot+2026-02-05+at+09_01_42%402x.png?expires=1787244300&signature=adc6cd6848aabc919e1bc09810b7ac4678dbc8d69031d10c8915fdc3ae2cf83f&req=diAkFMl9n4deXfMW1HO4zetvyrW4HMpTUJIbgsqS2%2BN08RhrWpEKNtyJaJGz%0ATh2k2xiFHhimywWErYg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2032032614/ad907328c4d9a26ee4bd9ca27a52/CleanShot+2026-02-05+at+09_01_42%402x.png?expires=1787280300&signature=ecdca4057370d1322a790ba2997917c7238f5ff3be5c27ac4215699b987310d0&req=diAkFMl9n4deXfMW1HO4zetvyrW4EM5TUJIbgsqS2%2BOWYVyrjcZ4%2BNw833m3%0ANk7QjCTAqZ8HkWxE5IQ%3D%0A) Once this is enabled at the workspace level, any member of the organization can switch it on while starting a chat by clicking the “+” button in the lower left corner of the chat window and selecting “Web search." Users can toggle this off for chats that don’t require web search capabilities. diff --git a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md index ba210b0770..7ec347ea76 100644 --- a/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md +++ b/content/support/10949351-getting-started-with-local-mcp-servers-on-claude-desktop.md @@ -48,7 +48,7 @@ for specific instructions. Custom desktop extensions uploads allow Team and Enterprise plans to leverage organization-specific workflows that aren’t available in the public directory. After creating a custom desktop extension, Owners and Primary Owners can navigate to Settings > Extensions within Claude Desktop and click “Advanced settings” to access the **Extension Developer** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1787244300&signature=50c1d0b8000d834cb14ba61756b2ab4146ededbf08d81110793706c160d215fb&req=dSYvF89%2BmodfXvMW1HO4zWbPxEd9MzkxHn9K2IaIG2LTZfZjLdZDMhPUx8le%0AjjpSUL2tzqGcqVo8i4k%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1681607607/ba6e379d2769d190f0970a0adaed/AD_4nXd4aZkqjJFpiXMPF28Pih7HmSJ9pPsnoWAfVgiLdFRFiTkO92YtXteIjvDHaPl7T0tjfpRTBOlyrMbQ_aciCNDgfIuEvV3szmKvt72x5O51DMSClXOYWk1JIRIzylwkj3joXqZcLw?expires=1787280300&signature=c554a1f897e54f6fee1d84175daa513c1ef0e81220d4bfc9a226031fc80d2361&req=dSYvF89%2BmodfXvMW1HO4zWbPxEd9Pz0xHn9K2IaIG2LlXhxsQ9pS6P7SIJkr%0AqKxTnyZwWg%2B7R8naW%2Bo%3D%0A) Click “Install Extension…” and select the .mcpb file. Follow the prompts to install and configure your custom desktop extension. For more in-depth information, please refer to our [desktop extension developer documentation](https://github.com/anthropics/mcpb). diff --git a/content/support/11101966-use-voice-mode.md b/content/support/11101966-use-voice-mode.md index cda65b3b20..7b2a50869d 100644 --- a/content/support/11101966-use-voice-mode.md +++ b/content/support/11101966-use-voice-mode.md @@ -24,7 +24,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the sound wave symbol in the lower right corner of the chat window to activate voice mode: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1787244300&signature=7d6bd34bcc2e25b5080def4b04ffcbf6784de638fa3ced75fd02fa25e1ca6307&req=diAjFMp7lYddWfMW1HO4zZyGrslwv1MTF6uXnTLMvvCLoehBWlDbyCOR%2FnAk%0Au4kR%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042358620/1bf2311353615c1c494da1312a17/124b93a8-0a9b-4c84-9d1f-ede6ca3498dd?expires=1787280300&signature=1a63f9858d227d517b1c4e78be2f4c4f342251b1892edf2da8d0c1adcfaf8443&req=diAjFMp7lYddWfMW1HO4zZyGrslws1cTF6uXnTLMvvCYKQZTdYTyqD3ubb3H%0ACE8I%0A) 3. Start talking and see your prompt automatically populate in the chat input. @@ -32,7 +32,7 @@ Voice mode transforms how you interact with Claude by: 5. Claude will remain in voice mode until you click the “Stop” button in the lower right corner of the chat window: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1787244300&signature=62423a040db898b97dcb5ee4541a6a3c99138a3746bbc8823f45257ad60f6aa3&req=diAjFMp7n4FZWfMW1HO4zU6VRfrITLhqxNdRzYWrfF7jiEe%2FJu4ZD1fgrgDh%0ARwZQP%2BypPezATvKeVz4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352060/162f9e61f7fbeb689201dfc1cac1/6a7fafb2-31df-43be-a43f-0059d735e3c4?expires=1787280300&signature=5fc4d2b0f8fead655905123ebee13f1e82f97350900528426e88e48cd65e88aa&req=diAjFMp7n4FZWfMW1HO4zU6VRfrIQLxqxNdRzYWrfF6ZqVhzCt83JDcl841u%0AMVANo6oPsWtHdm3V%2FXM%3D%0A) ### On mobile (iOS and Android) @@ -40,7 +40,7 @@ Voice mode transforms how you interact with Claude by: 2. Tap the voice mode icon (sound wave symbol next to the microphone icon) in the text input field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1787244300&signature=babc9b1daff1a445d7a6c2e692c14aa6177fc90501148b6c903547a92df6c4b2&req=diAjFMp7lIdWWfMW1HO4zQTUIfN4lNxND%2FRXAPlQ7La1K0pGCExvonlkN0z7%0AtZAQ%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042359690/68879db64559ecf87991f73ce058/671ff972-9e08-4686-bc04-955dab4b2de3?expires=1787280300&signature=6dd1d76da6370ba3e7b76ace446eff5a151f8cd002e2eab6b56f0bcf85049617&req=diAjFMp7lIdWWfMW1HO4zQTUIfN4mNhND%2FRXAPlQ7LZjrDLTAl9en6DAzHGq%0Ac8dk%0A) 3. Choose a voice to personalize your experience. @@ -78,7 +78,7 @@ To change the voice later: - **On mobile:** Click the settings button in the bottom left corner while chatting with Claude in voice mode, then tap your preferred voice and pace: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1787244300&signature=7d7b0f52c5342ff81541c245d9af8748f6bb026c9c1b3a9e43be53b9687fbe5f&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGG2XZFQJy8OQfYsvK3wBmH%2BIvoNgN53PAcul%0AMv4rn3B7BPFh%2BTFbkeA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2042352063/25eca25bcfd573ecab30dd53158c/074454a6-fa5a-4c49-8b19-02d434b4ca50?expires=1787280300&signature=26cd00a9378fbf8c63a9d3dc1a382b29c64a3d2e31babca3b1d71b152aef0463&req=diAjFMp7n4FZWvMW1HO4zZ3%2FGG2XaFAJy8OQfYsvK3xhjm%2FTiAyMax8ntIfH%0AXck8NQhdbsJr%2FwpTWiE%3D%0A) ## Choose a model diff --git a/content/support/11176164-use-connectors-to-extend-claude-s-capabilities.md b/content/support/11176164-use-connectors-to-extend-claude-s-capabilities.md index d92270486f..d090b20aa2 100644 --- a/content/support/11176164-use-connectors-to-extend-claude-s-capabilities.md +++ b/content/support/11176164-use-connectors-to-extend-claude-s-capabilities.md @@ -8,7 +8,7 @@ Web connectors are available for all users on Claude, Cowork, Claude Desktop, an Connectors let Claude access your apps and services, retrieve your data, and take actions within connected services. Claude inherits each person's permissions from the connected service. If someone can't access a specific file, channel, or record in the source system, the connector can't reach it from Claude either. -For example, you can connect Claude to Linear to create issues, to Slack to send messages, or to Google Drive to search your files. Connectors work across Claude, Claude Desktop, Claude Code, and the API (via the **[MCP Connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector)**). +For example, you can connect Claude to Linear to create issues, to Slack to send messages, or to Google Drive to search your files. Connectors work across Claude, Claude Desktop, Claude Code, and the API (via the **[MCP Connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector)**). Setup details for individual pre-built connectors are in **[Claude Docs: Connectors](https://claude.com/docs/connectors/overview)**. You can find available connectors in the **[Connectors Directory](https://claude.ai/connectors)**, where each connector has a page detailing its use cases, read/write capabilities, and availability. You can also add custom connectors or connect to any service that supports MCP. @@ -200,6 +200,8 @@ If you're having trouble connecting to a service, try these steps: 4. If authentication fails, try disconnecting and reconnecting from **[Customize > Connectors](https://claude.ai/customize/connectors)**. +5. For connector-specific requirements and known issues (Slack, GitHub, Google Drive, Gmail, Google Calendar, Microsoft 365), see the connector's page in **[Claude Docs: Connectors](https://claude.com/docs/connectors/overview)**. + ### See a message that says, "This corporate identity belongs to an Enterprise that manages access through their own Claude account"? The service you're trying to connect uses an email address on a domain that an Enterprise organization has verified, and that organization restricts connections to its own Claude accounts only. To use this connection, sign in to your organization's Claude account and connect the service there. If you don't have a Claude account in that organization, contact your admin for access. diff --git a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md index 8548485286..fc438bc892 100644 --- a/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md +++ b/content/support/11725453-set-up-the-claude-lti-in-canvas-by-instructure.md @@ -44,7 +44,7 @@ This article provides information on how to enable the Claude LTI integration in 5. Click "Install" and refresh the course page. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1787244300&signature=29774c2412ccdaff64fa7c38205db2e0a68d179020f3ffcc905fde5d88974165&req=dSYmF818n4VcWfMW1HO4zTEDauwcn%2FeCEv2ojHLMylbE26URn1FiVSo5uYik%0A7Ar7uFh4CAuUzRPOcU4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1611422430/c8e0875feac1f2c7cb033be74fc9/AD_4nXfLU_bui3EXcCjQ0qm70HD97neqjGayKeDer_t76utlci8gZSUjYRhw6ZSOlDdqSEcwXBzd_shAh7pQEJ-8OoE0O21DM5coOgxmO_WD5hlwiuwtS2iYXcTavhIRyQT5zKFWvfn3NA?expires=1787280300&signature=ac49fd2c6afccde100df9748051982f021535c8d15e37ab209ef0f313874f23f&req=dSYmF818n4VcWfMW1HO4zTEDauwck%2FOCEv2ojHLMylaQenKIJ0WaaQxM8q9X%0AiSFP8sK7CH09JBCGzc0%3D%0A) ## Turn on the Claude LTI Integration in Claude for Education organization settings diff --git a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md index e46b1c67c7..9108bba886 100644 --- a/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md +++ b/content/support/11818288-why-am-i-being-asked-to-verify-my-payment-method.md @@ -2,7 +2,7 @@ If you see the following pop-up when you log in to your Claude account, you’ll need to click the “Verify now” button to verify your payment method: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1787244300&signature=a1c47b5e25c175c841c9f19f2d1eabf7d1c4ccfa35eb71aac344c069d3c778d4&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjEPs7ITxn6MrEicvimD61fv4ze4ZwyuS4Fhb%0AXSJC2T4iU9ARrIDYLQc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1631413861/42c3b13d7fc44a11a88ec2b9cd03/AD_4nXeMx8QXpeZZCkfAnVSwx8KZ9n4Vr2rvPdQddyE6ZNxch__F6ZqFs1G4ZmU52Wvb7gRlwRqquTLdw8IQv-gICDyP-MXqiQK_Oe7gX3SKsCKKt2IEpMx4qDeMeeZufMaJfv16XgOH5g?expires=1787280300&signature=37f37ae923e532e488aa6e65563dfb7f48f5dd2c24c1ccc5e55cb06bd6e89644&req=dSYkF81%2FnolZWPMW1HO4zf7%2BjEPs4IDxn6MrEicvimDQ2W2Wmw8RNw8F3wb5%0AXo4wQ23CbOwTy%2FUKswQ%3D%0A) ## What happens if I click “Remind me later?” diff --git a/content/support/11869629-use-claude-with-android-apps.md b/content/support/11869629-use-claude-with-android-apps.md index 33dde80bd9..b21b4b8f64 100644 --- a/content/support/11869629-use-claude-with-android-apps.md +++ b/content/support/11869629-use-claude-with-android-apps.md @@ -222,7 +222,7 @@ Permission requirements vary by feature: For features requiring permissions (like location or calendar access), Claude will request permission contextually with clear explanations of why the access is needed. You’ll be prompted to approve the action with three options: Allow once, Always allow, or Don't allow. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1787244300&signature=4613760d86ce8ccf8dd1a1b25cd771c81fcd2cad126f70fba8c0ab274450bb6e&req=dScnEcp7nIdeXfMW1HO4zQe5GliN3yH3S5x65TIld%2FCjjrW8x0g%2FiBOI%2F32v%0APEL6BFePMRuCNb9aNXA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1707351614/ccb910e4b87b1e96ad9a11bbd835/b57b2130-d8d6-4499-89f6-6c12de236fd4?expires=1787280300&signature=a930538f55bc3d6dc5b01b091eda178c0e8fbd7d4aab73be90c56cf70bcb1bb1&req=dScnEcp7nIdeXfMW1HO4zQe5GliN0yX3S5x65TIld%2FB8AYFPewUjsroxlBrg%0AJC%2FxGh1yZdoKnJQ8pfM%3D%0A) These permissions can be managed at any time in your device settings by going to Settings > Apps > Claude > Permissions. Click into each permission listed under **Allowed** and **Not allowed** to make changes. You can toggle between “Allow only while using the app” or “Ask every time” to change Claude’s access, or remove permissions by choosing “Don’t allow.” Claude will only request permissions if needed for specific features, and you can always choose to decline while still using other capabilities. diff --git a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md index 781dd93cb2..20eda7edd6 100644 --- a/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md +++ b/content/support/12005970-manage-usage-credits-for-team-and-seat-based-enterprise-plans.md @@ -70,7 +70,7 @@ After navigating to **[Organization settings > Usage](https://claude.ai/admin-se The **Usage and spend limits** section will show the current limit (if any) or **Unlimited**. Clicking on "Adjust limit" opens a modal where you can either input an amount and click "Set spend limit," or click "Set to unlimited" to remove the organization-wide monthly spend limit. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1787244300&signature=b4ba237f6f627354129392b812b02e57ff73ab836f3d8f3b0d7a83452bbce369&req=diEjH8p6modfXfMW1HO4zQHwg6bVkiql6DwhVVpk1mB%2FxRxyR1chzo%2BpQi4g%0Aq9LBYsBg8Oq7ZaYRFhY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149347604/936ac4eb025d3ef1f00c3b8a26b0/image.png?expires=1787280300&signature=4c5d0962cfdd6471236ba6ac84956101786c330f4bbeb9e4c5c7e2d947d68437&req=diEjH8p6modfXfMW1HO4zQHwg6bVni6l6DwhVVpk1mDXlMzxhPyKAO%2BNXaZT%0ANky2W8ruW3H0kxqyYXM%3D%0A) Changes to your organization’s overall spend limit go into effect immediately. @@ -78,11 +78,11 @@ Changes to your organization’s overall spend limit go into effect immediately. Owners and Primary Owners on **seat-based Enterprise plans only** can set spend limits that apply to all users within a specific seat tier. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1787244300&signature=645398e83da0e1879e07a08b734e768d4a5c61bbe9ebc619d6934e16d33b9f6f&req=diEjH8p7nIdfWfMW1HO4zYnqMIKWJ3SK0wfO62ivdG%2B9dD2UpfvQ0hNB8nqe%0A2bLmWRZ6XhimUl29fXA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149351600/c5b979c366ac2738f60ea84e85b3/CleanShot+2026-03-10+at+15_37_41%402x.png?expires=1787280300&signature=04cdac3f2562e4c7604140be387586d2fa158c7c5b8fec258d129cd56c711adc&req=diEjH8p7nIdfWfMW1HO4zYnqMIKWK3CK0wfO62ivdG9m%2FM9qEy%2FE5CW9olEy%0AJcsi7auysnKvcDjzWkU%3D%0A) Select the "By group" tab to see **Standard seats** and **Premium seats** groups. Click the "..." icon next to the current limit, then "Edit limit." This opens a modal where you can either select "Set dollar amount" and input an amount, or click "Unlimited" to remove the limit for that seat type. Click "Set limit" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1787244300&signature=212977489c910336a810a51e117b348a9c9756df598cf70f14bcac4e74726a02&req=diEjH8p4n4FaX%2FMW1HO4zRzvvIIJdElFq7nEDCGq9G5BrNOT8Af7%2FGpgNDEF%0A63XQFdQGVeEGkz14Eq4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149362056/44993661ca2db771fe924d0346f6/image.png?expires=1787280300&signature=68a6ac6e7b86407d8e0e364695c8df0617d10893fea307c15ce8b75570d8dccb&req=diEjH8p4n4FaX%2FMW1HO4zRzvvIIJeE1Fq7nEDCGq9G5fJKHEoYMmUvRFzlJc%0AzzAHHSOx66dfCbkr%2Fig%3D%0A) --- @@ -90,11 +90,11 @@ Select the "By group" tab to see **Standard seats** and **Premium seats** groups Owners and Primary Owners can also set individual monthly spend limits for each member by finding **Spend limits by user** and clicking the "..." button next to the user, then "Edit limit." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1787244300&signature=a86ddbb3e718fdc73f439595f6c9f5c58323dd2f04707bab71d7c88af13dfe5c&req=diEjH8p5nYlaWvMW1HO4zaPdGQBVUStFe9HwvwG7ubiFlo1ChEhVL2yW1wuk%0AsL5uAFrHUD%2FL4uGINbQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149370853/db66f5cd03683b9cc119d0dcd6b8/image.png?expires=1787280300&signature=ac3d1732578b3fc72493c9190505f9486d7d83d9274d8223e2b8120c97607de7&req=diEjH8p5nYlaWvMW1HO4zaPdGQBVXS9Fe9HwvwG7ubjEcLwm%2FP2o2nQ4GjDO%0AGv1GhiVRd6UgmJcM8bs%3D%0A) Enter the amount and click "Set limit." Alternatively, selecting "Set to unlimited" will remove that member's monthly spend limit (they will still be subject to any organization or seat-level spend limits). -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1787244300&signature=5e696ee1702262deb7c560bf84914b0e96acbbead1e847900c0af93318002c29&req=diEjH8p5mYFdUfMW1HO4zevsAvCIN%2B%2BJw6z2wGSwkbuSuPMI%2Fi048ulqs%2FfY%0AB3c3RSwoTcMH4hwuqv8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2149374028/97813fe3b515c2e839d8d92abd79/image.png?expires=1787280300&signature=7aada0eb58bccca191b0266a08a4b45c2c95b7d611de947a0bf82981f8b1b38a&req=diEjH8p5mYFdUfMW1HO4zevsAvCIO%2BuJw6z2wGSwkbueBGy3KjTISIsiglQI%0ApEvSfTah5HfI50LLFfE%3D%0A) This allows owners fine control over usage credits, so you can set limits for different members based on their roles or individual needs. Once a user reaches their defined spend limit, this will automatically pause their usage credits until the end of the month. They will need to wait for their usage limits to reset before using Claude again. diff --git a/content/support/12012173-get-started-with-claude-in-chrome.md b/content/support/12012173-get-started-with-claude-in-chrome.md index dcd56093db..f1050b4d3f 100644 --- a/content/support/12012173-get-started-with-claude-in-chrome.md +++ b/content/support/12012173-get-started-with-claude-in-chrome.md @@ -36,7 +36,7 @@ Follow these steps to enable the Claude in Chrome connector in your desktop app: 4. Toggle the connector on, then download and install the extension if you haven’t already. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604933811/ae37c41fc808dbdf48d135338334/6cc9ba4b-9d31-43a2-ab80-8048b5f9d791?expires=1787244300&signature=bd94b77c81a757b80370ed6ff72b3ee66384e1cf39a64d8208afd44c80be9071&req=diYnEsB9noleWPMW1HO4zUOPbPvEkuaOnt%2F2nPMwUPgXDirK5Inxikcrl7l%2F%0A9OkVXo1YCWGG%2Bn5tNbw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604933811/ae37c41fc808dbdf48d135338334/6cc9ba4b-9d31-43a2-ab80-8048b5f9d791?expires=1787280300&signature=63119e24b0d51fba5807da5de7b60387b6628e30e566de7945592d24af55a429&req=diYnEsB9noleWPMW1HO4zUOPbPvEnuKOnt%2F2nPMwUPjJnby1SuSN1TIVWnvx%0AZjFrT0MVnSUVMWvbiZY%3D%0A) Completing these steps will add Claude in Chrome to the “Connectors” drop-down on your chats with Claude. This is disabled by default, so you’ll need to enable it manually for each conversation. diff --git a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md index 614abf409c..37457e595b 100644 --- a/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md +++ b/content/support/12083917-change-your-team-plan-from-monthly-to-annual-billing.md @@ -8,11 +8,11 @@ Owners and Primary Owners of Team plans with monthly subscriptions can switch fr 3. Or from /upgrade, click the “Switch to Annual plan” button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690325734/d47f714680d78408d6022d06b8d1/image.png?expires=1787346000&signature=7a23960af0df1aa7f1cc1277c4d66f75dea287b828622e0bf6f411a233db47e6&req=dSYuFsp8mIZcXfMW3Hu4gZzas%2FXtvjxWm2rRiVwqPzZD%2FIsCLniYkdSl1fnb%0ASQ%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690325734/d47f714680d78408d6022d06b8d1/image.png?expires=1787400000&signature=65500b426f76799e2b0ddb2e58ba81feea33548c93a6574d65114e7392235fc4&req=dSYuFsp8mIZcXfMW3Hu4gZzas%2FXtvjtSnWrRiVwqPzZdgGFEOCauXkHd3XYP%0AAg%3D%3D%0A) 4. The confirmation screen will display the total cost for your upgrade from monthly to annual billing: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690326039/3a91cdc5fff57d188a18ecc6273f/image.png?expires=1787346000&signature=ab7d66dfaad8f63bfc7e842be94dcb74ee776795970550a263610575074713f4&req=dSYuFsp8m4FcUPMW3Hu4gbNj%2Bk78Ww7lje5vzcg6znWl%2BdNdAa34xdQlC5X3%0AGQ%3D%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1690326039/3a91cdc5fff57d188a18ecc6273f/image.png?expires=1787400000&signature=c88847fddcada2264be3107da7d444bf1e7a1221cdb0aa7c9cc8a930ed193fa0&req=dSYuFsp8m4FcUPMW3Hu4gbNj%2Bk78Wwnhi%2B5vzcg6znVvs65OvzlEcy%2BRawsc%0A8g%3D%3D%0A) 5. Click “Confirm subscription.” diff --git a/content/support/12111783-create-and-edit-files-with-claude.md b/content/support/12111783-create-and-edit-files-with-claude.md index c12cb7164f..fbcd5832ae 100644 --- a/content/support/12111783-create-and-edit-files-with-claude.md +++ b/content/support/12111783-create-and-edit-files-with-claude.md @@ -48,7 +48,7 @@ These capabilities make it easy to produce professional documents by simply chat To give Claude access to external data sources, toggle **Allow network egress** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1787244300&signature=400ad6fb04ab2192207788f67e2401d11e485c5de2a12d9d9cd012c4156518d6&req=diAiEs55mYFfXPMW1HO4zYFJywpHCJ3NPQVowIiib2kuWkSW8%2Bsm2ebGC0R%2F%0Avh1splq47pq5uc07RoU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2054774005/25bcfffba6c249cd128d6c3f6d52/CleanShot+2026-02-11+at+16_34_47%402x.png?expires=1787280300&signature=34d77242354e0da619ae25a9be0cbf4aa1af0d3de3579f26e1764ac8d12c73da&req=diAiEs55mYFfXPMW1HO4zYFJywpHBJnNPQVowIiib2lI%2FzyAH%2Bx%2FbBMzMKBN%0A680P21b31UpZamRJUdw%3D%0A) ### Enabling on Claude Mobile @@ -66,11 +66,11 @@ Team and Enterprise organization owners can control network access settings in * - **Allow network egress to package managers and specific domains:** Claude can access package managers plus additional domains you specify. Add domains individually to whitelist specific resources your organization needs: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1787244300&signature=91e02dad76a94c14a4c74683b1fa4c6262a88640704eea446658be924479413e&req=dScvH8B6mIJZW%2FMW1HO4zXJcBmpBkS1IpMW6Iph6YZeOrA%2FfkCH%2FZjGUR%2Fxx%0A9nbpuVODcJbkDRnCU%2Bs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945362/ad72504d5429960f369b8b91b43c/86f06c0e-6eaa-4574-a4cb-2c38b273613a?expires=1787280300&signature=7351698edbc77bcadb34e1089f2ecc7ef2110b6282544c75e6d20cd4d358fd78&req=dScvH8B6mIJZW%2FMW1HO4zXJcBmpBnSlIpMW6Iph6YZdHqUWf%2B7494ChPP82G%0AnoUv9MqckpjCbyHiwaU%3D%0A) **All domains:** Claude has full internet access except for domains on Anthropic's legal blocklist. While this provides maximum flexibility for file creation and analysis tasks, it’s also the riskiest option. Please review the **[security considerations below](#h_0ee9d698a1)** before enabling “All domains”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1787244300&signature=b4d95ceef6152c80ba5a5a4d555e0ffdd90fe501d55fbe3cb810a7797ae1fad5&req=dScvH8B6mIJZWPMW1HO4zdnseBOQ6juhqgKIA6CM1touTMSt1QU6qZ9PcJZ3%0A1AQvIswpKBSoYJVM5%2FE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1789945361/e3188cb8edb9ca7c303615da6378/f1c99a7d-5956-48d5-9ec7-b7ae6c8c3d28?expires=1787280300&signature=8bbac7a8bb13f5c6bb68e71337a75fdb2fdac46b39e3c063af92b7aa5ebc6ba4&req=dScvH8B6mIJZWPMW1HO4zdnseBOQ5j%2BhqgKIA6CM1tpHazg6ciexv7fWN36O%0AMWdS2bERt%2B522g1Mzng%3D%0A) --- diff --git a/content/support/12157520-claude-code-usage-analytics.md b/content/support/12157520-claude-code-usage-analytics.md index 62a2739d36..afdee7094b 100644 --- a/content/support/12157520-claude-code-usage-analytics.md +++ b/content/support/12157520-claude-code-usage-analytics.md @@ -50,7 +50,7 @@ The **Usage** tab displays the following metrics for your organization. Data on - **Top commands**: The Claude Code commands used most often across your organization. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1787244300&signature=b573944912bc0bbc5d2e1bc9433ffacd1f1f4191042012e3f767a86d45df4ad2&req=dScmEcx5lINYXvMW1HO4zfiEP6FSi33NCX9h5MbdDjMcHWGZQcB%2BR8sCOMpP%0Af7APoeI%2Fg7kwIr0Z%2Fkc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1717579277/46c512f4b3ed05c359cecd78ed5c/e0ce2c19-39e2-411f-9a1f-cb1d46439a42?expires=1787280300&signature=8e74339668f2a3f4e37e0b9f2e35f9d6b2648d5224ccad58eaeac0aa53f5e251&req=dScmEcx5lINYXvMW1HO4zfiEP6FSh3nNCX9h5MbdDjNZ0DxJvVaK9X8eUabS%0AjoPk01j07aS9NqyuBe8%3D%0A) ### User-level metrics diff --git a/content/support/12260368-use-incognito-chats.md b/content/support/12260368-use-incognito-chats.md index 3727dde7f4..c4f21dd1b7 100644 --- a/content/support/12260368-use-incognito-chats.md +++ b/content/support/12260368-use-incognito-chats.md @@ -30,7 +30,7 @@ Incognito chats are temporary conversations that aren't saved to your chat histo When starting a new chat with Claude outside of a project, you'll see a ghost icon in the upper right corner of your screen: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1787244300&signature=4ea2cea102358d8a6068c1f4cec3157ba6e2009e552e3f27814ace7f81583582&req=dScmH854lYZbXfMW1HO4zeUcuwW%2FauGIDCAt3Cx%2FSO1w4Ghe7QGyZ%2FMpS0Op%0ACiBzd51Yf4RLHPjg%2FR4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1719768744/c7a2fa56cf284e48472f3b9c4dbf/030563f8-9f97-4891-a749-9ae95968a063?expires=1787280300&signature=f491ffe6b7853f109706fd2d6818cec89dd41e3acd1c40157662eae22524181c&req=dScmH854lYZbXfMW1HO4zeUcuwW%2FZuWIDCAt3Cx%2FSO2A%2BuDDIHaXlL0H9gww%0A5lD4z5KHB9hvpilGVgI%3D%0A) 1. Click the ghost icon to enable incognito mode. diff --git a/content/support/12293051-use-claude-in-xcode.md b/content/support/12293051-use-claude-in-xcode.md index 4e4187587a..69b0cd8685 100644 --- a/content/support/12293051-use-claude-in-xcode.md +++ b/content/support/12293051-use-claude-in-xcode.md @@ -34,7 +34,7 @@ To start using Claude in Xcode: 3. Log in with your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1787244300&signature=2d6e95058a5997d15bc75607c89beefddb1ac55744bc7732ce12b1ea1e2290be&req=dSclEcp5nIRXXPMW1HO4zUAXI8sAVqzXFalhp3bugHKYtKMH3L3%2BSHFaUE0C%0AYIBOAL43OsCkiShp%2Bso%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1727371585/b18ca03a6357c52d12d10386f28e/dab2dcb2-f670-4173-b77d-38767a34cec1?expires=1787280300&signature=fa6b5a895b57ed2f48e7afc9699ec7046df8df99b9921df88c80384f3a930307&req=dSclEcp5nIRXXPMW1HO4zUAXI8sAWqjXFalhp3bugHIRmOdDvzfaQroRr96l%0AVFCjwvqwd0n6%2F09jCF0%3D%0A) ## Usage limits diff --git a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md index 5d20c3c540..9c21e9edae 100644 --- a/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md +++ b/content/support/12429409-manage-usage-credits-for-paid-claude-plans.md @@ -46,7 +46,7 @@ To enable usage credits on your paid Claude plan: 8. You can also enable auto-reload to automatically make a purchase when your balance falls below a threshold you set: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1787244300&signature=20964966ec384a4d32727732729470bd3f2b3090fe7269f20045f2ac32467d6b&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ARWbofQ7opE7m38Ydfd5DKbsWUZo2BHmBNOh%0AIrPaa8FAyuoeaouVZA0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1805819785/5e203c38e6ba3f76bfd1dab0d5ce/fe062e7c-18cb-48cc-a7e2-754ac6e6c4be?expires=1787280300&signature=742af7a2addd3a70f683c60df73b86a0e6419c21f1188009965597b8e31bd8ae&req=dSgnE8F%2FlIZXXPMW1HO4zYj2ARWbrfA7opE7m38YdfdXTUEG6Iq%2BU8VjPLTX%0APUZqC%2BeadIQUVMHw3Mg%3D%0A) **Note:** There is a daily redemption limit of $2000. diff --git a/content/support/12466728-troubleshoot-claude-error-messages.md b/content/support/12466728-troubleshoot-claude-error-messages.md index 044549b27b..f5ad80df18 100644 --- a/content/support/12466728-troubleshoot-claude-error-messages.md +++ b/content/support/12466728-troubleshoot-claude-error-messages.md @@ -58,4 +58,4 @@ Capacity issues will not appear on our status page because they represent normal Service incidents are disruptions where Claude is unavailable or significantly degraded for all or most users. These represent actual technical problems with our systems. To check for confirmed incidents, visit status.claude.com, where you'll find real-time updates on scope, impact, and resolution progress for any active incidents. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1787244300&signature=40cc04b4a67432cb57e7ee32ea60747fe1f8ce3b67675141bc5cf7b26b7017cd&req=dSciFc53m4NbXvMW1HO4za4BXqgh1rbH7y68oYp%2BYg%2B4h6YvzGYf80%2BWABEm%0AK1UEQHpTBjr41x10EgY%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1753796247/e6a8c6ef8653b229c5758e881242/c2fc6fc0-d163-4119-93e0-394104d86bc9?expires=1787280300&signature=0e62c17ecccd5afdc9e454aee68f27b0013430dc796e96a1a8248db34075eafc&req=dSciFc53m4NbXvMW1HO4za4BXqgh2rLH7y68oYp%2BYg86UtmKRf9efKe3urVY%0Aqv5sLwRoM0RoDxtTDYU%3D%0A) \ No newline at end of file diff --git a/content/support/12512180-use-skills-in-claude.md b/content/support/12512180-use-skills-in-claude.md index b441f604ce..508b3ba4ad 100644 --- a/content/support/12512180-use-skills-in-claude.md +++ b/content/support/12512180-use-skills-in-claude.md @@ -1,9 +1,9 @@ # Use skills in Claude -Skills are available for users on Free, Pro, Max, Team, and Enterprise plans. This feature requires **[code execution to be enabled](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_1c99382190)**. Skills are also available in beta for Claude Code users and for all API users using the code execution tool. - Skills extend Claude's capabilities by giving it access to specialized knowledge and workflows. This guide shows you how to enable, discover, and use skills in Claude. +Skills are available for users on Free, Pro, Max, Team, and Enterprise plans. This feature requires **[code execution to be enabled](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude#h_1c99382190)**. Skills are also available in beta for Claude Code users and for all API users using the code execution tool. + ## Prerequisites **For Enterprise plans:** Owners must first enable both **Code execution and file creation** and **Skills** in **[Organization settings > Skills](https://claude.ai/admin-settings/skills)**. Owners can also upload skills to provision them organization-wide—these skills automatically appear for all users. Once skills are enabled at the organization level, individual members can toggle on example skills, access provisioned skills, and upload their own personal skills in **[Customize > Skills](https://claude.ai/customize/skills)**. @@ -166,7 +166,7 @@ To remove a custom skill you've uploaded: 4. To delete the custom skill entirely, click the "..." button next to the toggle, then select "Delete": - ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2105391273/8359cbf8be20dce0f1cd3fd40e6f/CleanShot-2B2026-02-25-2Bat-2B15_50_16.png?expires=1787244300&signature=501f6d01ecca468c237aa208c4a5f411795fcf1d80836935517c0e6cddf30b9f&req=diEnE8p3nINYWvMW1HO4zSOgDywqxuKuH%2BdCnFXB0ui%2F4PSpMiHVPa3Q6Ns5%0AefSJ%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2105391273/8359cbf8be20dce0f1cd3fd40e6f/CleanShot-2B2026-02-25-2Bat-2B15_50_16.png?expires=1787378400&signature=a067c243a24ee0d76f01c73964e70b9b6f8829ac778c6bdb2ed0c5ea9155f6d5&req=diEnE8p3nINYWvMW3nq%2BgQ%2B4%2F5bph2JLzFUT2ztkCRgPkugoXQus21l028t8%0AWih%2FRUlZvsZJXvDMdeCdRsvuO4s%3D%0A) 5. Click "Delete" in the confirmation prompt. @@ -208,6 +208,14 @@ Ensure code execution is enabled in **[Settings > Capabilities](https://claude.a - Try being more explicit in your request (e.g., "Use my brand guidelines skill to create a presentation"). +### Can't create or upload a skill + +On Team and Enterprise plans, an organization owner can turn off skill creation for users. If the option to create or upload a skill is missing, your organization may have **User-created skills** turned off, or—on Enterprise plans with custom roles—your role may not include the **Create skills** capability. You can still enable and use skills your owner has provisioned. Contact your organization owner if you need to create your own. + +### Skills greyed out + +If skills appear greyed out, code execution may be disabled at the organization level (for Team and Enterprise plans) or individually. Check with your organization's Owner (Team, Enterprise) or make sure to enable code execution in **[Settings > Capabilities](https://claude.ai/settings/capabilities)** (Free, Pro, Max). + ### Upload errors Common reasons for upload failures: @@ -220,10 +228,6 @@ Common reasons for upload failures: - Invalid characters in skill name or description -### Skills greyed out - -If skills appear greyed out, code execution may be disabled at the organization level (for Team and Enterprise plans) or individually. Check with your organization's Owner (Team, Enterprise) or make sure to enable code execution in **[Settings > Capabilities](https://claude.ai/settings/capabilities)** (Free, Pro, Max). - ### Group doesn't appear when I try to share a skill The group needs the **Share resources with this group** visibility setting turned on by an organization owner. Contact your organization owner if a group you expect to see is missing. diff --git a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md index 3d1df9a4b1..d91343fe90 100644 --- a/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md +++ b/content/support/12592343-enabling-and-using-the-desktop-extension-allowlist.md @@ -20,11 +20,11 @@ The desktop extension allowlist is disabled by default, so an organization Owner 4. Switch to the "Desktop" tab: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1787244300&signature=3c76ccedb21b12b10135fc6a66505572b69300159683bfb153da04bcf015ca9b&req=dScvF857mIBYW%2FMW1HO4zQ9pXU0I%2B3TY0ugSQm1MFW9wyvzhVbughH9UplQS%0ALVW%2F%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755172/63c92550571842577ad435860ec5/6f5cc4e1-ff7d-48de-863a-c4e6184d4605?expires=1787280300&signature=039aae2f05112ac4a0afce48e0d6d90ca11fc9ac9deb4c7a254ed8219596b57f&req=dScvF857mIBYW%2FMW1HO4zQ9pXU0I93DY0ugSQm1MFW8zC3OEIlR0EhLSzgRG%0Abrc5%0A) 5. Toggle **Allowlist** on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1787244300&signature=473c68f4c18f07e37c6dfa8582f70bc73f9a9811a2ec03fb42de6c3c3759f55c&req=dScvF857mIRYUfMW1HO4zaj0BHYpTaMHTAorLxpdoc%2F5STMe6RhUIqGgUNwZ%0A6Bc9%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781755578/a6bafff5f084dc86ae463703fd3d/6cf0ee18-4e71-4129-98e8-cc08174e3c3a?expires=1787280300&signature=992432a57dac0197a6bb1e85c6412d882d976b315c1e7c6395183c5f274d9430&req=dScvF857mIRYUfMW1HO4zaj0BHYpQacHTAorLxpdoc8oomz%2Bgbr%2B1HUM7fAY%0Ah4%2FN%0A) ## What happens after enabling the allowlist? @@ -42,7 +42,7 @@ Consider completing the allowlist setup during off-hours to minimize disruption **Important:** The allowlist requires Claude Desktop version 0.13.91 or higher, so users should update the desktop app by clicking “Claude”, then either “Check for updates” or “Restart to update to Claude 0.13.91”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1787244300&signature=3cf00142297228f3bbff46bfcbff02559fdba9c5506bea6caf791b3a8cd3d9f0&req=dScvF857m4hZWfMW1HO4zYUJqYSoDjboCEDZ5AdBjIaLBZnZn1xRfYTXMpHz%0AWOBGhYWgQACzRUJyMzU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781756960/ad18af50c83d35f2673656c23e00/a7ee450f-0c7d-42d6-a75f-fb1bc088cb52?expires=1787280300&signature=3a2278fc35d764e8b15bb17247c8d131d49b034f6af93736f61c193260101dc3&req=dScvF857m4hZWfMW1HO4zYUJqYSoAjLoCEDZ5AdBjIakfQbj6FHX7ptSKNIR%0Atg2%2FQ9VdOuc3APCOtrM%3D%0A) ## Managing allowed extensions @@ -60,7 +60,7 @@ After enabling the allowlist, you can choose which extensions to allow: If you want to remove an extension from the allowlist, click the “...” button and “Remove from allowlist.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1787244300&signature=cf1b86ee9c3476a283cfa19a3df3cbb04286678db5517b9fb64803119fabfc45&req=dScvF857nINaWfMW1HO4zTrxBa8r%2B1OWqXridZhfx1IUYqKGhTODXdaA0Xrs%0ADmzOLpUHzY8dhddfcDo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1781751250/6558c0f59aea7976bd44b0213d76/e750f02b-cd0d-437e-a83f-9ac362cdf456?expires=1787280300&signature=68411b7cbdee145f320d3166dee6b706cdc1aca9fe6996c44c6cd6802a68babd&req=dScvF857nINaWfMW1HO4zTrxBa8r91eWqXridZhfx1KjWmcoM%2Ft56nVNbMZx%0AgUkdPwAracYxCVDkUG0%3D%0A) ## Uploading custom extensions diff --git a/content/support/12618689-claude-code-on-the-web.md b/content/support/12618689-claude-code-on-the-web.md index fa64477b80..e81c398174 100644 --- a/content/support/12618689-claude-code-on-the-web.md +++ b/content/support/12618689-claude-code-on-the-web.md @@ -10,7 +10,7 @@ This feature works with repositories you may not have on your local machine. You Claude Code for web enables asynchronous development workflows. With Claude Code in your terminal or editor, you typically work synchronously: you make a request, wait for Claude to respond, review the changes, then make another request. Synchronous work like this gives you fine-grained control but requires your attention throughout the process. Claude Code on the web handles this differently: you can assign a larger task, let Claude work independently, and return later to review the completed work. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1787244300&signature=32e80be3aa00acb2db0d3f63ed3aebd46427f6fea032e8b9b6bf586c7f65879a&req=dScvEM16m4BaXvMW1HO4zR8%2BAFSCRpl17XrRA1YwWGvj%2BH4wSAqr3WQfDmIL%0AjvYkRYjdSVEicOGSPqw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446157/07ec74cd46317f8278083a317841/6448f3ee-c6df-4417-8a13-90d8c2ca3d55?expires=1787280300&signature=4bc58b3b7669840ef7f8baf6276b8280b5c8f26d55710df6130dd3dd96a9b688&req=dScvEM16m4BaXvMW1HO4zR8%2BAFSCSp117XrRA1YwWGvsHhX%2BLKDwczi8uC1p%0ANRD8Qe9Vw4dJ2y%2Bmb2Q%3D%0A) You can also run multiple tasks in parallel. Since each task runs in its own isolated environment, you can have Claude working on several different issues or repositories simultaneously. Each task proceeds independently and creates its own pull request when complete. More than one task can work on the same repository at the same time. @@ -18,13 +18,13 @@ You can also run multiple tasks in parallel. Since each task runs in its own iso When you start a task, Claude Code on the web creates an isolated virtual machine for your work. Your GitHub repository is cloned into this environment, which comes pre-configured with common development tools and language ecosystems. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1787244300&signature=0ecc3d9499cea11f9791c2e81f2e24263753c64badf5ca791a6dc3d7abeef830&req=dScvEM16m4BaUfMW1HO4zcR0rZE2i%2B3D7DtpMiX%2FBYlpDJnvggBJrKoNKUEH%0AacUQcbgmCBkz6xqaPP8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446158/c092f1383826cb871493f74169d4/97b7cb98-5da2-438e-a920-e170b8b9790e?expires=1787280300&signature=e0188082b0dc1f28554614c1767ff661c7d5250cd004cf927329e75e5074a8f0&req=dScvEM16m4BaUfMW1HO4zcR0rZE2h%2BnD7DtpMiX%2FBYmCwVV%2Bf4550vTVp1TF%0AD7wG761cpr2ML4X3eoU%3D%0A) Claude prepares the environment by running any setup commands you've defined in your repository's configuration. This includes installing dependencies, setting up databases, or running other initialization steps your project needs. If your task requires network access, maybe to install packages or fetch data, you can configure the level of internet access the environment has. Once the environment is ready, Claude begins working on your task. Claude reads your code, makes changes, writes tests, and runs commands to verify the work. You can monitor progress and provide guidance through the web interface if needed. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1787244300&signature=1220175226deaf98636b618a4ba84d379bda44a1e9a122c4a1776d7c8db14dd3&req=dScvEM16m4BaX%2FMW1HO4zVbcTGSB58DNUQl3YqgIJdb3Ph4Y8rl1a2KdBVVw%0AusEsDNc9IQrOt9%2BRV1E%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1786446156/83ecf0a5b98eddc9ffc9694c50f7/353589ce-b678-441d-8909-71b45fa2d065?expires=1787280300&signature=4927338bf4094b6e4f30a26319a264f57e006c9d0ff05587cfa0cb16dbc5f5c9&req=dScvEM16m4BaX%2FMW1HO4zVbcTGSB68TNUQl3YqgIJdZ7Iu2i%2BI748iHxgDg7%0AwarJL2kHbbdb4wiWbRI%3D%0A) When Claude completes the task, it pushes the changes to a new branch in your GitHub repository. You receive a notification and can review the changes, then create a pull request directly from the interface. The pull request includes all of Claude's work, ready for your review and any additional changes you want to make. diff --git a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md index a4c8ee9132..321695e626 100644 --- a/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md +++ b/content/support/12626668-use-quick-entry-with-claude-desktop-on-mac.md @@ -40,7 +40,7 @@ When you first open the updated version of Claude Desktop, you'll see a prompt t Once enabled, double-tapping Option will open a text box where you can type your message and start a new chat. You can also click "New chat" to see your five most recent conversations. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1787244300&signature=242b90e8737609d5c5566b45969b4d333d1a2ea4e1493d6a4c8fd88dbb70ac22&req=dSguFcl2lYJZXPMW1HO4zWggD9lTopiZRC8c%2FcM5c2JnA7TVp76y504X7CGO%0AXS9pd27bsQzppWBjlXs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893088365/2ca4b782dda90abea1fe5f4150af/CleanShot+2025-12-18+at+13_14_30%402x.png?expires=1787280300&signature=9020b114085908cf52f9d62b1c0e143e08e8cef06579569e96664d0c8704d6b3&req=dSguFcl2lYJZXPMW1HO4zWggD9lTrpyZRC8c%2FcM5c2K2atLDGoMP9lMZrp3g%0Am02llPH%2FKbWCmwjnbGU%3D%0A) ### Enable the voice shortcut (optional) diff --git a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md index 50d002c528..206b790687 100644 --- a/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md +++ b/content/support/12883420-view-usage-analytics-for-team-and-enterprise-plans.md @@ -22,7 +22,7 @@ This page includes the following analytics: - Sessions in Cowork -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1787244300&signature=1671b06fd057158c0fa1e4f6cb4068325b1438b4d3854f6db4d2f94d97ec6ecb&req=diUmE8F3mIhZX%2FMW1HO4zZL6waFwn4FyExEG4dCAGDZMjXnXLqeNDkY5Rl9O%0AvzMmC9VkoJoF5umcEyI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515895966/9f231a620f47d49e0ee648152189/848c1787-4eaa-4809-8fd2-1dbe2722560f?expires=1787280300&signature=d5175dd84d56f56f9a45c6af4b56178c9ceb3ada18c42a8604e2572dd25c4f22&req=diUmE8F3mIhZX%2FMW1HO4zZL6waFwk4VyExEG4dCAGDYNxen1Zcl4yxxjCqZt%0A%2F8EpF2OSjSZe46DRIsY%3D%0A) ### Who’s using Claude? @@ -34,7 +34,7 @@ This page includes the following analytics: Use the dropdown on the **Active members and assigned seats** chart to filter by product, including Claude Design. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1787244300&signature=9f95cfd967d730fec25fe4afb2e4c1dfdc0f8aad3199a8e6a3ab14f93fa1a36d&req=diUmE8F3m4JaWPMW1HO4zYEqejCrRpSsYqPRsgaNdTwnAVlyDZha%2BI5GRPh1%0AKXkhp3r8fPOqBotJjLE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896351/4d955858e6662c37489cc1470871/457cf159-8c2a-4403-ba22-cb92cb47e459?expires=1787280300&signature=74764c204d2d2b4103b34e6565a00c5f5b045a7c03f125361cc53d7261d6e532&req=diUmE8F3m4JaWPMW1HO4zYEqejCrSpCsYqPRsgaNdTyELSgwLkdojAB8%2FtXT%0As%2BzirFw4HeaFyy9nCiI%3D%0A) ### How are they using Claude? @@ -48,9 +48,9 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by - How agentic is their work? (beta) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2583875713/e3cb3c329f3b643cb9a3809876b3/image.png?expires=1787244300&signature=a4dff6fa04feb8990c6f93f631dffd12b61e84d47dc775b3a6e5e875d8955065&req=diUvFcF5mIZeWvMW1HO4zciS3a%2FrnrpoDFD6TO7tG4g0Fx8I2mO72UUXUasa%0AB7hlc555xIiwCleEYhc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2583875713/e3cb3c329f3b643cb9a3809876b3/image.png?expires=1787280300&signature=e976f4748af84be67fbc5598668d20c7446f0c0c71e0a6bdb91efadd75f24bb4&req=diUvFcF5mIZeWvMW1HO4zciS3a%2Frkr5oDFD6TO7tG4h0C5yBFaBHT51on2II%0AHW4I1DVn7uiHpsF3EAE%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1787244300&signature=5c865bbbcb6c30ac39c34473f027d12cc903317d98963e9dcc66371b9e20ba32&req=diUmE8F3m4RZWvMW1HO4zR%2BIDoBsufP0LS3kobW3ZgTGMokM8M9KboAXe8T%2B%0A2gTW7VVcCdw%2Bp8Gm5Ro%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896563/abf008596ce5501297a609696362/fce5423c-4769-4b73-9a0a-c50f6407ebea?expires=1787280300&signature=fc0f9cf8259be896807cf0b22f8b22d2207288a389f3156ca0c1be2d40d95397&req=diUmE8F3m4RZWvMW1HO4zR%2BIDoBstff0LS3kobW3ZgTeVlnSR9wNrlXFOSI%2F%0AeA2qsL223nmbfbZNj6M%3D%0A) ### What are the results? @@ -66,7 +66,7 @@ Use the dropdown on the **Active members and assigned seats** chart to filter by - Estimated time saved -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1787244300&signature=ad1dab170086b18ba5fe592970c1397809507b0d9247d93dd12e04593fcb25d4&req=diUmE8F3m4hbWvMW1HO4zfJThCM9rdhFiovaLYNN7RlbLbE%2BQNZh%2FinViLLK%0AyrXk1fURh5LBRV5nkJ4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896943/dd415f03afe56ca38308ef987f86/189e8ebc-5594-4f4b-bd84-e3c11c824d5b?expires=1787280300&signature=ab9b2d1b4f033c351f80b28ab19893bb0701a4f21ab4b08e379be69c00485db4&req=diUmE8F3m4hbWvMW1HO4zfJThCM9odxFiovaLYNN7Rm4EkJPa%2BwIpaReYSoc%0A%2BO30fW7sF%2BDTMfpM1l0%3D%0A) ### How much is Claude costing? @@ -82,9 +82,9 @@ This section includes the following analytics: - Spend by model (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1787244300&signature=a2172a0a76dabb1ea3cd9c4397fc00df42972f54db0490e622c190cd2b27a6ff&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQ9kA6DXeWbBLGZ4vBJUI5Boo1Ic%2BsCJfiA3b%0A59iSsdSDLJDHMj52aho%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896942/b403f2d216fc40b5195911020b8e/446b99f1-3187-4b79-b2be-9f17b1632ff8?expires=1787280300&signature=e492aeece6feacf1968d8085548ad3b0828ece233a2468723113695f8e4773bf&req=diUmE8F3m4hbW%2FMW1HO4zYE%2BQ9kA5DHeWbBLGZ4vBJUU9%2BC%2BTqh9aziD0sdi%0Aqz9aAAXu66HB9X0VP7o%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1787244300&signature=3e67132d70a86f56028645ef41ec57bfc21c68d47723828fd06be808ade78872&req=diUmE8F3m4hbWPMW1HO4zTz0Nu0AI81TC%2BtvTPa1I7EnN6ZqhvjcT7yFoDgF%0AmVN9NNF6nGa4HVJMpJU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515896941/2239ce38639df339b24d5af1cb50/f829bc2a-ee52-4135-9b13-09ef1b7d66d6?expires=1787280300&signature=2e38618989e963f0a66f7803ec2ff50b285224fd94e3a29bb66c1574836bcfe8&req=diUmE8F3m4hbWPMW1HO4zTz0Nu0AL8lTC%2BtvTPa1I7Fw9t2izEiCJlXutf9X%0AVjA7fJiNFg%2BMaJ34em8%3D%0A) ## Export a spend report @@ -160,7 +160,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by chats -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1787244300&signature=f61db2c47429265712054f6beead51df9d60fafbce175f10d03b2bbb213c0e8d&req=diUmE8F3lYZWWvMW1HO4zbhc8fqeZeAiTcfMEUwBBiWRaJymy%2FbcqTH07dNG%0AHfmg5xbuc4DGZ37EFFk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515898793/405db0c492da11886c28a2b82731/71a55afc-1cef-4c50-b7e1-86775cb9a168?expires=1787280300&signature=a59bbcd25b1f3766929fad24a9ea8e52b3c358c223f1b4832ea3bd7b6a0f0f13&req=diUmE8F3lYZWWvMW1HO4zbhc8fqeaeQiTcfMEUwBBiUicEf6w5Jm4USVovXJ%0AQyRCExY1iLe05afhTs4%3D%0A) ### Projects @@ -172,7 +172,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top members by project usage -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1787244300&signature=24c3e12975b6cc30bdf683760568dc045d622b389490ddf6f3acd6df109999bf&req=diUmE8F3lIdeWfMW1HO4zWhGoTubnyehExu5cYiHHN%2Bm3DNxkKdPX80VyHbY%0AIXnA4zOfpWuPsj420A0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899610/91d93108f0767e795fb9e488e882/71607d6d-dff1-4a13-a445-aa1d79850eed?expires=1787280300&signature=9fd4e57b077babdd8c99d8b072f31528ad38fa2012912f7c94e1580786e656d2&req=diUmE8F3lIdeWfMW1HO4zWhGoTubkyOhExu5cYiHHN%2BM%2FqhuKa7htIU0dYPA%0AF77zdur%2B2gk%2F1%2FM0n9A%3D%0A) ### Artifacts @@ -182,7 +182,7 @@ Navigate to **[Analytics > Claude Chat](https://claude.ai/analytics/usage)** to - Top 10 users by artifacts generated (month-to-date, quarter-to-date, year-to-date, 1 year) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1787244300&signature=f1befedcad12734f66f65df0c77d73fb6ee94369b55e674f650f11263eeae5b5&req=diUmE8F3lIlcUfMW1HO4zcSk4r3QeurDjHDogqK0V%2BwGWzX3XKX4A2dzFa6w%0AJ8RUJeSjU7U0j%2BsALlY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515899838/33d737f2357d6e485704669962ae/43faadc3-47da-4a93-bbb7-47a7983e7441?expires=1787280300&signature=79cc0863c8edb9c0918a90e0452af9119512a6321e8a49ad4a4a508c82db7616&req=diUmE8F3lIlcUfMW1HO4zcSk4r3Qdu7DjHDogqK0V%2BxVQQCR%2BeRkd4m8IMrt%0AKTRTJXknZ%2F2tt2JkVII%3D%0A) --- @@ -278,7 +278,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view - Daily, weekly, and monthly active Cowork users -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1787244300&signature=0a7be88c9be33c5382bdb456561ca6d0257fc3d790eeecab4f0fd1eac06161b4&req=diUmE8B%2BnIVXUPMW1HO4zX7WEo%2BzWUWrFSi1Z3SzLLtiBsMqV7FuYdPHCCtN%0AzVvDDOM4rSd8g%2BU54o0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2515901489/8005693d55b7fefbfe9233258d39/106c22a0-3f47-47a6-abbd-4788dd70f218?expires=1787280300&signature=a423a9b04ed5cf1c4ed7b67979c09b6ced190937fe60ad12af8b749ed47adaad&req=diUmE8B%2BnIVXUPMW1HO4zX7WEo%2BzVUGrFSi1Z3SzLLtpvDAy08KteLThrz2Z%0AFGSCcch9%2F7bplb%2BzPso%3D%0A) **Note:** Cowork analytics are available alongside Chat and Claude Code data in the **[Analytics API](https://platform.claude.com/docs/en/manage-claude/analytics-api)**. @@ -288,7 +288,7 @@ Navigate to **[Analytics > Cowork](https://claude.ai/analytics/cowork)** to view When your admin turns on individual usage analytics, any member of the organization can see their own usage broken down by product, model, and skill, along with where they stand against any spend limits set for them. Individual usage analytics are available in **[Settings > Usage](https://claude.ai/settings/usage)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1787244300&signature=78fed5c314140779336fe1f59ebbc3e5f90dc8f6f9c92b723cce23bcd4b81c70&req=diUkFcB%2Bm4JdUfMW1HO4zfveB6jHeO%2FZWGUKUw6QS4%2BYP7pkzWKXIvANp1PX%0AFiZJPla5TVGG7VjQbzY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2533906328/1f5cd0a57def40676410f8f379b4/member-usage-30d-model.png?expires=1787280300&signature=9297891b8ee638e5e1c1a842baf030a2cda90ede6a18df3066a5d5728742a8dc&req=diUkFcB%2Bm4JdUfMW1HO4zfveB6jHdOvZWGUKUw6QS4%2F%2BPL97m3cO3GvDsShW%0AX2u17GPQ0HiuNlWOL5M%3D%0A) --- diff --git a/content/support/12902446-claude-in-chrome-permissions-guide.md b/content/support/12902446-claude-in-chrome-permissions-guide.md index 0c2e34bc64..ce3255246a 100644 --- a/content/support/12902446-claude-in-chrome-permissions-guide.md +++ b/content/support/12902446-claude-in-chrome-permissions-guide.md @@ -28,7 +28,7 @@ In "Manually approve," Claude checks with you before it acts. What that looks li Claude creates a plan from your prompt, which you can approve before Claude starts. The plan specifies which websites you're allowing Claude to access, as well as the approach it will follow: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1787244300&signature=9f3b63cfc2b3e541d3c3856c96d7675db05c3cffa4b36cdc3f0a398bfc9acd67&req=dSgjFcp8nYZdXvMW1HO4zYqyZcVP%2BIa0gN0ADj5oqFAhqSEBi0%2F2TakFzLFy%0AimyuNH2Zyzu4DtNzl5E%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1843320727/8d1c859ae9b8e0cdb536d024bf40/9bc3d239-8eb6-4bae-a032-a236f88ee606?expires=1787280300&signature=806e0e776c9c52a1f23852436a0e0cc00b9529210b84a1c1f32cc3d9e287a768&req=dSgjFcp8nYZdXvMW1HO4zYqyZcVP9IK0gN0ADj5oqFA%2FmVlukfbamVvkodqM%0AK%2FawBCrhR2f%2FqXX5ato%3D%0A) Note that Claude will only use the websites listed in the plan, so you’ll need to manually approve any additional access requests. @@ -62,7 +62,7 @@ When you choose "Skip all approvals," Claude doesn't pause to ask, and nothing c There are some websites on which Claude requires approval for every action. If you navigate to one of these sites, a **New permissions required** prompt will appear in the extension side panel, Claude Cowork, or Claude Code where Claude will ask for permission before accessing the page or taking any action. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604970825/d7b961271be69e7541b406df1efd/d845324e-6b4a-4f54-83b9-0bea86ec09c6?expires=1787244300&signature=962d470751c1979c50c59e97be6a8119e00b96735f50a4bcc756468d9a662c69&req=diYnEsB5nYldXPMW1HO4zZ3NqmFyjCjv7A4lHPBihAVR21VRheinIOUhV7bN%0A9KCBLEDqbGFKPdfVgCo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2604970825/d7b961271be69e7541b406df1efd/d845324e-6b4a-4f54-83b9-0bea86ec09c6?expires=1787280300&signature=97c24db794e0c1a0729249cf132da70b8510da9a975f975aad83e92ea5de742e&req=diYnEsB5nYldXPMW1HO4zZ3NqmFygCzv7A4lHPBihAVS%2BQEOAUt199mUTC%2Fi%0Ae4M3oi3F4sxEH%2Fo1KGo%3D%0A) ### Permission options diff --git a/content/support/12997503-team-plan-billing-faqs.md b/content/support/12997503-team-plan-billing-faqs.md index e587653b3a..7fd343df28 100644 --- a/content/support/12997503-team-plan-billing-faqs.md +++ b/content/support/12997503-team-plan-billing-faqs.md @@ -18,7 +18,7 @@ Your organization's billing address determines where your invoices are sent. You If you want to use a name other than the one tied to your payment method, an organization Owner should check the "Use a different name on invoices" box when adding or updating your payment method in **[Organization settings > Billing](https://claude.ai/admin-settings/billing)**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1787244300&signature=61c29857843563966843331e3b600b1dccb45c79b7224185c06b0d70fd54c76e&req=dSklFMh6mINaWvMW1HO4zRZTxF3Dv8%2FQKAqLF4ERnlV9H94SB2Cvd%2BPiSMXG%0AHXYv1n2Y9h1PqErrgZI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922145253/f2e3d4e0fe43a2ea07e89244764c/image.png?expires=1787280300&signature=3dec6a3b9c4c6b1d81c918785b6071a3584d669f3b08a020331b407f0f701acd&req=dSklFMh6mINaWvMW1HO4zRZTxF3Ds8vQKAqLF4ERnlWzzeqqWA2euiine7cC%0AnVbatzH4JvmiEySMvY0%3D%0A) ## When will I be billed? diff --git a/content/support/13119606-provision-and-manage-skills-for-your-organization.md b/content/support/13119606-provision-and-manage-skills-for-your-organization.md index 03fdb5e275..fe98ed7998 100644 --- a/content/support/13119606-provision-and-manage-skills-for-your-organization.md +++ b/content/support/13119606-provision-and-manage-skills-for-your-organization.md @@ -12,7 +12,7 @@ Before you can provision skills for your organization, you must navigate to **[O ## Provision skills for everyone -When you upload a skill through organization settings, it becomes available to everyone in your organization in **[Customize > Skills](https://claude.ai/customize/skills)**. Individual members no longer need to upload the same skill themselves. +When you upload a skill through organization settings, it becomes available to everyone in your organization in **[Customize > Skills](https://claude.ai/customize/skills)**. Individual users no longer need to upload the same skill themselves. **To provision a skill:** @@ -24,31 +24,51 @@ When you upload a skill through organization settings, it becomes available to e 4. The skill is immediately provisioned to all users in your organization. -Admin-provisioned skills are enabled by default for everyone, but members can toggle individual skills off if they choose. This gives your organization consistent, approved workflows while letting members customize their own experience. +Admin-provisioned skills are enabled by default for everyone, but users can toggle individual skills off if they choose. This gives your organization consistent, approved workflows while letting users customize their own experience. --- ## Provision skills to specific groups -Provisioning a skill through **[Organization settings > Skills](https://claude.ai/admin-settings/skills)** gives it to everyone. To give a skill to only some members, bundle your skills into a plugin and assign that plugin to a group. The group's members see those skills, and members outside the group don't. +Provisioning a skill through **[Organization settings > Skills](https://claude.ai/admin-settings/skills)** gives it to everyone. To give a skill to only some users, bundle your skills into a plugin and assign that plugin to a group. The group's members see those skills, and members outside the group don't. For example, if you have 10 skills for your marketing team, add them to a plugin and assign it to the marketing group. Only that group gets those skills. -Skills provisioned this way appear in chat, on the web and the Chat tab in Claude Desktop, as well as in Cowork. Group targeting you've already set up for Cowork carries over to chat with no extra steps. +Skills provisioned this way appear in chat, on the web and the Chat tab in Claude Desktop, as well as in Claude Cowork. Group targeting you've already set up for Cowork carries over to chat with no extra steps. -To set this up, see **[Manage plugins for your organization](https://support.claude.com/en/articles/13837433-manage-claude-cowork-plugins-for-your-organization)**. +To set this up, see **[Manage plugins for your organization](https://support.claude.com/en/articles/13837433)**. --- -## Control skill sharing between members +## Control whether users can create skills -In addition to provisioning skills top-down, you can let members share skills they've built with each other. Three independent toggles control this: +By default, users can create their own skills in Claude and upload skill files to their personal skills list. If you'd rather users only use skills you've provisioned, you can turn this off for your organization. -- **Skill sharing:** Members can share a skill with specific colleagues. Recipients see the skill in the **Shared with you** section of their skills list. +To turn off skill creation for users: -- **Share with organization:** Members can publish a skill to the organization directory, where anyone can find and install it. +1. Navigate to **[Organization settings > Skills](https://claude.ai/admin-settings/skills)**. + +2. Turn off **User-created skills**. + +When **User-created skills** is off: + +- Users can't create skills in Claude or upload skill files. -- **Share with groups:** Members can share a skill with an entire group. Recipients see the skill in the **Shared with you** section of their skills list, the same as skills shared with individuals. +- Skills you've provisioned and Anthropic's built-in skills stay available, and users can still enable and use them. + +**Note:** If your organization uses custom roles, a user also needs the **Create skills** capability on their role. The organization setting is the main switch: when it's off, users can't create or upload their own skills, regardless of role, but Owners can still provision skills for the organization. When it's on, Enterprise plan users on custom roles still need the role capability. Learn more about **[managing custom roles on Enterprise plans](https://support.claude.com/en/articles/13930452)**. + +--- + +## Control skill sharing between users + +In addition to provisioning skills top-down, you can let users share skills they've built with each other. Three independent toggles control this: + +- **Skill sharing:** Users can share a skill with specific colleagues. Recipients see the skill in the **Shared with you** section of their skills list. + +- **Share with organization:** Users can publish a skill to the organization directory, where anyone can find and install it. + +- **Share with groups:** Users can share a skill with an entire group. Recipients see the skill in the **Shared with you** section of their skills list, the same as skills shared with individuals. Group and organization sharing toggles are off by default. You can enable them in **[Organization settings > Skills](https://claude.ai/admin-settings/skills)**. @@ -64,36 +84,36 @@ Once your organization’s settings allow skill sharing, users can begin sharing ### How shared skills differ from provisioned skills -| | **Owner-provisioned** | **Shared peer-to-peer** | **Shared org-wide** | **Shared with a group** | -| ----------------------------- | ---------------------- | ------------------------------------- | ----------------------- | ------------------------------------- | -| **Who can share** | Owners only | Any member (if enabled) | Any member (if enabled) | Any member (if enabled) | -| **Where it appears** | Everyone's skills list | Recipient's "Shared with you" section | Organization directory | Recipient's "Shared with you" section | -| **Can recipients remove it?** | Disable only | Disable or delete | Disable only | Disable only | -| **Requires owner approval?** | Owner uploads directly | No | No | No | +| | **Owner-provisioned** | **Shared peer-to-peer** | **Shared org-wide** | **Shared with a group** | +| ----------------------------- | ---------------------- | ------------------------------------- | ---------------------- | ------------------------------------- | +| **Who can share** | Owners only | Any user (if enabled) | Any user (if enabled) | Any user (if enabled) | +| **Where it appears** | Everyone's skills list | Recipient's "Shared with you" section | Organization directory | Recipient's "Shared with you" section | +| **Can recipients remove it?** | Disable only | Disable or delete | Disable only | Disable only | +| **Requires owner approval?** | Owner uploads directly | No | No | No | -**Important:** There's no approval workflow for org-wide sharing. If you enable **Share with organization**, any member can publish a skill to the directory without review. Consider enabling peer-to-peer sharing only if this is a concern. +**Important:** There's no approval workflow for org-wide sharing. If you enable **Share with organization**, any user can publish a skill to the directory without review. Consider enabling peer-to-peer sharing only if this is a concern. ### Monitor sharing activity Skill sharing events are captured in the audit log and Compliance API as `role_assignment` events. You can see who shared a skill, with whom, and whether it was peer-to-peer, organization-wide, or group. -The audit log doesn't capture the contents of shared skills—only the share event itself. There's no admin dashboard to browse or inspect the contents of skills shared between members. +The audit log doesn't capture the contents of shared skills—only the share event itself. There's no admin dashboard to browse or inspect the contents of skills shared between users. --- -## How members see provisioned and shared skills +## How users see provisioned and shared skills -Skills appear for each member in **[Customize > Skills](https://claude.ai/customize/skills)**, organized into three sections: +Skills appear for each user in **[Customize > Skills](https://claude.ai/customize/skills)**, organized into three sections: -- **Personal skills:** Skills the member has created or uploaded. +- **Personal skills:** Skills the user has created or uploaded. -- **Shared with you:** Skills colleagues have shared directly with a member. These appear grayed out until enabled. +- **Shared with you:** Skills colleagues have shared directly with a user. These appear grayed out until enabled. -- **Organization skills:** Skills an owner has provisioned and skills members have shared organization-wide. Members install these from the directory. +- **Organization skills:** Skills an owner has provisioned and skills users have shared organization-wide. Users install these from the directory. -Owner-provisioned skills are marked with a visual indicator so members can distinguish them from other skill types. Members can click on any skill to preview its contents and description. +Owner-provisioned skills are marked with a visual indicator so users can distinguish them from other skill types. Users can click on any skill to preview its contents and description. -For more on how members browse and install from the directory, see **[Browse skills, connectors, and plugins in one directory](https://support.claude.com/en/articles/14328846-browse-skills-connectors-and-plugins-in-one-directory)**. +For more on how users browse and install from the directory, see **[Browse skills, connectors, and plugins in one directory](https://support.claude.com/en/articles/14328846-browse-skills-connectors-and-plugins-in-one-directory)**. --- @@ -101,7 +121,7 @@ For more on how members browse and install from the directory, see **[Browse ski The **Organization skills** section in **[Organization settings > Skills](https://claude.ai/admin-settings/skills)** displays all skills provisioned for your organization. Use search and the section headings to navigate them. -To remove a skill from your organization, locate it in the **Organization skills** list and select the option to remove it. Once removed, the skill will no longer appear in members' skills lists in **[Customize > Skills](https://claude.ai/customize/skills).** +To remove a skill from your organization, locate it in the **Organization skills** list and select the option to remove it. Once removed, the skill will no longer appear in users' skills lists in **[Customize > Skills](https://claude.ai/customize/skills).** **Note:** Only owners can add or remove organization-wide skills. Individual users cannot delete provisioned skills, though they can toggle them off for their own use. @@ -109,7 +129,7 @@ To remove a skill from your organization, locate it in the **Organization skills ## Scan skills and plugins for malicious content (beta) -On the Enterprise plan, you can turn on skill scanning for your organization. When it's on, Claude checks each third-party skill and plugin your members upload or edit for malicious content before it can run. Scanning is off by default, and it applies only to new uploads and edits, so skills and plugins already in your organization keep working. +On the Enterprise plan, you can turn on skill scanning for your organization. When it's on, Claude checks each third-party skill and plugin your users upload or edit for malicious content before it can run. Scanning is off by default, and it applies only to new uploads and edits, so skills and plugins already in your organization keep working. To turn on skill scanning for your organization: @@ -119,15 +139,15 @@ To turn on skill scanning for your organization: If you use custom roles, you can further define who scanning applies to by turning on the **Skill and plugin security scanning** capability for roles that should have access to skill scanning. -Here's what your members see: +Here's what your users see: - A skill or plugin that passes the scan installs normally. -- A skill or plugin that may carry risk stays usable behind a caution banner the member acknowledges. +- A skill or plugin that may carry risk stays usable behind a caution banner the user acknowledges. - A skill or plugin with malicious content is blocked and can't be used. -A blocked skill can't be overridden by the member who uploaded it, and can't be approved for the organization at this time. Scanning isn't available for organizations using customer-managed encryption keys (CMEK), zero data retention (ZDR), or HIPAA configurations. Learn more about **[skill and plugin scanning](https://support.claude.com/en/articles/15927065)**. +A blocked skill can't be overridden by the user who uploaded it, and can't be approved for the organization at this time. Scanning isn't available for organizations using customer-managed encryption keys (CMEK), zero data retention (ZDR), or HIPAA configurations. Learn more about **[skill and plugin scanning](https://support.claude.com/en/articles/15927065)**. --- @@ -135,10 +155,12 @@ A blocked skill can't be overridden by the member who uploaded it, and can't be - **Test skills before provisioning:** Upload and test skills on your own account first to verify they work as expected before distributing them organization-wide. -- **Scope specialized skills to groups:** When a skill is only relevant to one team, bundle it into a plugin and assign it to that group instead of provisioning it to everyone.**Use descriptive names:** Give skills clear names that help users understand their purpose at a glance. +- **Scope specialized skills to groups:** When a skill is only relevant to one team, bundle it into a plugin and assign it to that group instead of provisioning it to everyone. + +- **Use descriptive names:** Give skills clear names that help users understand their purpose at a glance. - **Write clear descriptions:** The skill's description helps Claude determine when to use it automatically. Ensure descriptions accurately reflect what the skill does. -- **Consider default status carefully:** Enable skills by default when they're broadly useful to most users.Keep specialized skills disabled by default for the members who don't need them. +- **Consider default status carefully:** Enable skills by default when they're broadly useful to most users. Keep specialized skills disabled by default for the users who don't need them. -- **Decide on sharing deliberately:** Organization-wide sharing has no approval step. If you want to review skills before they reach everyone, keep organization-wide sharing off and ask members to submit skills to an owner for provisioning instead. \ No newline at end of file +- **Decide on sharing deliberately:** Organization-wide sharing has no approval step. If you want to review skills before they reach everyone, keep organization-wide sharing off and ask users to submit skills to an owner for provisioning instead. \ No newline at end of file diff --git a/content/support/13132885-set-up-single-sign-on-sso.md b/content/support/13132885-set-up-single-sign-on-sso.md index 08d3ac55bc..7115e99d6d 100644 --- a/content/support/13132885-set-up-single-sign-on-sso.md +++ b/content/support/13132885-set-up-single-sign-on-sso.md @@ -42,7 +42,7 @@ You can verify multiple domains for a single organization, but all domains must 3. Enter the domain(s) you want to verify in the **Update organization email domains** modal and click the “+” button: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1787244300&signature=ea46f5cf57656d0500193b59a316dc84f886007d1a9f1a52ba8731cf9ddf37c6&req=diQuHsF6noNXW%2FMW1HO4zSdmHns7%2FsCPe3H0OpmIzWGKzU2h3n7yxjZJ40L2%0ANTZY%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2498843282/561d5ceb1c3a5df75bdfee8bfc3f/d2491145-362d-490b-bdcf-66a0a7656ddc?expires=1787280300&signature=edfeb2364e41caccf4071d613ee917d573ecbd67d858191e460af82356763665&req=diQuHsF6noNXW%2FMW1HO4zSdmHns78sSPe3H0OpmIzWErS1G%2FBmoMn22stOoN%0AaNBn%0A) 4. Click “Save” when you’re finished adding domains. @@ -50,7 +50,7 @@ You can verify multiple domains for a single organization, but all domains must 6. Enter your domain in the text box and click “Continue”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1787244300&signature=7e79d39c32dba0f80f6c7242ca8df5cfb61a5565325b5425c29c143868eba708&req=diAjEcl6n4dcWfMW1HO4zWHctRqVk9WpyoyXAW0OlXrWr%2BBXhubF8QjRaAod%0ABbFp%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047042630/0617a562cd28a7ff0e607d66a30b/6bd08e1d-2b65-40ab-bc79-a257153854c1?expires=1787280300&signature=aab92a1104a497a2450f9ff2d2574481b2a7d46798046bab72c5e52089230d39&req=diAjEcl6n4dcWfMW1HO4zWHctRqVn9GpyoyXAW0OlXrda3F4U2Oa7E%2B2x9GT%0A4ItM%0A) 7. The setup screen displays a TXT record. **Copy the full Value using the copy button**—it begins with `anthropic-domain-verification-` and is longer than what's visible in the box. In your DNS provider, add a TXT record with **Host/Name** set to `@` (the root of your domain) and **Value** set to the copied string. Add it alongside any existing TXT records; don't replace them. The value is case-sensitive, so paste it exactly. @@ -76,7 +76,7 @@ Clicking "Refresh" re-checks your DNS; it won't show Verified until the publishe If the record is correct and propagated but the status still shows Pending, contact Support. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1787244300&signature=3f9a5a1a297e567a4fdca9eccf06d0d588f529b1b4730e7ebd165182da908b92&req=diAjEcl6mYVWX%2FMW1HO4zVjmWS4Ca3C6PM2D8ZcdgrgvqqSxUAZlQCGcX66F%0AoJfzy0JGxBLVsAKWYxA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2047044496/b8df54a0331784cc9ae8f00112aa/bf9609c1-dc93-4665-a066-4cae2fe4b002?expires=1787280300&signature=a34341b3ba5ec8dbdd6625bb9e5a3791662ddd2f29ac04043770d882e7e01dc4&req=diAjEcl6mYVWX%2FMW1HO4zVjmWS4CZ3S6PM2D8Zcdgrj4CuZerovZAI5xSXC%2B%0ArKqlrjUEJ2swRzdlYtA%3D%0A) **Note:** Once your domain is verified, you'll see a **Restrict organization creation** toggle under **Security** on the Organization and access organization settings page. Enable this if you want to prevent users from creating new Claude or Console organizations—including personal accounts—using your verified domains. @@ -116,7 +116,7 @@ For IdP-specific setup instructions, see: You can now choose to toggle on **Require SSO for Console** and/or **Require SSO for Claude,** on the **Organization and access** page, under the **Authentication** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1787244300&signature=7f7a8ea2e58b87fa708f271cd133547c0104a468d5504e92bb8db4293f66f55e&req=diMmFM93nYNfWfMW1HO4zdAICwijBngJItXtKivx6ZFgNkVb0nvVTDOV3AFE%0A4d113qBQiamrEoDBFyM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312690200/bd2403586d4f6651ccd79e2a45af/b9f8d7ce-0def-49d9-bfb2-3a14352d7214?expires=1787280300&signature=10533c671b3f0f2f2f5716b5d053c9a90822d96894ba81d6bf5361b26aeb84ba&req=diMmFM93nYNfWfMW1HO4zdAICwijCnwJItXtKivx6ZHUY%2FvK5JyCG%2BrvegEv%0AJEm%2FTmVYq1k33bzZZx0%3D%0A) When SSO is required, users must use the “Continue with SSO” option to log in to their Claude/Console accounts. When SSO is not required, they will have the option to choose “Continue with SSO” or “Continue with email.” diff --git a/content/support/13133195-set-up-jit-or-scim-provisioning.md b/content/support/13133195-set-up-jit-or-scim-provisioning.md index 1c6d77931e..06dbb726d2 100644 --- a/content/support/13133195-set-up-jit-or-scim-provisioning.md +++ b/content/support/13133195-set-up-jit-or-scim-provisioning.md @@ -24,17 +24,21 @@ Once SSO is configured, you need to decide how users will be provisioned to your Use this table to help decide which provisioning mode is right for your organization: -| **Mode** | **Provisioning** | **Role and seat type changes** | **Removal** | -| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| Invite only | Users are manually added | Roles and seat types are manually changed | Users are manually removed | -| Just-in-time (JIT) | Users assigned to your IdP app are provisioned at login with the User role | Roles and seat types are manually changed | Manual removal required: users removed from your IdP app can no longer log in, but remain in the user list until they attempt to log in or are removed | -| JIT + group mappings | Users in at least one mapped group are provisioned at login with the highest-permissioned role from their group memberships | Roles and seat types update on next login based on group membership | Users without group access can't log in but remain in the list until login attempt or manual removal | -| SCIM directory sync | Users assigned to your IdP app are automatically provisioned to all organizations joined to your parent org. | Roles and seat types are manually changed | Users removed from your IdP app are automatically removed | -| SCIM + group mappings | Users in at least one mapped group are automatically provisioned, with appropriate role, to just the org(s) joined to the parent org where that group is added. | Role and seat types changes automatically propagate based on group membership | Automatic removal when group access is revoked | +| **Mode** | **Provisioning** | **Role and seat type changes** | **Removal** | +| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| Invite only | Users are manually added | Roles and seat types are manually changed | Users are manually removed | +| Just-in-time (JIT) | Users assigned to your IdP app are provisioned at login with the User role | Roles and seat types are manually changed | Manual removal required. JIT never removes members automatically. If you unassign someone from your IdP app, they can no longer log in, but they stay in your member list and keep their seat until an admin removes them. | +| JIT + group mappings | Users in at least one mapped group are provisioned at login with the highest-permissioned role from their group memberships | Roles and seat types update on next login based on group membership | Mostly manual. A user who is removed from all of your mapped groups (but still assigned to the app) is removed from the org the next time they log in. A user you unassign from the app entirely can no longer log in, but stays in your member list and keeps their seat until an admin removes them. | +| SCIM directory sync | Users assigned to your IdP app are automatically provisioned to all organizations joined to your parent org. | Roles and seat types are manually changed | Users removed from your IdP app are automatically removed | +| SCIM + group mappings | Users in at least one mapped group are automatically provisioned, with appropriate role, to just the org(s) joined to the parent org where that group is added. | Role and seat types changes automatically propagate based on group membership | Automatic removal when group access is revoked | + +**Note:** To remove a JIT user permanently, remove them in Claude and unassign them in your IdP. A user you remove only in Claude will be re-added the next time they log in with SSO. Both JIT and SCIM can be combined with **Enable group mappings** to control role or seat tier assignment based on IdP group membership. If you select either of these options for your provisioning mode, **Enable group mappings** will appear within the **User provisioning** section: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1787244300&signature=4fbe7e90d7d5b2dea1a339f664660bdf9bcb40777b4ee6b634f5f0dcef448083&req=diMmFM5%2Bm4FWUPMW1HO4zXBDQ6xWCV51xFMG%2BIEvQScZ0zo68iMWEE06evEC%0AwC8Y2IAfTcKABUsyymI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312706099/35d5d3ec149880a96bb7acec59f6/a4cfce55-86bf-40b0-b455-c8f412d48e9e?expires=1787313600&signature=9443e89a178c77e3c730700e0de2072791590d7d2abb0b07c67b971b5842e90e&req=diMmFM5%2Bm4FWUPMW3nq%2BgfvyY15K9gpEjr449Ml26XSC1kOFPRQVc6ECDB%2B5%0AVwHwYbf4LllgDAqG%2BXrNtTeNoso%3D%0A) + +**Important:** Group mappings set a user’s role type and seat tier only. Users with the Custom role get their permissions from groups in Claude, and those groups sync from your IdP only when your provisioning mode is SCIM directory sync. With JIT, you need to create groups and add users to them manually in **[Organization settings > Groups](https://claude.ai/admin-settings/groups)**. If you map an IdP group to the Custom role under JIT without doing this, those users have no permissions when they log in. Learn more about **[managing groups on Enterprise plans](https://support.claude.com/en/articles/13799932)**. ### Available roles and seat tiers @@ -118,13 +122,13 @@ Once your IdP is connected, continue to Step 3. 4. Toggle **Enable group mappings** on (if it’s not already): -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1787244300&signature=ffa12d3aa9ac56a7309c9c70742a020d0778d1fd8d13079ccfc16b9c491db1c8&req=diMmFM5%2FmYdcXPMW1HO4zeBEbsLak%2F5Lyb72rapuHpPlYL0bTe6x5kC2LH2Y%0AwxSr%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312714635/b57870b51e6511c8293637bceee2/da1ceabc-b6bc-451b-9cda-24ff6aa90d02?expires=1787313600&signature=c19a4b1bfc622b2fb9fab2bd38b4c51cf453c628200feb70ec7d1d78ec2d07fb&req=diMmFM5%2FmYdcXPMW3nq%2BgQ152WYnPUjzZjkgm2WmwAIO8BxCUO4GfZdJ%2B78l%0ANSKzXtUlVSCt0H5rIJlr2%2BCNgS8%3D%0A) 5. In the **Enable group mappings** section, click “Add” next to each role and select the corresponding group from your IdP in the dropdown. 1. When using group mappings, you *must* assign all users to a role-based group in order to ensure they’re provisioned an account. Assigning users to seat-tier based groups is optional. - 2. You can map an IdP group to the “Custom” role. Members assigned this role have no default permissions—their access is determined entirely by the custom roles assigned to their groups in Claude. + 2. You can map an IdP group to the “Custom” role. Users assigned this role have no default permissions; their access is determined entirely by the custom roles assigned to their groups in Claude. If you use JIT, add these users to groups manually in **[Organization settings > Groups](https://claude.ai/admin-settings/groups)** before they log in, since JIT doesn't sync group memberships from your IdP. 6. **For all plans except single-seat Enterprise:** In the **Assign seat tiers to IdP groups** section (optional), click "Add" next to each seat type and select the corresponding group from your IdP. If a user isn't assigned to a seat type group, they will be assigned to the highest available type by default. @@ -170,13 +174,23 @@ Verify you have enough seats purchased and available to add members to your org. 4. **For SCIM:** Click "Sync" to prompt an immediate sync, or wait for the automatic sync cycle: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1787244300&signature=ec72215e2635e65177739ac8dbef0a3aab645b45e9383484bbf0b34680313efc&req=diMmFM5%2FmoVdWPMW1HO4zZ9La1qvHc7B5hujYvMis4f%2BMx9jP%2F1onlykhKPH%0AE7nd%0A) + ![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312717421/c97fce49ad17d4660880a05fbaaf/59fbfa2a-1072-4662-8ca5-102970d5a795?expires=1787313600&signature=a9819ba34099b0b2998e9df76dd611101b93e169b719424efec46184f1520bd1&req=diMmFM5%2FmoVdWPMW3nq%2BgREJfJk7qyYnKUy7lv2I5oeHsKxypvOOBfR8ddxc%0AX4TN8aokENf%2B57rRmLG65koUomE%3D%0A) + +### Users mapped to the Custom role can't access anything after logging in + +This happens when your provisioning mode is JIT and an IdP group is mapped to the Custom role. JIT assigns the role type but doesn't sync group memberships from your IdP, so these users aren't in any group with a custom role attached and have no permissions. + +To fix this, do one of the following: + +1. Add the affected users to the appropriate groups manually in **[Organization settings > Groups](https://claude.ai/admin-settings/groups)**. Learn more about **[managing groups on Enterprise plans](https://support.claude.com/en/articles/13799932)**. + +2. Switch your provisioning mode to SCIM directory sync, which syncs groups and their memberships from your IdP. Learn more about **[how SCIM sync works](https://support.claude.com/en/articles/14499648)**. ### I lost Admin/Owner access after enabling group mappings This happens when the person configuring group mappings isn't assigned to a group mapped to an Admin or Owner role, causing their permissions to be downgraded to User. -To fix this: +To fix this, do one of the following: **Option 1: Have another Admin/Owner reinstate your role** diff --git a/content/support/13163631-configuring-session-security-settings.md b/content/support/13163631-configuring-session-security-settings.md index 9da74562f9..dc99d2c26d 100644 --- a/content/support/13163631-configuring-session-security-settings.md +++ b/content/support/13163631-configuring-session-security-settings.md @@ -18,7 +18,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1787244300&signature=f707a066e1fac189e3d7d9d81179b4acf3a17422fcdd624cd47db1c4741c2299&req=dSgvHs14lIVcX%2FMW1HO4zQNx6%2BUlR15Tg%2F6XaftFnjz03hzOG1UVxvvOE3%2B%2B%0AQ86E5%2FUJAVd%2FNCZA4k8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469436/1725e63ea1a2615948faecf4ec73/9bd276a1-7329-414d-87a1-d04dac93fff7?expires=1787280300&signature=f35ce7bb8da1fde8340154f8139952f29ffa5adc5ed86259581b4133dee47957&req=dSgvHs14lIVcX%2FMW1HO4zQNx6%2BUlS1pTg%2F6XaftFnjyi0xobOBnd61fN7Qfv%0AtD8rVvjSao9xOLlPVJ8%3D%0A) ### For Console Admins @@ -32,7 +32,7 @@ Session duration controls allow Enterprise and Console Admins to set a maximum s 5. Confirm your selection by clicking “Enable.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1787244300&signature=9611c88d8b930d5717c25da4845d78a04e94e118e07bbc502728e9eca56e4ff5&req=dSgvHs14lIVcXPMW1HO4zWzx2L40I3siXZ5D7eVpMtfR5WcS4LfhUH0VX4yV%0A2AvMR4bQGJWwdkjb2ns%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469435/7a766bbe02e61c7d8f05deb5b8f0/b0bda400-47c6-43dd-9907-131ebe180b36?expires=1787280300&signature=a80a807af6f2795c2df8bdc669414f8ac7848d48875590cd4b03f189441213fd&req=dSgvHs14lIVcXPMW1HO4zWzx2L40L38iXZ5D7eVpMtcMW%2BH9v9NYSWg9tY95%0AVPhhE9lysXAsxR4ZIUM%3D%0A) ### What happens after enabling shortened session length? @@ -50,7 +50,7 @@ You can change the session duration at any time by selecting a new value from th - Sessions scheduled to expire beyond the new duration will have their expiration shortened accordingly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1787244300&signature=668b70292e3fc219c47143321e736df4da2ce311f549a69f6fb2b83be8aef2da&req=dSgvHs14lIVcXvMW1HO4zZ7mWs%2BZ4z2gA00cbyPOLDWmCUXqTCZbMh9mry%2BK%0AeqxUjKHeEiJAFeGzGFs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1888469437/46ac5bc55484ca01556d87a5ade7/b01a7651-ad65-4b32-93ff-16dbc9ca97c0?expires=1787280300&signature=01618adae0b66890487335cb0c0ee4896331665ed93445aa10a03c5cc4e46ace&req=dSgvHs14lIVcXvMW1HO4zZ7mWs%2BZ7zmgA00cbyPOLDU5HiNix2jwZVpm7UGh%0AEl6OXUqrVYYxiRrxhU8%3D%0A) ## Disabling session length settings diff --git a/content/support/13189465-log-in-to-your-claude-account.md b/content/support/13189465-log-in-to-your-claude-account.md index 9a47020bfb..a5f59703e3 100644 --- a/content/support/13189465-log-in-to-your-claude-account.md +++ b/content/support/13189465-log-in-to-your-claude-account.md @@ -2,7 +2,7 @@ When you open Claude on a web browser ([claude.ai](http://claude.ai)), the desktop app, or a mobile app, you will see two different options for logging in to your Claude account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1787244300&signature=6930dc6559bbd6766315895c957a7cb89100505bd88187803003de90bc3564b3&req=dSguFct%2Fm4lfXfMW1HO4zXg5BoWO5xa3zWhrqpWiTMk1qhGvT1V7HXShQEnk%0A6K4fVmKAkJfsB2%2BI59A%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1893216804/f2209c3ec6cf4fc2e803d13bbc9d/40520c9e-ff82-4a7c-adca-5a064fe18d8c?expires=1787280300&signature=e4bf9aa199d4249085701a802d377edc9d1618e4e108d1242bf90e3301e9ea36&req=dSguFct%2Fm4lfXfMW1HO4zXg5BoWO6xK3zWhrqpWiTMnKZvHI2X%2Bs9IWFqW4x%0ASnOQRWdlXx13fgpjQSA%3D%0A) ## Continue with Google diff --git a/content/support/13325567-account-management-faqs.md b/content/support/13325567-account-management-faqs.md index 0613596090..58088fc921 100644 --- a/content/support/13325567-account-management-faqs.md +++ b/content/support/13325567-account-management-faqs.md @@ -44,6 +44,6 @@ The email domain that was used to create your Team or Enterprise plan organizati Owners can remove domains by opening up the same modal and clicking the trash can icon to the right of the domain: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1787244300&signature=9e4ab027e6fea932d5167badf68db9c1630c3d3773916965d61b2e0c61d5d674&req=diAiFcF5nolaW%2FMW1HO4zUrhFuyabQwZkeFUnrkrQZgVmP4X7tZ8yD125zDK%0AVxZaMoP5ux%2B4hvyfAEk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053873852/1cbccea3b7067e03205f2ff8546b/CleanShot+2026-02-11+at+11_16_07%402x.png?expires=1787280300&signature=5070ed1e69f4b6070b0cc9fd576cf216843165ce1c001815e40004c649a9a3d5&req=diAiFcF5nolaW%2FMW1HO4zUrhFuyaYQgZkeFUnrkrQZhAJj4Rx9l%2Fv7KkSell%0AIZ6PDcuxpVxQpUjqWRk%3D%0A) While the account creator must use a business email address, you can add public domains like @gmail.com, @yahoo.com, and @hotmail.com as allowed domains for other members of your organization. \ No newline at end of file diff --git a/content/support/13345190-get-started-with-claude-cowork.md b/content/support/13345190-get-started-with-claude-cowork.md index 024c77b16a..079d1cbaf9 100644 --- a/content/support/13345190-get-started-with-claude-cowork.md +++ b/content/support/13345190-get-started-with-claude-cowork.md @@ -143,14 +143,12 @@ Cowork has three modes that control when Claude asks your permission before taki | | **Connector tool permission: "Always allow"** | **Connector tool permission: "Needs approval"** | **Connector tool permission: "Blocked"** | | ----------------- | ---------------------------------------------------------------------- | ----------------------------------------------- | ---------------------------------------- | | **"Manual" mode** | Approved | Asks for permission | Denied | -| **"Auto" mode\*** | Read-only tools are approved
For write/delete tools, Claude decides | Claude decides | Denied | +| **"Auto" mode** | Read-only tools are approved
For write/delete tools, Claude decides | Claude decides | Denied | | **"Skip" mode** | Approved | Approved | Denied | -**Currently available for Pro and Max plans only.* +As a reminder, you control which connectors Claude can use via the "+" menu in the chat box or the **[Customize > Connectors](https://claude.ai/customize/connectors)** page. -As a reminder, you control which connectors Claude can use via the + menu in the chat box or the **[Customize > Connectors](https://claude.ai/customize/connectors)** page. - -**Note:** On Team and Enterprise plans, your organization may require per-task approval for write-capable connector tools, so "Always allow" preferences may not apply. See **[Use Claude Cowork on Team and Enterprise plans](https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans#h_1bd1fa754d)**. +**Note:** On Team and Enterprise plans, your admin controls whether "Automatically approve" is available to your organization. It's available by default, and if your admin turns it off, the mode doesn't appear in your mode selector. Your organization may also require per-task approval for write-capable connector tools, so "Always allow" preferences may not apply. See **[Use Claude Cowork on Team and Enterprise plans](https://support.claude.com/en/articles/13455879-use-claude-cowork-on-team-and-enterprise-plans#h_1bd1fa754d)**. **Manually approve (Manual)**, formerly "Ask before acting." Claude pauses and asks for approval for actions. You review each request and choose Allow or Deny. @@ -178,7 +176,7 @@ To set global instructions: 3. Type your instructions in the text box and click "Save": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1787244300&signature=1855993c34ba75d48fc064d443d5abf00e9a37b1f14df0aa86c71321e00ce039&req=diUlE8B8m4lYXfMW1HO4zcDl6t%2FuMlWz8iWjaktE942f8u44p9iOlXkULp9G%0ARTEUEABivcnZ9CmaHDU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2525926874/15324ac4155d7802272e8bdef04b/ec66cd09-a4db-4f1d-8f30-226c9d126333?expires=1787378400&signature=1f23915e9782c371111ad74e940c112b9d65fa60bfdba49e6b4ab5030643482e&req=diUlE8B8m4lYXfMW3nq%2BgcqgxG%2BD27XbY1WMqW%2FkK1ejkPq%2F%2FgmD4VVDpr87%0APryXtSd63sDxuIdFr2LO7%2BIc2i4%3D%0A) ### Folder instructions diff --git a/content/support/13346458-customizing-your-console-appearance-settings.md b/content/support/13346458-customizing-your-console-appearance-settings.md index 2a8eb75361..57119a79f4 100644 --- a/content/support/13346458-customizing-your-console-appearance-settings.md +++ b/content/support/13346458-customizing-your-console-appearance-settings.md @@ -8,4 +8,4 @@ 3. Select from Light, System, or Dark under **Color mode**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922579101/ede30d38dca693c59f9c15d79e69/CleanShot+2026-01-08+at+15_45_20%402x.png?expires=1787244300&signature=74ade2543961787f3f94b039ce7406edd8e2a377dceca2012bf0e3d9d2916c0c&req=dSklFMx5lIBfWPMW1HO4zRpFC88GSRZ1O9Kw38RlAYJIGYIfb4AMlVmviQjW%0AOAs9gyDsGtOqMXPAzWM%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922579101/ede30d38dca693c59f9c15d79e69/CleanShot+2026-01-08+at+15_45_20%402x.png?expires=1787280300&signature=60401b84b8dc9beba8de104b81af66c91a2c90d66c71ffb0abefa8de490bf1db&req=dSklFMx5lIBfWPMW1HO4zRpFC88GRRJ1O9Kw38RlAYKoQL8A4ToWp0H5scNs%0ApQ2Pd2%2Fe3h%2BTvvPvRTI%3D%0A) \ No newline at end of file diff --git a/content/support/13371040-log-in-to-your-console-account.md b/content/support/13371040-log-in-to-your-console-account.md index 52131e0d28..e1055ac8b0 100644 --- a/content/support/13371040-log-in-to-your-console-account.md +++ b/content/support/13371040-log-in-to-your-console-account.md @@ -2,7 +2,7 @@ When you navigate to the **[Claude Console](https://platform.claude.com)**, you will see two different options for logging in to your Console account. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1787244300&signature=83ad72c1673d794f49a3094f6a310601d2ac95209227d995ed746a0723894209&req=dSkkE8l8m4dbX%2FMW1HO4zcrI547upIQO8vUNcPt4%2B71uHODiToF4S3FfpIuz%0AoFvReVgtRaky%2BNhBQJU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1935026646/d90d1613a3dbe763fef5abb96e3c/image.png?expires=1787280300&signature=9cfd9a69711b6b2ea93c855961cf2d10ce9fb90b21df50060295a29ac8669f26&req=dSkkE8l8m4dbX%2FMW1HO4zcrI547uqIAO8vUNcPt4%2B71%2FSH8946DiPvdUaSwX%0Ad5AG1ZlBXRBRiwCaZvo%3D%0A) ## Continue with Google diff --git a/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md b/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md index efdc0f6330..d3778d7bb6 100644 --- a/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md +++ b/content/support/13455879-use-claude-cowork-on-team-and-enterprise-plans.md @@ -54,6 +54,14 @@ For Team and Enterprise plans, there's a separate organization-wide toggle in ** - **Enterprise plans:** off by default. An owner turns on "Run Cowork in the cloud," then grants the Cowork in the cloud capability to a group with custom roles. See **[Manage custom roles on Enterprise plans](https://support.claude.com/en/articles/13930452-manage-custom-roles-on-enterprise-plans)**. +### Auto mode availability + +The organization setting **Allow “Automatically approve” mode** in **[Organization settings > Cowork](https://claude.ai/admin-settings/cowork)** (under Permissions) controls whether members can use "Automatically approve" mode in Cowork. This setting is on by default, so the mode is available to your members unless you turn it off. + +When the setting is off, "Automatically approve" doesn't appear in your members' mode selector. + +Learn more about how the modes differ in **[Get started with Claude Cowork](https://support.claude.com/en/articles/13345190-get-started-with-claude-cowork#h_e1353133dd)**. + ### Connector tool approvals The organization setting **Allow "Always allow" for connector tools** in **[Organization settings > Cowork](https://claude.ai/admin-settings/cowork)** (under **Permissions**) controls whether members can skip per-task approval for write-capable connector tools in Cowork. This setting is off by default. diff --git a/content/support/13641943-visual-and-interactive-content.md b/content/support/13641943-visual-and-interactive-content.md index e776ec9959..259ecb0ec5 100644 --- a/content/support/13641943-visual-and-interactive-content.md +++ b/content/support/13641943-visual-and-interactive-content.md @@ -18,7 +18,7 @@ Claude can show current weather conditions and forecasts when you ask about the Claude automatically displays temperatures in Fahrenheit for US locations and Celsius for everywhere else. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1787244300&signature=bf520bd3c7dedc266b09232d07b76c15a19dfca16b5ffcc86f1d1c7e6dede384&req=diAjFsx6mYhdXvMW1HO4zXlB7Tm40RyLdgndksVD5R20M1EEMJZOaAQ3ckwr%0A%2B10epZRQ7mmuWA5gbYw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544927/3a9c695b24df387ecdd766ad308c/8be9f393-dcb0-4ff8-89e8-5fa47bedaa38?expires=1787280300&signature=658aba1a9c37c84f2699bd19b57bee690e8447dbf4f2bd4761403f79918bf0c2&req=diAjFsx6mYhdXvMW1HO4zXlB7Tm43RiLdgndksVD5R12ZlKuFgX7w%2B81I6S5%0AmDXNv84izAg5HCKmT7k%3D%0A) Weather is powered by Google Maps (). @@ -28,7 +28,7 @@ When you ask about recipes, Claude can display formatted recipe cards that are e **Note:** Visual recipe cards are available on web and desktop only. On mobile, Claude provides recipe information as text in the conversation. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1787244300&signature=c3648b12f6f676f5b3483b44633c028f47d0e7dbd7425de11c1ddb3ca5e1b856&req=diAjFsx6mYhdUPMW1HO4zUQpe7cX1lCUrIPm%2FImZVg1lRf3KxK5JVo7CndGY%0AsWgYKOQsvwEOwhW1MA4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544929/12f4c51eda7779d65d3ea2c7ab16/d0f4a314-cff8-421a-b401-10c2bf50374e?expires=1787280300&signature=088667fbe664fe7f13cfae6d208caccb94b8952b2dfce83a6e63aa5da36ec0c5&req=diAjFsx6mYhdUPMW1HO4zUQpe7cX2lSUrIPm%2FImZVg3MBHmvO4V1IN48htSE%0Ag45djZsmprSVOtZCSgA%3D%0A) ### Custom visuals @@ -76,7 +76,7 @@ For example, if you ask Claude to help you plan a trip, it might ask you to: This content appears at the bottom of the chat. You can still type a response if you prefer. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1787244300&signature=30433d6f89ede97451b46a0fa223992cc891fc661842e4422faba3f985fd3cc8&req=diAjFsx6mYhcWfMW1HO4zWmF5%2FK8bRqhx4wz0C7CTALatVBw5InGZheb1%2Fis%0AMtxPnJJFzAPGjLUgm2Y%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2040544930/9ad066e137d11e4b559b0217e12d/9bf30d2d-1715-42b3-9da5-2a9298f41f08?expires=1787280300&signature=f510d525737d76c9e3f3692a9346d718b7d286e59c017bc3daae88610b581c3a&req=diAjFsx6mYhcWfMW1HO4zWmF5%2FK8YR6hx4wz0C7CTAIIcRC2J1tneDu3wPZK%0AN1bQ39Z7rehXMY5ti3s%3D%0A) --- diff --git a/content/support/13756069-public-sector-faqs.md b/content/support/13756069-public-sector-faqs.md index 8be76f0602..501da3e571 100644 --- a/content/support/13756069-public-sector-faqs.md +++ b/content/support/13756069-public-sector-faqs.md @@ -6,7 +6,7 @@ Select your product based on both your technical/functional requirements, and also your compliance/security/deployment environment requirements. Here is a list of options: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2197717161/79965a24090029e9e58c727c3c24/pubsec-product-matrix_png+%281%29.jpg?expires=1787244300&signature=c1a97aaaae974707c563157d74a9be9ee227782d5c64c6d3776271689ab5c1de&req=diEuEc5%2FmoBZWPMW1HO4zU94Ll4nGdkz2WxtU42UVC1rvFDRNG3H6vSZ0adD%0AHuOBQjUKl7N5y%2B7l0RM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2197717161/79965a24090029e9e58c727c3c24/pubsec-product-matrix_png+%281%29.jpg?expires=1787280300&signature=aba3f1f9a07561919b13e5a3a2b9456669b3d8412b6d364d8ba1d2269e663a28&req=diEuEc5%2FmoBZWPMW1HO4zU94Ll4nFd0z2WxtU42UVC3LNEWkFTZLLaOx807S%0A%2FWIWz5GzrHBc2rZtpuM%3D%0A) ### What is Claude for Government (C4G)? diff --git a/content/support/13837433-manage-plugins-for-your-organization.md b/content/support/13837433-manage-plugins-for-your-organization.md index 7c9bc06275..44ea3267eb 100644 --- a/content/support/13837433-manage-plugins-for-your-organization.md +++ b/content/support/13837433-manage-plugins-for-your-organization.md @@ -70,9 +70,13 @@ GitHub syncing lets you manage plugins as code in a repository. When you push ch **Prepare your repository** -Your repository must be **private or internal**—public repos aren't allowed for organization marketplaces. You can connect a repo hosted on github.com or on a self-hosted GitHub Enterprise Server instance. +Your repository must be **private or internal**—public repos aren't allowed for organization marketplaces. You can connect a repo hosted on github.com or on your organization’s GitHub Enterprise host. -GitHub-synced marketplaces support a narrower set of `source` types in `marketplace.json` than the Claude Code CLI does. Relative paths to plugin folders inside the connected repository (for example, `"source": "./plugins/my-plugin"`) are fully supported. The `github`, `url`, and `git-subdir` source types are supported only when the target repository is public. The `npm` and `pip` source types are not supported. If your plugin code lives in separate private repositories, copy those plugin folders into the marketplace repository (a git submodule, git subtree, or a CI step works well) and reference them with relative paths. +GitHub-synced marketplaces support a narrower set of `source` types in `marketplace.json` than Claude Code does. Relative paths to plugin folders inside the marketplace repository (for example, `"source": "./plugins/my-plugin"`) are fully supported, and are the simplest option. The `github`, `url`, and `git-subdir` source types are also supported. The `npm`, `archive`, and `command` source types are not supported. + +A plugin source can be private in two cases: a github.com source that shares your marketplace repository's owner, which organization sync fetches through the Claude GitHub App, or a source on your organization's GitHub Enterprise host with your organization's GitHub Enterprise App installed on that repository. Every other source is fetched without credentials, so github.com repositories under a different owner and repositories on other hosts (such as GitLab or Bitbucket) must be public. + +If your plugin code lives in a private repository that doesn't meet the criteria above, copy those plugin folders into the marketplace repository and change each plugin's source to a relative path (a git subtree or a CI step that vendors the files works well). For details on plugin structure and formatting, see the **[plugin reference documentation](https://code.claude.com/docs/en/plugins-reference)**. @@ -94,7 +98,7 @@ Additional resources: 2. Go to **[Organization settings > Plugins](https://claude.ai/admin-settings/plugins)**. -3. Click "Add plugin" and select "GitHub" as the source. +3. Click "Add plugins" and select "GitHub" as the source. 4. Enter the repository in `owner/repo` format (for example, `acme-corp/claude-plugins`). @@ -106,7 +110,7 @@ Your personal GitHub token is verified to confirm you have access, then Cowork u An initial sync runs automatically when you connect a repository. After that, organization owners can opt-in to continued automatic updates per marketplace by going to **[Organization settings > Plugins](https://claude.ai/admin-settings/plugins)**, clicking the menu button in the upper right corner of the marketplace, then toggling "Sync automatically" on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193200015/a239033a9ab19fbd39f1a0d9edce/CleanShot+2026-03-23+at+11_41_31%402x.png?expires=1787244300&signature=dfa1b1a70240d399e058a2347fb369160303cf4f02b36e903ebbb727add1412b&req=diEuFct%2BnYFeXPMW1HO4zUYv5tr7xXsXRDH%2FtUo5ov5veMUZTb2Y2rjuQnOz%0AUd7wH7CJoaoz6TDW7Gs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193200015/a239033a9ab19fbd39f1a0d9edce/CleanShot+2026-03-23+at+11_41_31%402x.png?expires=1787378400&signature=de049f555592c3c87094b2bf8ea60092a85ebb210e715a6931a57682c5431ed0&req=diEuFct%2BnYFeXPMW3nq%2BgXWVtEoAmkDfgbmKhAZwUoCwsclsARUakwdGilhn%0ANuSZcu1fx3S7%2F5xz5DplRSGK%2FR8%3D%0A) Enabling automatic sync creates a webhook on the connected repository. The person turning the toggle on must have admin-level access to that repository on GitHub. This is checked through their personal GitHub connection, which is separate from the Claude GitHub App installation. Without admin access, the page shows "Cannot access repository. Ensure the repository exists and the Claude GitHub App is installed," even when the App is installed correctly and manual updates work. @@ -273,9 +277,11 @@ Changes take effect on each member's next session or plugin refresh. If the upda One or more plugins in your repo is likely formatted incorrectly. Fix the formatting issue, push the update to GitHub, and trigger the sync again. For plugin structure requirements, see the **[plugin reference documentation](https://code.claude.com/docs/en/plugins-reference)**. -### Sync fails with "External plugin sources are not yet supported," or plugins are skipped with "Repository not found on github.com. Check the URL and make sure the repository is public." +### Sync fails with "External plugin source is not yet supported," or plugins are skipped with "Repository not found on github.com. Check the URL and make sure the repository is public." + +One or more plugin entries in your `marketplace.json` use a `source` that points outside the connected repository (a `github`, `url`, or `git-subdir` source), and organization sync can't fetch it. A private source only works in two cases: a github.com repository shares your marketplace repository's owner, or a repository on your organization's GitHub Enterprise host with your GitHub Enterprise App installed on it. -One or more plugin entries in your `marketplace.json` use a `source` that points outside the connected repository (a `github`, `url`, or `git-subdir` source), and the target repository is private. The organization sync can currently only fetch external sources from public repositories. Move the plugin folders into the marketplace repository and change each entry's `source` to a relative path (for example, `"./plugins/my-plugin"`), then push and re-sync. Alternatively, upload the affected plugins individually via **Customize > Add plugin > Create plugin > Upload plugin**. +For any other private source, move the plugin folders into the marketplace repository and change each entry's `source` to a relative path (for example, `"./plugins/my-plugin"`), then push and re-sync. Alternatively, upload the affected plugins individually via **Organization settings > Plugins > Add plugins > Upload a file**, then select "Add to an existing marketplace." Plugins uploaded through a member's own Customize menu are installed only for that member and aren't distributed to your organization. ### Plugins disappeared after a failed sync diff --git a/content/support/13837440-use-plugins-in-claude.md b/content/support/13837440-use-plugins-in-claude.md index 7bf0ca5640..d10413e4be 100644 --- a/content/support/13837440-use-plugins-in-claude.md +++ b/content/support/13837440-use-plugins-in-claude.md @@ -40,7 +40,7 @@ In Cowork, open the "Cowork" tab first, then open **Customize**. You can also upload a custom plugin file if you built one yourself or received one from a colleague. On Claude Desktop and in Cowork, plugins you add yourself are saved locally to your computer. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1787244300&signature=c81575ead5d518a1aa0ad5c841de8a9a50d6a34aec84a459b240cd292d24e3b4&req=diEnFs1%2BlINeWPMW1HO4zZF3IhLfN%2FFWxakFVfq5WwwLsgz3dkC4DBAJffyK%0AQL2KoriJWNkkCJ%2FpqQE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2100409211/fc01614dde1a616fa31ffaa9cb04/47bacf5b-a810-45b5-a468-9769f1a58ef8?expires=1787280300&signature=619e0101979d09fa60e2f832b48b220e549a7103c8dc148c96542f8e3ee48ab9&req=diEnFs1%2BlINeWPMW1HO4zZF3IhLfO%2FVWxakFVfq5WwyMCaI2%2FgrhrYrtz3Fk%0APaB95N5xMQ37%2FWbB1RA%3D%0A) If you're on the Enterprise plan and your organization has skill scanning turned on, plugins are checked for malicious content when they're installed or updated. A plugin with malicious content is blocked, and one that may carry risk shows a caution banner. Learn more about **[skill and plugin scanning](https://support.claude.com/en/articles/15927065)**. @@ -50,7 +50,7 @@ If you're on the Enterprise plan and your organization has skill scanning turned Each plugin you install adds skills you can use while working with Claude. Type "/" or click the "+" button to see the available skills from your installed plugins, in chat and in Cowork. Click any skill to see its details. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1787244300&signature=ca2fb4b4046d53dd2bb0ca492174df18d0ca14ebc38053e87dc00141b5dd060c&req=diEiEcp3m4lbXfMW1HO4zf4NBPH%2Bh0SXmKUxugP2BQtSlefUB2Z4myNfHWPh%0Ak%2FB4a6mSjyMbikmHXUc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2157396844/4a790e10f5b88df770783df1d7e9/image.png?expires=1787280300&signature=f5015cf9ccf518daa516caebe51c85ee894cd80327385e49cf67c3cb3699c329&req=diEiEcp3m4lbXfMW1HO4zf4NBPH%2Bi0CXmKUxugP2BQtZjDlFHWs21kGUUf7L%0AyP4IJvViDpSLStC0SYo%3D%0A) --- diff --git a/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md b/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md index 2e701635ff..452b68e260 100644 --- a/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md +++ b/content/support/13854387-schedule-recurring-tasks-in-claude-cowork.md @@ -52,7 +52,7 @@ There are two ways to create a scheduled task: 6. You can explicitly confirm you want to schedule the task when prompted by Claude by clicking “Schedule": -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2104085399/4dda7e6f76026fd827db0b9323a9/f20635bf-15e7-4978-a213-5b9f67e9fb9a?expires=1787244300&signature=548c7bde0fee60d39044da81f342eae90e7a88f8522c5deea7ab524b869875b1&req=diEnEsl2mIJWUPMW1HO4zeLJBkLm%2B%2B6EPx%2FSrZI7l8wA7etYFD1KrV3wrJD9%0AygEp%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2104085399/4dda7e6f76026fd827db0b9323a9/f20635bf-15e7-4978-a213-5b9f67e9fb9a?expires=1787280300&signature=d499620a9494c8b9d6408c3a1c699e138eaed1dcf60139ec8eddd8d85b7b78d2&req=diEnEsl2mIJWUPMW1HO4zeLJBkLm9%2BqEPx%2FSrZI7l8ym4N8NsdCf9p8iUHia%0AzhwZ%0A) 7. Claude will create and schedule your task, and it will be added to the **Scheduled tasks** page. diff --git a/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md b/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md index dbe46210de..fb7a9d331e 100644 --- a/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md +++ b/content/support/13930458-set-up-role-based-permissions-on-enterprise-plans.md @@ -66,7 +66,7 @@ Create roles that delegate parts of administration without granting the Owner ro 4. For each team or department, decide which features they need access to. -![Image of the Organization settings page in Claude, with a box around the People section which contains three options: Members, Groups, and Roles.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484535492/d17b343f54f754bb3af73fe880a9/Org+settings+-+People.png?expires=1787244300&signature=e745be352d24ec562688f6e9b31325eae6f438a99bded8827abd973183d26d42&req=diQvEsx9mIVWW%2FMW1HO4zVA%2FMt2SK4mpvDbmWeIt%2FcRL8xT9WkIqHnE22lyH%0AJUcFpAuK03lMDXS7%2FE8%3D%0A) +![Image of the Organization settings page in Claude, with a box around the People section which contains three options: Members, Groups, and Roles.](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484535492/d17b343f54f754bb3af73fe880a9/Org+settings+-+People.png?expires=1787280300&signature=19ca2045e0ff91635ce3636a81bc45428b0800de57a4534749467cca2392c62a&req=diQvEsx9mIVWW%2FMW1HO4zVA%2FMt2SJ42pvDbmWeIt%2FcTQ2HZvizO0WLvYX%2BV%2F%0Ahq0CxGcXxHkR7I8xmmU%3D%0A) Remember: any feature you want to control per-group must be **enabled** at the organization level. If a feature is toggled off at the organization level, no custom role can grant access to it. @@ -84,7 +84,7 @@ Create your custom roles before enabling any features or migrating members. This 3. Name the role and toggle the appropriate capabilities on the **Capabilities** tab, or choose "All capabilities" or "All generally available" to grant everything at once: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2539844315/2e98adc9b24a95bf64b7ef759c94/a0c6bd31-327c-48b8-9ece-1b985eafccec?expires=1787244300&signature=15dc47b7b3e6ac397b71bccb641e5564f14b24a5759e81b83804ae9ecaf2210b&req=diUkH8F6mYJeXPMW1HO4zfzK2OTY4t05Jsssa0E%2FK2Yx20l%2FyRvW%2BzZwJE6u%0AQNYk%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2539844315/2e98adc9b24a95bf64b7ef759c94/a0c6bd31-327c-48b8-9ece-1b985eafccec?expires=1787280300&signature=d20ad6713487d985e0f5a33d20be07f95b37e814fa60542d7ad7b79908fafd4a&req=diUkH8F6mYJeXPMW1HO4zfzK2OTY7tk5Jsssa0E%2FK2bXBI9q1ZMPFWOlmPBD%0A5sk2%0A) 4. On the **Permissions** tab, set admin permissions for the role. See **Step 3**. @@ -114,7 +114,7 @@ Set admin permissions on each role to delegate access to admin settings, like bi 3. Select the **Permissions** tab, between **Capabilities** and **Connectors**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484538453/66f52673b2d1fc7b0d4b48ed4ff6/fbf992ce-c4a1-402e-80cd-0c8449f916bd?expires=1787244300&signature=bd31fad35a1fb3177442641ef9f008bfa920d5691232e605b0132262a6823738&req=diQvEsx9lYVaWvMW1HO4za6MibWlWEaEJQR8u%2B9qQFnAgUSaC5o%2B8NqKLZ9%2B%0AXwc7gzXvj3r4AyyCo4Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484538453/66f52673b2d1fc7b0d4b48ed4ff6/fbf992ce-c4a1-402e-80cd-0c8449f916bd?expires=1787280300&signature=99aaa726f2ee6321f8b4b5efaaea010ed09ea8e593e24942366fbea628873350&req=diQvEsx9lYVaWvMW1HO4za6MibWlVEKEJQR8u%2B9qQFlnZ38dbML18lIAR7pT%0A1EHVdyl4ODyepJ9knns%3D%0A) ### **Set admin permissions** @@ -154,7 +154,7 @@ Set connector permissions on each role to control which connectors, and which to The default settings for new roles are permissive. When creating or modifying a role, confirm the settings on each tab to avoid granting unintended permissions. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484539079/2325428311fffccd6951d5f2dc46/e4326a16-d44b-4e5d-9ecd-5c3dbbc7651a?expires=1787244300&signature=3e0fd6cf21658459d2aa5864147d3f8290e7a8aa4bcfeb514e5252cd9519842d&req=diQvEsx9lIFYUPMW1HO4zZGDXF6hDPJxHNJQDqL6ZaCA3Iy5CngAFcPCp5aK%0Ax%2FiQ3sunrGrBnvsV6oM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484539079/2325428311fffccd6951d5f2dc46/e4326a16-d44b-4e5d-9ecd-5c3dbbc7651a?expires=1787280300&signature=908bb6fbeb2f9b209f55c9b787bf8d53b43ea8976fd08d8468229e9b505cd3b9&req=diQvEsx9lIFYUPMW1HO4zZGDXF6hAPZxHNJQDqL6ZaCSvWi3YrXP8fE%2BnedC%0ArZ%2Btm6H8hM3Y6npNJA0%3D%0A) ### Set connector-level permissions @@ -170,7 +170,7 @@ The **Connectors** tab lists an **All connectors** row at the top, followed by e Choosing “Always allow,” “Needs approval,” or “Blocked” applies that level to every tool on the connector. The **All connectors** row works the same way one level up: it sets a baseline for every connector at once, including any connector you add later. Use it to set a role’s default, then override individual connectors. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2602605191/9a2f57e31f088a3400baa70f47fe/f9f866d7-9cf4-4f5c-9d98-0d6dd6672425?expires=1787244300&signature=05e362cd35257d0edf0c426a2b00b7ff948a9270a1e6f9fd881d5614a6107615&req=diYnFM9%2BmIBWWPMW1HO4zSvbwjfxmH8TFasHZ0kEvAsfZWsR7u72KGAN%2BBHH%0Af1rzRp0OjUDl35ADaDg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2602605191/9a2f57e31f088a3400baa70f47fe/f9f866d7-9cf4-4f5c-9d98-0d6dd6672425?expires=1787280300&signature=a7d810e317549695bdc39f95ba7427b4a35e48448ec178417f03f8c4b5fb0f8b&req=diYnFM9%2BmIBWWPMW1HO4zSvbwjfxlHsTFasHZ0kEvAtPhcx%2FHad9CqPEQ5G4%0Adi8ZFBEsVNpgkNAlNko%3D%0A) ### Set how members connect @@ -192,7 +192,7 @@ Set a connector to **Custom** to reveal its tools as individual rows. Each tool Per-tool permissions let a role reach part of a connector. For example, with Jira set to **Custom**, its `search_issues` tool set to “Needs approval,” and every other Jira tool set to “Blocked,” members with the role can search Jira but nothing else. Claude only sees the tools you’ve granted, so asking it to create a ticket returns “I don’t have a tool for that” rather than an error. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484553274/3c0781dc9c7704a7b67d4858b88b/Screenshot+2026-06-17+at+4_28_45%E2%80%AFPM.png?expires=1787244300&signature=a376e47bf77d2234721bffaf6cf2f9d169ec5e37a412a9dd6568a3bbbcfba4a3&req=diQvEsx7noNYXfMW1HO4zXcI%2BoBCANtg1VjQ9K3ENRsElJyttJmI2IicCB1S%0AL450pdKSuYgm%2FQ4FqLA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484553274/3c0781dc9c7704a7b67d4858b88b/Screenshot+2026-06-17+at+4_28_45%E2%80%AFPM.png?expires=1787280300&signature=e90b86be41b07cf855dc78e550653474611a2613754452b58ea2671d446f5496&req=diQvEsx7noNYXfMW1HO4zXcI%2BoBCDN9g1VjQ9K3ENRuKnTyYN%2FoI3ZEJO8PX%0A6ARGadbV3idC4TAyGX8%3D%0A) ### Review cross-role conflicts @@ -200,7 +200,7 @@ Because connector permissions are additive across roles, blocking a connector in If you have unsaved edits when you open a linked role, you’re asked to discard them first. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484556183/b644bbfba5350ae2a460117f23e3/Screenshot+2026-06-17+at+4_31_03%E2%80%AFPM.png?expires=1787244300&signature=497bfcfc5c4bd7b543da32da2ea0f61e5bb166e21e7c88c7c15250bee314f86a&req=diQvEsx7m4BXWvMW1HO4zX8ytuoH5dDUGc8KkqwXsZ4gJVB0s2rTwdtP4pNP%0AFhEh7uPFBt03h7ubRMc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484556183/b644bbfba5350ae2a460117f23e3/Screenshot+2026-06-17+at+4_31_03%E2%80%AFPM.png?expires=1787280300&signature=0a1d2540003db08134e7bda2d039d3ed34fe8bc9ad51dc763823e7c2642d5bf9&req=diQvEsx7m4BXWvMW1HO4zX8ytuoH6dTUGc8KkqwXsZ5Iiy1UkloEHlIBUbLi%0A7IiaPF7kmhCssk9rOrg%3D%0A) ### Verify enforcement @@ -250,13 +250,13 @@ Verify model access after you've migrated members to "Custom" roles. See **Step 4. Assign each group to the custom roles you created in step 2. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260371973/b503c99ef71d8a89b7aff606511b/b1afd593-3b23-4fa9-8b9b-ee6beaf74fd7?expires=1787244300&signature=b21faf7543df74453095424353bfbba466a5d9f59b2aa76b358936edd3cfb32a&req=diIhFsp5nIhYWvMW1HO4zdMu8Wd0Hg1pKwlCydrbfL6JKQBtuuIHQqXtkx61%0ABDwiiUkVrsi6IvCWZzY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260371973/b503c99ef71d8a89b7aff606511b/b1afd593-3b23-4fa9-8b9b-ee6beaf74fd7?expires=1787280300&signature=318537e9ae9d0e927cc2e41969bebe58c6932aa64e13f17b91b02cfecac7667b&req=diIhFsp5nIhYWvMW1HO4zdMu8Wd0EglpKwlCydrbfL4Flcc3k1c5%2BlntVT7E%0AqblcDCa26ouZ4RRk4Qw%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260372813/83ccc4784bdfc8600101bc42ec4b/6e7456ac-9887-4e04-b757-3972110fbdce?expires=1787244300&signature=191d8eaa774225f51aa976acb301b579616cada87a98e324fffd0f3860213f4a&req=diIhFsp5n4leWvMW1HO4zQetnyRVYKv7czQdKdGFNsdq61rVMmkdcvn66zTY%0ABKQkinhZVhNgILDz6mk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260372813/83ccc4784bdfc8600101bc42ec4b/6e7456ac-9887-4e04-b757-3972110fbdce?expires=1787280300&signature=b6686436126caacb625ae65d5d532735e18b1c6527f98182e7cee4acbb0e9198&req=diIhFsp5n4leWvMW1HO4zQetnyRVbK%2F7czQdKdGFNsd7b49GgBXLELV5echU%0AjMKXlwJ3xB6jwheQsK4%3D%0A) If you use SCIM directory sync, you can sync groups from your identity provider instead of creating them manually. For details on SCIM group sync, see **[Manage groups and group spend limits on Enterprise plans](https://support.claude.com/en/articles/13799932-manage-groups-and-group-spend-limits-on-enterprise-plans)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260374677/5f9d8febb8ae25153a94d0b827b9/c8314b27-96c1-4743-ae8b-25e511181837?expires=1787244300&signature=ce1e68c9c18cd32d2a9ab95fc2cb93d07d1e793e041a0781b818a747fb7c821a&req=diIhFsp5mYdYXvMW1HO4zXzl64h37D%2BZKYkQn0Dd8NWr4z3IjXPPLWboEBUQ%0ApttD0XMj3A6LT80SLQs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260374677/5f9d8febb8ae25153a94d0b827b9/c8314b27-96c1-4743-ae8b-25e511181837?expires=1787280300&signature=c47d471ed5a1c9bd53a39e095d6ca40b4969b78060e0fc709be294b57cde126a&req=diIhFsp5mYdYXvMW1HO4zXzl64h34DuZKYkQn0Dd8NXysrOZJkFGPK3Cn3SV%0AMt4wMIfqJhos8fSKu6Y%3D%0A) **Multiple organizations under the same parent organization:** Groups are managed at the parent organization level and propagate to all child organizations. You may see members from other organizations listed in a group—this doesn't mean they have access to your organization. Custom roles assigned to a group only grant capabilities to members who are part of your specific organization. @@ -298,7 +298,7 @@ Use this path only if your organization already enabled group mappings for role 3. Save your changes. Members in those IdP groups are migrated to "Custom" roles on the next sync. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2434934020/d154818947d8d84ebf1aec8d5462/image.png?expires=1787244300&signature=08cbaeba59fdd1e731b2a3f3bc683f60053a87314f598417f0b4119b26d52e94&req=diQkEsB9mYFdWfMW1HO4zQyCmEjhTUFrSnpHYy0fFQuhfZPMvgHj5X8%2B0Uj7%0A%2FLeqsVivs6eBoLMTj5M%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2434934020/d154818947d8d84ebf1aec8d5462/image.png?expires=1787280300&signature=b3c482f3cd85f58c2b3c934901dcf88986b986a9ee638a621575df9fca3538b6&req=diQkEsB9mYFdWfMW1HO4zQyCmEjhQUVrSnpHYy0fFQsfGHd5tBsKuDbqN79M%0A2z2JFTbAWFQ4bcs27Ys%3D%0A) Members in IdP groups mapped to "Custom" roles follow the permissions of the custom roles assigned to their groups in Claude. Members in IdP groups mapped to User follow the organization-level capability settings. If a member is in groups across both mappings, "Custom" roles take precedence. @@ -314,11 +314,11 @@ Use this path if your organization hasn’t enabled group mappings. 3. Use the bulk assignment tool in the Members table to change the selected members' role to "Custom." -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260377969/ba3b7ba08518f0a50e2a84f82655/bdf1aea3-2fe7-4f3c-868b-cc35ae8b7d1d?expires=1787244300&signature=cb803890d7c1aecaa4d486fd239c72cc8a4021c726649a438efe4bf3aef39f98&req=diIhFsp5mohZUPMW1HO4zYFuwIYggc2PlPaXg%2F0URInIRpBKqeFa80oBpwq6%0A2NUoAGYA5aZgXLStYHo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260377969/ba3b7ba08518f0a50e2a84f82655/bdf1aea3-2fe7-4f3c-868b-cc35ae8b7d1d?expires=1787280300&signature=16160d1b8029a2fc62104c0e7c7dcc2bb1a15a862249b70c038ffcd58a021f8f&req=diIhFsp5mohZUPMW1HO4zYFuwIYgjcmPlPaXg%2F0URInpwk6w7rvDrazd%2FW%2FZ%0A2WFPjqd0ORFCjyu3MaA%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260378309/abe25b6478c721a2f965b35361b7/beff124a-0a44-4f7f-97f8-391ce6e8c55b?expires=1787244300&signature=1c20c378a104b6fac1e8272ecabb5af14c8efe439da6f59807fc679731ffebe8&req=diIhFsp5lYJfUPMW1HO4zRgyEF%2FeV%2B3VZ8KPhClFzQlZ3516dtR%2FkPSxqeZi%0APMwc%2Bslbyr2EE8xh3Ng%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260378309/abe25b6478c721a2f965b35361b7/beff124a-0a44-4f7f-97f8-391ce6e8c55b?expires=1787280300&signature=d336701418a8bfff5d4fd023b2b4f9230f2cd71c1be17558b0019259ca8d7365&req=diIhFsp5lYJfUPMW1HO4zRgyEF%2FeW%2BnVZ8KPhClFzQmiFIBD0b1ezrKgakHh%0AXZ4WewHPoG5xybTA%2Fbk%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484560173/7abf3438fa3d65afa03c4a99d4d4/Screenshot+2026-06-17+at+4_34_49%E2%80%AFPM.png?expires=1787244300&signature=5fa42551731d4416e45f4fadd84a0e4aaada6f1e77559147fb8e09fd1a357be1&req=diQvEsx4nYBYWvMW1HO4zUXuwkl%2BL4dTiQnXWL6R1K9h2qTfSMLRgAmZoai6%0A8ieJE4nRCHFyhOI2U9k%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2484560173/7abf3438fa3d65afa03c4a99d4d4/Screenshot+2026-06-17+at+4_34_49%E2%80%AFPM.png?expires=1787280300&signature=cc911e332056d9367b83631d284261b36da6855005b890fed7defae4564dc64d&req=diQvEsx4nYBYWvMW1HO4zUXuwkl%2BI4NTiQnXWL6R1K%2BJTgXNuZP7auf%2FZiBO%0AYSRGnSgmlojQ%2BKjZJAE%3D%0A) We recommend migrating a pilot group first—one team or department—and verifying their access is correct before expanding to the rest of the organization. @@ -354,9 +354,9 @@ Enabling a feature at the organization level doesn't mean everyone gets it—cus Navigate to the “Usage” page to assign a per-user monthly spend limit to any group. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386576/377ac052069ff5a35b3023f50d12/dface609-9d85-4ee1-8ed3-bfe019a2bd0a?expires=1787244300&signature=805ad2ba0c1c063b46b61ad7b0788a6ae42b4fdd6b91870e194ee5e2eb3a6d7e&req=diIhFsp2m4RYX%2FMW1HO4zfvdi5CdQQKJBMkPcsY1DF5bXta1Q5%2F676D%2Ba1tg%0ASK3eupZukFmyrikOMqk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386576/377ac052069ff5a35b3023f50d12/dface609-9d85-4ee1-8ed3-bfe019a2bd0a?expires=1787280300&signature=18e6ebe7ef1e81a20ae1fff336e27ba21c397b3463fd296c39592a15e8ea18c9&req=diIhFsp2m4RYX%2FMW1HO4zfvdi5CdTQaJBMkPcsY1DF6VMY%2BOujDAd1qO1G6l%0A0sayRHtOL9Rr7zqN5Cc%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386575/b9798bb7a2ab92024fa4d97f2ff4/7b2327e1-ab3f-41e5-8be0-77c0f35a4015?expires=1787244300&signature=ffaae429969905dd437da0ecaf8a26e04f80262880e51f0454d6fb1878527666&req=diIhFsp2m4RYXPMW1HO4zW55wNabxFUyJuVz%2B3EZKJ5QZI%2BhAupoSwB%2FXVa%2B%0ALWXIoNlYEXgesJkviTc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2260386575/b9798bb7a2ab92024fa4d97f2ff4/7b2327e1-ab3f-41e5-8be0-77c0f35a4015?expires=1787280300&signature=a11ba65ce5870003b367c8bbac2f769bf1207ec34f08974fee0bc5fd73383509&req=diIhFsp2m4RYXPMW1HO4zW55wNabyFEyJuVz%2B3EZKJ5KplMGBykIhi5883CD%0Ag8jXEUxz8Q0mj7fpYdg%3D%0A) Note the following precedence rules: diff --git a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md index a9d969867a..de5ccbb17f 100644 --- a/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md +++ b/content/support/13947068-assign-tasks-from-anywhere-in-claude-cowork.md @@ -48,11 +48,11 @@ Follow these steps to get started: 5. You’ll land on a page describing the functionality. Click “Get started”: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1787244300&signature=564149e354b04b4d82017980d44d94ceadc0dad90e64068611b292e2b3ee3920&req=diEhH8B7mYFXX%2FMW1HO4zSZP0pWJEQr8B32drIe5EDmlXOztFN6AvGKSwBEw%0AgTkc%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169954086/419674f781edb2977b93cce062b4/93b1893c-d79a-4eb6-b2f1-2fe3e043bd90?expires=1787280300&signature=0a0ed011345a6f73ba802c48e3ddee46a4ec7b98761d62e15b64c3433a769464&req=diEhH8B7mYFXX%2FMW1HO4zSZP0pWJHQ78B32drIe5EDmcRXui1BjR5LB0Jgvx%0AhQdn%0A) 6. On the next screen, you can give Claude access to your files and keep your computer awake by toggling those on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1787244300&signature=c1b77d6d7d2a79c480dbfd2be86096cfcc03c55070d2a77842c9dc6cf6cc9574&req=diEhH8B7mIFXW%2FMW1HO4zaZWs92aWQUdepuGRb1rD3KImQkTSfx6%2FuLRd%2F1t%0A%2F8%2Fe%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2169955082/de4053ee0eab8fcb9263584bb171/d39b77da-1a69-4682-9fdb-7ed488f236b0?expires=1787280300&signature=41b521341d4e122b3bb0890f4b31e50b8468f436c09b3c2ec485ac972142b4e6&req=diEhH8B7mIFXW%2FMW1HO4zaZWs92aVQEdepuGRb1rD3KSWKbeoVQ4yf48u%2B4C%0A3McN%0A) 7. Click “Finish setup.” diff --git a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md index e8f9a3dbac..ee98f1b00d 100644 --- a/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md +++ b/content/support/14116274-organize-your-tasks-with-projects-in-claude-cowork.md @@ -22,23 +22,23 @@ Cowork is available for paid plans (Pro, Max, Team, Enterprise) on: Find **Projects** in the left navigation panel and click the “+” button to see the three different ways to create a project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1787244300&signature=de7f59870e4a1782da78ed2d73a0e659897dbd41bd5e45557aec5cffdd3a1fa1&req=diEvFc58nYNbWfMW1HO4zcOgiwK41Sx2ZwSvwegvtgxUxzDf9j2hkZ8p%2BJvm%0AtykcI0WP9FbbNaGvoG0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183720240/6f6ef438913391703598d86d606c/CleanShot+2026-03-20+at+09_11_43.png?expires=1787280300&signature=2f80bc23dc61eed451910fb610c2941df0637aae7b3d0c7a7ab3c5cd2b1585e3&req=diEvFc58nYNbWfMW1HO4zcOgiwK42Sh2ZwSvwegvtgySwgLXTcsHjTihMhie%0ANXD9sBcRzZaQEQGD6KM%3D%0A) ### Start from scratch Selecting “Start from scratch” allows you to set up a new folder with instructions and files: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1787244300&signature=f00d903bf4aab0ed0699a123482f9cd1fa6cf64e2bfd70a6e2b570f7bad99d35&req=diEgEcl3nYFeXfMW1HO4zZCoQ4pHSnGVvb0suCMAnj0js8ZaDsubD7s5b%2B4n%0AU%2FMXHwNMOqezajyy40Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177090014/07832b50003cf7fd3b4e9c7c448b/3385d9b8-c3e7-42b9-ae3f-4d213baa53a7?expires=1787280300&signature=fff68af5f82b04444b266f369a0903119bcada180eaab0bd2ea7fe9c15a07370&req=diEgEcl3nYFeXfMW1HO4zZCoQ4pHRnWVvb0suCMAnj1qeb%2Bu94T2gO6uSO9c%0AUQ4fB5CL9%2BKHQYUTQ6Y%3D%0A) ### Import from a Claude project After selecting “Import from project,” you’ll see a “Search projects in Chat…” field: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1787244300&signature=cb7a85a61e602f460f74510fef863938655bb696ff1f1f58d8bb7494dd701843&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UGRfzpwcjggUT7FIJz84Awaf864Y58dQIJwP%0AceQL7%2BQXcWm2tvhkJZo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183717962/acdc11bcc825ae76a13f508365bc/CleanShot+2026-03-20+at+09_12_08.png?expires=1787280300&signature=98b652b3c790cb326361752783f8cd9bb5c37c968c640e0da1dc7a2e29ae32ec&req=diEvFc5%2FmohZW%2FMW1HO4zQQ7UGRfwpgcjggUT7FIJz%2Bi74I%2BPfW1ITM9x3is%0Auohn%2Bmoll6bNpgkXhfs%3D%0A) Clicking into the field will display a drop-down showing your recent projects, but you can also use it to search all your projects. After you select a chat project (bulk upload is not supported), you can name the new Cowork project and choose where to save it on your computer: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1787244300&signature=10a4b809e4222be44cbdb729fd633b94f5833c39022478185eaf5fdfabfffc52&req=diEvFc58mohYWvMW1HO4zU%2FKAiRE%2BCfPI7f%2FdY0VL6gqwDqupLdpogAYCeeS%0AOtfGcDcIMhTbbg6P6d4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2183727973/7a25430123d9e13e7c3cdd411f70/CleanShot+2026-03-20+at+09_13_41.png?expires=1787280300&signature=22610850d4c74df06abe183e031322b1b5f32b672b83556d802672716b18128b&req=diEvFc58mohYWvMW1HO4zU%2FKAiRE9CPPI7f%2FdY0VL6jhnOVJKXJ6jeOBnBsw%0A%2FZrUUchYPcth2EoO6qo%3D%0A) Clicking “Create” will transfer the files and instructions from your existing Claude project and create a new Cowork project. @@ -46,11 +46,11 @@ Clicking “Create” will transfer the files and instructions from your existin If you select “Use an existing folder,” you’ll be prompted to pick a file to use as context for the new Cowork project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1787244300&signature=c79d0daf4addb61f4e3122a395b3b8edf10269c9a1685abcdee17e1539577600&req=diEgEcl2mohcXPMW1HO4zejrnzHUESdcuv8e2Xj2xOWLNnUidp5KBBkjMNVg%0Afcq4NsZzcbMl1ld2HvM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087935/2f0052dae601d0b7fecdc029e1c3/2e3ca9e7-23b1-436e-bbdb-edcd31c41f15?expires=1787280300&signature=abac032b800bce8e468c9a1b9599747f1fe4e5c72e95466a5a594e466e0ea693&req=diEgEcl2mohcXPMW1HO4zejrnzHUHSNcuv8e2Xj2xOWVg4ZXLtZCGKi1k7BZ%0AYRsAhT1JdsjTnNAEMp0%3D%0A) After selecting a folder, you can name the new Cowork project, choose where to save it on your computer, add instructions, and attach any additional files. Click “Create” to start using your new project: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1787244300&signature=adb2f02add189f8e7928e88c0c45fdb5642d5bb0d92648ff8daea1a387a7386b&req=diEgEcl2mohcXvMW1HO4zUq4V%2BS2h6Y5MfnqHouW6MIZOz6vmXM9V0S8uZDx%0AoK6XyeTtbfCRmLT3zKY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2177087937/f59dbe3fc28448a9597ea097cb4d/96a59acb-4054-4b4b-a208-751f9711f535?expires=1787280300&signature=8032f376306efd712e25193ee5c92988d0c28ebc0967b956b53772a36f05fb14&req=diEgEcl2mohcXvMW1HO4zUq4V%2BS2i6I5MfnqHouW6MLqN1hxiOJRPip%2BKv5q%0Ai0KD7qTRPu%2BMrya9uaU%3D%0A) --- diff --git a/content/support/14128542-let-claude-use-your-computer-in-cowork.md b/content/support/14128542-let-claude-use-your-computer-in-cowork.md index 702abe48d5..f6450328d5 100644 --- a/content/support/14128542-let-claude-use-your-computer-in-cowork.md +++ b/content/support/14128542-let-claude-use-your-computer-in-cowork.md @@ -40,7 +40,7 @@ If your work involves a physical machine, Claude keeps working while you step aw Claude asks for your permission before accessing each application. You’ll see a prompt and must approve before Claude can interact with that app. Some apps are off-limits by default. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193297849/243cf7bd2386d92a253c2cec7d32/46cb6fcb-c0ee-4d1c-9974-9c1c1058c81c?expires=1787244300&signature=d2ec5bf7050f75afc7f6079b167f77dbc182a9b83ec3b81d5ef66c5ef293c4b3&req=diEuFct3molbUPMW1HO4za8%2BRnuARySfOFMEfKzd96rhbXim6rtN9ugubKyD%0AoWh2%2FuQo45W5JZBmxIc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193297849/243cf7bd2386d92a253c2cec7d32/46cb6fcb-c0ee-4d1c-9974-9c1c1058c81c?expires=1787280300&signature=41f22491b0d970d9dff277800e85563aa74050659fa856fd0563f2f680a62453&req=diEuFct3molbUPMW1HO4za8%2BRnuASyCfOFMEfKzd96rM2BH9f%2FSrJjvhAnqC%0AWD42lZciBKO3gDGmUFQ%3D%0A) Claude is trained to avoid risky operations—like transferring funds, modifying or deleting files, or handling sensitive data—and to flag signs of prompt injection. However, these safeguards aren't perfect, and Claude may occasionally act outside these boundaries. @@ -128,7 +128,7 @@ To start using computer use: 3. Find the **Computer use** toggle and turn it on: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193911341/630e6df3b08b27d1c7b4f1ca6a1f/image.png?expires=1787244300&signature=294d4cb103b6c1e36da0b2564e7ae423bbccb515dfcaa4b73461d62524e8901f&req=diEuFcB%2FnIJbWPMW1HO4zR8GoUN%2BQU4zjdPXX%2BaSOrHUwMQ%2F7dEN9D1xcQsR%0ADgKo%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2193911341/630e6df3b08b27d1c7b4f1ca6a1f/image.png?expires=1787280300&signature=858f0b44eb9ec29c63261d95c4819ebdc4c178ab6d7d67f4aaad9c7b9c8c6e41&req=diEuFcB%2FnIJbWPMW1HO4zR8GoUN%2BTUozjdPXX%2BaSOrGFi6FirId%2FFUnkpQLC%0AjrXq%0A) 4. Open Cowork or Claude Code in the desktop app and start a session. diff --git a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md index c55d9f40a3..a6b50691dd 100644 --- a/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md +++ b/content/support/14499648-how-scim-sync-works-for-enterprise-organizations.md @@ -50,7 +50,7 @@ You can trigger a manual sync from two places in your admin settings. 2. Click "Check for updates" under **SCIM sync**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1787244300&signature=0664c38a24ab96414d9f59c38b7cffae07f7340cc32724151c133e850a61e37e&req=diMmFM9%2FnoRbUfMW1HO4zW4gbDKvMcm3rgfl7PnOiunZ1eyR0V7w%2FLgGp9Te%0ABtZB%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312613548/44cd5970ee3c3b2c7f8dcd592d71/image+%2824%29.png?expires=1787280300&signature=e13c71e98f2e3b87a97b2a2a73925e8041f4a22362e8fe70680995101e51731d&req=diMmFM9%2FnoRbUfMW1HO4zW4gbDKvPc23rgfl7PnOiung9%2FEPIhjoLm4dBPT3%0ABTWx%0A) 3. Select whether to sync members, groups, or both. @@ -62,7 +62,7 @@ You can trigger a manual sync from two places in your admin settings. 3. Select whether to sync members, groups, or both: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1787244300&signature=67d6c22d99d18602020caf1565e7bbf2c2df020becbc5a37627958166e2fe6a0&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4fr3yzz8c43OpyTHzM9QkgjtY2XhqtkqSagwU%0A1QRT%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312608119/e4b0ef4f309f3c4eac8311a6ef47/image.png?expires=1787280300&signature=af6ada747cb43d89917d45cda5b2a153837702618c56d06061550cbb7ee22c18&req=diMmFM9%2BlYBeUPMW1HO4zX%2F4fr3ywzsc43OpyTHzM9QDTKfTLqgbowjcRhe1%0Ae3zT%0A) **Note:** If you trigger a manual sync while background changes are processing, your organization takes the most recent change for each member or group. If multiple changes are queued for the same member or group, you may need to resync again to make sure everything applies correctly. diff --git a/content/support/14503613-sso-login.md b/content/support/14503613-sso-login.md index 6b4262d6f6..3c07b29d47 100644 --- a/content/support/14503613-sso-login.md +++ b/content/support/14503613-sso-login.md @@ -47,9 +47,9 @@ Before configuring your Identity Provider (IdP), you must verify ownership of yo 3. Wait for the DNS propagation. Once the platform detects the record, the domain status will update to “**Verified**.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256015862/476131c3139aec4db01b96127544/10c7a165-8b26-4443-b064-9d659659c65e?expires=1787244300&signature=fbd028908a8acde378e35ee72e789d6830e0f95b5d0d3d100971911b07886bba&req=diIiEMl%2FmIlZW%2FMW1HO4zdpfuC2KHleM006zz1SmF9VQb2jaqFo5L3QTT1GG%0AVzdCTVk22Fc4pbJPlNE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256015862/476131c3139aec4db01b96127544/10c7a165-8b26-4443-b064-9d659659c65e?expires=1787280300&signature=73297350d8813dd09f79ac2f2ee71982b3f2658128bc00538cc746d7b311e6fd&req=diIiEMl%2FmIlZW%2FMW1HO4zdpfuC2KElOM006zz1SmF9VzAmhOnXLgBH%2FIxu%2Bz%0AvLYxUMK9zG5n0VFuef8%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256025910/a82e2de9382824fa9db7666f67c4/CleanShot%2B2026-04-09%2Bat%2B16_25_20-402x.png?expires=1787244300&signature=38d9d9ec33f40966bc10e438f4329c459d49e0e43a06493f14027c67f7613989&req=diIiEMl8mIheWfMW1HO4zV%2BGnR49R7tEx57dwYq5DdK0h%2BMrjwDVjiqmsuuu%0AqE9XsVLRT6dV%2Fgg3JM4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256025910/a82e2de9382824fa9db7666f67c4/CleanShot%2B2026-04-09%2Bat%2B16_25_20-402x.png?expires=1787280300&signature=319ce5a21cb1afa744bd56374ad8927c242c79891f31979ad0bf8722f9074764&req=diIiEMl8mIheWfMW1HO4zV%2BGnR49S79Ex57dwYq5DdLX%2FgBnO5BTR6qj%2FGbV%0A5TPYvEiItrjjWdjKZUE%3D%0A) **Important:** Each domain can only have one identity provider. If multiple organizations share a single login domain, IT administrators from both organizations will be able to modify login settings. Contact **[Anthropic Support](https://claude.fedstart.com/support)** for assistance with multi-organization setups. For more details about multi-organization setups, see our **[SCIM provisioning guide](https://support.claude.com/en/articles/14503643-set-up-scim-in-claude-for-government)**. @@ -77,7 +77,7 @@ Once your SAML application is set up in your IdP, provide Anthropic with the det - Claims Information — Attribute mappings for user name and email. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256004522/a97b91092b393e93b2d7779f63e6/2db86a6d-1582-419e-925e-cbc914468fa1?expires=1787244300&signature=c7bf2aa1fbde64a9c1f37e21532107821f412edac505d022574e72c202d87dc3&req=diIiEMl%2BmYRdW%2FMW1HO4zQE9JrC0%2FhD4bfNHh%2Fvd8OGPJR0T230W7H9g8hs8%0AADln7qvQfc42gfnzeuU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256004522/a97b91092b393e93b2d7779f63e6/2db86a6d-1582-419e-925e-cbc914468fa1?expires=1787280300&signature=c5fc0c04791ac234b9384029e3483880e3f8d35cf0bc98fc189a3a275e57eae2&req=diIiEMl%2BmYRdW%2FMW1HO4zQE9JrC08hT4bfNHh%2Fvd8OEEP1CFzgR%2FMBu4pthT%0AriErSZbAyszOr%2FInk5s%3D%0A) **Tip:** Using a metadata XML file: Most IdPs let you download a metadata.xml file. Upload it on the identity settings page to auto-fill the Signing Certificate, IdP Entity ID, and SSO URL. Some IdPs (like Entra ID) also include claims information in the metadata file; if present, the system will suggest field mappings automatically. diff --git a/content/support/14503643-set-up-scim-in-claude-for-government.md b/content/support/14503643-set-up-scim-in-claude-for-government.md index 08960d9502..1ca5174b57 100644 --- a/content/support/14503643-set-up-scim-in-claude-for-government.md +++ b/content/support/14503643-set-up-scim-in-claude-for-government.md @@ -41,7 +41,7 @@ With SCIM, login and provisioning are separate. Your IdP tells Anthropic who sho **Important**: Store this key securely. It cannot be retrieved after you leave the page. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040196/c3b045028c4c2edef9172b6fb424/9a71258e-ae73-41e3-83a2-d24a240ac0ae?expires=1787244300&signature=01e7a1e4200d4a54090fa2bd45bd39a788590ca0026d3f235705d0fd1e4e9cc0&req=diIiEMl6nYBWX%2FMW1HO4zSrRlasdbTIXyIvvU1hav7MCajGZgAo6WbMHOMSi%0ARSemyK2xy5UqtRx0l24%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040196/c3b045028c4c2edef9172b6fb424/9a71258e-ae73-41e3-83a2-d24a240ac0ae?expires=1787280300&signature=eae831e6b29f845142739336f1698d8acadb6c6991296b36b55429a60e5e3440&req=diIiEMl6nYBWX%2FMW1HO4zSrRlasdYTYXyIvvU1hav7N%2F4NQdiq9LqmnbJPtz%0ASANOsXNoOukodWSFShs%3D%0A) ### Step 2: Configure SCIM in your Identity Provider @@ -67,7 +67,7 @@ After enabling the integration in your IdP: **Warning**: When you fully enable SCIM provisioning, any users who were **not** synced via SCIM will be removed from the organization. Confirm that all expected users appear in the sync before proceeding. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040198/da9188b8b968d5f900cc08e9ceb2/3814ab37-c3fa-4256-8d16-49c1e1b4c654?expires=1787244300&signature=13bf82c233c704b89c580784648dbaa8145babf9ffcb44b4c866c0fb7fdf1370&req=diIiEMl6nYBWUfMW1HO4zeLvMl9tTkj5oWupW8zJgMpDQhouMyZE0edpUoXQ%0AWMK4MN8UZd0tEXDyaMc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256040198/da9188b8b968d5f900cc08e9ceb2/3814ab37-c3fa-4256-8d16-49c1e1b4c654?expires=1787280300&signature=e5bf407f3eb5c2001120cb05c7f5a98002ed545322d6948c49c0ed230cf2ab02&req=diIiEMl6nYBWUfMW1HO4zeLvMl9tQkz5oWupW8zJgMocI04YGtYiNk%2BdLMeL%0Aki8ndn1%2FGCXY7wWLcPU%3D%0A) ### Step 4: Map groups to roles and seat tiers @@ -83,7 +83,7 @@ SCIM provisioning uses IdP groups to assign roles and seat tiers within Claude f 3. Save your mappings. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256056441/f7eb09bba549e9861fc81b961cc7/2760fa5b-87bb-491f-9354-ca3cd2bc4475?expires=1787244300&signature=16daf814dc200ebe4635c4b0ab1b07dd56b0fd28bb3228c2bd9adf0db1627a13&req=diIiEMl7m4VbWPMW1HO4zaWhsXQgtkMYh340B79BYGZzx91eyztAoOIR6wYw%0A0XMTMbCBTAf1lV%2FV6X4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256056441/f7eb09bba549e9861fc81b961cc7/2760fa5b-87bb-491f-9354-ca3cd2bc4475?expires=1787280300&signature=16fcd29ec32192b3ac1a71e26b089b0246072547743240560da60cd001aa008d&req=diIiEMl7m4VbWPMW1HO4zaWhsXQgukcYh340B79BYGZ2TfnUOs33W%2BQLAzL4%0A6dzc5SjSlrilm33c2IY%3D%0A) If you manage multiple organizations under a single parent (see below), each organization maintains its own role and seat tier mappings. Switch between organizations using the organization selector in the bottom-left corner of the page. diff --git a/content/support/14503775-mcp-web-search.md b/content/support/14503775-mcp-web-search.md index 66c1358e1e..7e7a6087ff 100644 --- a/content/support/14503775-mcp-web-search.md +++ b/content/support/14503775-mcp-web-search.md @@ -4,7 +4,7 @@ The Web Search connector gives Claude the ability to search the public internet For questions about web search in commercial Claude, see **[Enabling and using web search](https://support.claude.com/en/articles/10684626-enabling-and-using-web-search)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256120763/7652c6c669446113eae75f3c5977/9c74d57e-aaa2-4f1c-bfe4-2b9b87fd41ab?expires=1787244300&signature=833d57e2edebf30584fd92273660ad0b4a6e35e0133ff2b0f6cb6d9780babd4e&req=diIiEMh8nYZZWvMW1HO4zQvFLLVRicD7M%2Fw5SJgC29FaEuVDF%2FHYDVLaQZT8%0AZXif9vY7EEDVgdfMjhE%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2256120763/7652c6c669446113eae75f3c5977/9c74d57e-aaa2-4f1c-bfe4-2b9b87fd41ab?expires=1787280300&signature=c90bd837a40a6a99ebbefaa5acef108a2f03c5f61f47e9024e503f15820fdfd4&req=diIiEMh8nYZZWvMW1HO4zQvFLLVRhcT7M%2Fw5SJgC29FQLMmmKeMm2n8NwyVW%0AoKloRuyLd5s96vtd38k%3D%0A) ## How Web Search differs for Claude for Government diff --git a/content/support/14604397-set-up-your-design-system-in-claude-design.md b/content/support/14604397-set-up-your-design-system-in-claude-design.md index 52fa86cac7..6de7e6bbc7 100644 --- a/content/support/14604397-set-up-your-design-system-in-claude-design.md +++ b/content/support/14604397-set-up-your-design-system-in-claude-design.md @@ -72,7 +72,7 @@ To validate your design system, create a test project and see if the output matc Once you’re satisfied with the design system quality, make sure the “Published” toggle is switched on. After publishing, any projects created from the Claude Design homescreen while in your organization will use your design system instead of the default. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287527007/b1c46cb8dba4cd7e8bbea85fb0c3/2819c6cf-9ce1-4df5-84c8-feae0164bf2e?expires=1787244300&signature=8fee48536857b22199c133e73b1884003f74ae87ff9302c43c5e64dd87e9e0db&req=diIvEcx8moFfXvMW1HO4zWNHF%2FWJCj8UIQKNMXlu0T9UpjZVgOVzFs24WqZg%0AoaL6TJGAAVGZKkBc3II%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287527007/b1c46cb8dba4cd7e8bbea85fb0c3/2819c6cf-9ce1-4df5-84c8-feae0164bf2e?expires=1787280300&signature=fdeedb1f1838ca0dd4622973e29e61ce3309076ac7bcf99935674167138fce59&req=diIvEcx8moFfXvMW1HO4zWNHF%2FWJBjsUIQKNMXlu0T%2BMkgakH4Hwh1GJINIZ%0AadbjirBnfo9W93slV7o%3D%0A) --- diff --git a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md index f17c6ebeff..493e53065f 100644 --- a/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md +++ b/content/support/14604406-claude-design-admin-guide-for-team-and-enterprise-plans.md @@ -18,7 +18,7 @@ Team and Enterprise plan admins can enable this organization-wide by following t 2. Find the **Claude Design** toggle under **Anthropic Labs** and switch it on. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2289240025/8a528b6cccc3ea1001c25953cb14/image.png?expires=1787244300&signature=7b87fab5354024e0697aa24f13289d2b8e7e6a6802b7e3aab5264f87436f02b0&req=diIvH8t6nYFdXPMW1HO4zahp3eUKHeImDIPtKBLQ9H%2FyTC4n9j9ZFgyif3L7%0Aqm3qya%2FEKsh0bHVGC4w%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2289240025/8a528b6cccc3ea1001c25953cb14/image.png?expires=1787280300&signature=fe28ff24fddcaab159cd2da0ceee1c14c1a479d3414fc9655dc67dc0a2afbcba&req=diIvH8t6nYFdXPMW1HO4zahp3eUKEeYmDIPtKBLQ9H%2BI2aRGBhj5UQ1UchRe%0Azu6kthA37dOr00zjJ98%3D%0A) --- diff --git a/content/support/14604416-get-started-with-claude-design.md b/content/support/14604416-get-started-with-claude-design.md index 01bb1e42d1..84bb69586e 100644 --- a/content/support/14604416-get-started-with-claude-design.md +++ b/content/support/14604416-get-started-with-claude-design.md @@ -153,7 +153,7 @@ Use the “Export” button in the upper right corner when viewing your project - Send to Claude Code Web -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287510952/553a03eec5cea7b9eff53b473552/6dc33363-38b1-444e-96bb-f8218b588173?expires=1787244300&signature=24ac4fa7d7549e7a61cbb71e04b7c1344c2b9bb8d745f0720b41e3cc634fe5d4&req=diIvEcx%2FnYhaW%2FMW1HO4zQFD4StYn2l3nfz9ljnuyXRi%2FiFHxvlDc9a8yk%2BT%0AY5mVANhubbKGMgMEM9Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2287510952/553a03eec5cea7b9eff53b473552/6dc33363-38b1-444e-96bb-f8218b588173?expires=1787280300&signature=4bdf5d18124beafb8d7ea5508a73cbc3b8a03b375e0175ffc87a2e2348155d59&req=diIvEcx%2FnYhaW%2FMW1HO4zQFD4StYk213nfz9ljnuyXTNyJm1Wef1v8%2Bi2LSD%0AT%2BYLFJRjdsqh1ZqqYkI%3D%0A) You can also share projects within your organization using a shareable link. Sharing options include view-only, comment, and edit access. diff --git a/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md b/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md index 0e9d803b6a..fa1aebd1f8 100644 --- a/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md +++ b/content/support/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet.md @@ -39,6 +39,14 @@ How you apply depends on how you access Claude. Once you submit your application **Are you a platform owner?** If you use Claude to power products or services available to your customers and want to learn whether your platform is eligible to participate in the Cyber Verification Program, please **[fill out this Platform CVP Interest Form](https://claude.com/form/platform-cvp-interest)**. +## Enabling access on Amazon Bedrock + +If your application is approved and you'd like to use the Cyber Verification Program on Amazon Bedrock, you'll need to enable data retention for the project or workspace you plan to use. Follow the steps below. + +1. Make your requests with the header `anthropic-beta: cvp-data-retention-2026-06-24`. + +2. Set your account or workspace data retention mode to `default` (or `provider_data_share` if you also use Fable). Requests will error otherwise. See the **[Bedrock data retention documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/data-retention.html#data-retention-modes)** for more information. + ## Appeals We expect to occasionally decline eligible applications incorrectly, and approved users may still experience blocks on legitimate work. We’re actively working to reduce both. diff --git a/content/support/15330088-set-a-default-model-for-your-organization.md b/content/support/15330088-set-a-default-model-for-your-organization.md index 7a33504318..b5082ec219 100644 --- a/content/support/15330088-set-a-default-model-for-your-organization.md +++ b/content/support/15330088-set-a-default-model-for-your-organization.md @@ -46,7 +46,7 @@ The organization default applies to every member. To set it: 4. Click “Save changes.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1787244300&signature=46eb651dd4607cbdc0538c52cfc666644a11513c8199a7a711698444c3070e03&req=diUmEs58n4BcUPMW1HO4zelOdzVCKUxEfdGVZ664dGHWSeeGMGaePw86NKSN%0A61VcxjV%2F9sI7nDedv74%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514722139/d05c94072a41ea9090ecf386c53e/c32ee31d-954a-4551-a2da-91677fbd0b6f?expires=1787280300&signature=57fa404ec829f424511028edb9c328edc2c07583618f68da58e70d7ff06f20ee&req=diUmEs58n4BcUPMW1HO4zelOdzVCJUhEfdGVZ664dGFKrzcFEP3yVM3et1nO%0A73jds%2BTXDsHXpgt7Mts%3D%0A) --- diff --git a/content/support/15694740-manage-model-access-for-your-organization.md b/content/support/15694740-manage-model-access-for-your-organization.md index 939fcecc4c..9ede487d12 100644 --- a/content/support/15694740-manage-model-access-for-your-organization.md +++ b/content/support/15694740-manage-model-access-for-your-organization.md @@ -42,9 +42,9 @@ The organization setting is the ceiling, so a role can’t grant access to a mod If any custom role uses the model you’re disabling as its default, you’ll be prompted to change that role’s default before the change can be saved. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1787244300&signature=5e11cbf20c6239c6455ad2fec26cc63c6caab3cc0dd30a48fcb85c184783192c&req=diUmEs93nohdWPMW1HO4zXlxEuC7U9VUQf5Pb7M2Q0uJ%2FzPdVB6haJQgZ4Wj%0AtoknwM%2BFQfjZHIiV74Q%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693921/02ea72756f5163f14e5d158516dc/69102088-cd86-498e-97aa-c8a6e0004419?expires=1787280300&signature=53bd170742983d2f78b9c7eb26a597e478abd9239bc0590e31056df8be74f7fb&req=diUmEs93nohdWPMW1HO4zXlxEuC7X9FUQf5Pb7M2Q0uDF5GNk8CULFkqVI9X%0ApR6eu5t05duVx3to0fQ%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1787244300&signature=246668e4c04719c236d3ec2611ad76fea4c807cdf63d5909f86afa193c6da401&req=diUmEs93nohdW%2FMW1HO4zTqNsY7HQlxUAod9uc510lxZ%2B4G%2BVRbp69vIA9fk%0Aw1PHwlAje8ZjrQ%2Ba3Yc%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693922/bfc5de6626eb19dca1d7caf818ca/c3cd8bb6-f86c-4d01-92da-6ae4ca966662?expires=1787280300&signature=32bfd753707b608b6013086e6b881f22502c75b6fa145dc12e71ec17dfcb46e9&req=diUmEs93nohdW%2FMW1HO4zTqNsY7HTlhUAod9uc510lyJGqBJUf%2FhIOIFkD67%0A%2BfboPKg%2Fg%2B1eYDedpGs%3D%0A) --- @@ -62,7 +62,7 @@ If any custom role uses the model you’re disabling as its default, you’ll be Only models the role grants access to can be selected as that role’s default model. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1787244300&signature=36f9158e6c51bdf6f5fd9b77eee8c5683635749fb58f7a32f4364ca5bac22594&req=diUmEs93nohdWvMW1HO4zYj9SfIB6YW%2BXsqpNqvyFRKCuM9XbSEbOeanXs8%2B%0AOVk%2FRnXzQ9zro0QwUOU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693923/880665a87dbd4776cf19d6063a37/29d30c6d-f9fc-408c-8c72-4320c6d88d14?expires=1787280300&signature=ccc2ae0e0afbe3c342c36463d71de3bfe7ece8f7e65d876fb22eea3d9bf204fa&req=diUmEs93nohdWvMW1HO4zYj9SfIB5YG%2BXsqpNqvyFRIWbcZuI59cmgQjaY7W%0AVSv3dhy6uU8LWP1YhJM%3D%0A) --- @@ -80,7 +80,7 @@ Effort limits determine how much computation members on a role can apply per res 5. Click "Save" to save your changes. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1787244300&signature=62aaef850856839b4e554bd98cf136cf4ba7715ed675307d01372d0a6109efc9&req=diUmEs93nohdXvMW1HO4ze1xBjS%2Bd70aDeA1RkowXUHo4UblSV2p6KFCebVj%0AqwQwyklmD4fCFi3IK48%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2514693927/7a25673b3b075d72adb3cdc371e3/d2d7cd8d-a713-4e91-a706-f589ac46a9fe?expires=1787280300&signature=7b284792ea8a52b2de3b4cde9b790e8435325574370fcd7b464976763125f7cb&req=diUmEs93nohdXvMW1HO4ze1xBjS%2Be7kaDeA1RkowXUEKGjTVLDyI8nDCP1fw%0AJMY8dXFjbVwoH27%2FR8c%3D%0A) Members on the role see only effort levels at or below the cap in their model menu. Note that available effort levels differ depending on the model, and some models don’t support effort level settings at all. For an explanation of each level, see **[Change the model, effort, and thinking settings](https://support.claude.com/en/articles/8664678)**. diff --git a/content/support/15936181-get-started-with-1password-for-claude.md b/content/support/15936181-get-started-with-1password-for-claude.md index 30088596fe..a63a0e5a35 100644 --- a/content/support/15936181-get-started-with-1password-for-claude.md +++ b/content/support/15936181-get-started-with-1password-for-claude.md @@ -52,7 +52,7 @@ Once the requirements are in place, you can set up 1Password from a few places i 4. Toggle on **Password managers**: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1787244300&signature=87a763b303675340a2f5918930a3fbcf165238d36c9bbc5956498bdab6f1e0ad&req=diUjEMh8m4RWX%2FMW1HO4zU5lnmxsqcFgGkiu4hEpcPUAiRb5QlBbyt7Pc30j%0AAKya5pVUwcdKeSadJYA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2546126596/ba71ca47e2df21cec62c243831f8/5b1c67e1-607d-4c73-8f61-d1ceb081082a?expires=1787280300&signature=49da4673878521e622b0b5fba2e8d9a2ef9afeb4607e2d0517273b962ccad835&req=diUjEMh8m4RWX%2FMW1HO4zU5lnmxspcVgGkiu4hEpcPVwj6rq9WcBMt4lAjjG%0ADHWFbFqf3HvAqPOzsZg%3D%0A) Once enabled, eligible users will see the discovery options above. Users still need to install and set up the required apps and extensions themselves. diff --git a/content/support/8114491-get-started-with-claude.md b/content/support/8114491-get-started-with-claude.md index 5ae36ee348..b2dc6e2207 100644 --- a/content/support/8114491-get-started-with-claude.md +++ b/content/support/8114491-get-started-with-claude.md @@ -36,7 +36,7 @@ You use **prompts** to communicate with Claude. The best approach is to speak to Type your prompt into the chat interface and click the submit button to start a conversation with Claude. You can click the "+" button in the lower left or type "/" to view additional options and commands: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1787244300&signature=1911ce10fd3e170ee63be91b84355168b9bafa448f0d8a4b763ef4d528e71179&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7SjIsIOC9crMELaMZPz15Dds2nXEoLlHHyeY%0A2Th%2FtUkHcWWddZP2uhg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1916208578/2cf2ea52f1f884084b57983a8805/image.png?expires=1787280300&signature=94a382064b933558f667edb7b5109f09d82a1a48345bebabe965f2e3aa78d30b&req=dSkmEMt%2BlYRYUfMW1HO4zV2J7SjIvIeC9crMELaMZPxf062t5Kwq4nVOrQhU%0AqdMcRqknhASDaO7zksc%3D%0A) --- diff --git a/content/support/8230524-delete-or-rename-a-conversation.md b/content/support/8230524-delete-or-rename-a-conversation.md index 2970c8018e..f48f2bbad2 100644 --- a/content/support/8230524-delete-or-rename-a-conversation.md +++ b/content/support/8230524-delete-or-rename-a-conversation.md @@ -44,15 +44,15 @@ These steps apply to Claude for iOS, listed on the App Store as Claude by Anthro 4. If deleting, tap "Delete" again in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599501318/75c28edc693efbe8befd21e4da64/d18a921a-df4b-4788-833c-12c966a32527?expires=1787244300&signature=bde62705313c8a84e0f471f6d038fb5c07d06bf7c141d630c5dd6f88a6c4c8b9&req=diUuH8x%2BnIJeUfMW1HO4zSc12alYjGSo1DBI29QsIlGAszZDkJlI5%2F%2BpYD0f%0Ai1QkR06KLeNgWp4%2Fdfg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599501318/75c28edc693efbe8befd21e4da64/d18a921a-df4b-4788-833c-12c966a32527?expires=1787280300&signature=0d50c7662aabfb9c9a49c5787d8cb4785b5eaf648efb0ea0ff7f47ec92ca8e0f&req=diUuH8x%2BnIJeUfMW1HO4zSc12alYgGCo1DBI29QsIlFiVEwQxdZxF95LpnI0%0Ag5UPBlFitzXi08cevOo%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493852/2e58b92d18f307bb79ae30650f26/1bbe52f3-202b-4d5d-9f9a-eeda4d6952c3?expires=1787244300&signature=b480c234e74f811e433f2e488e8ac12c2f55f526fa2203233e00db3fd5bccd10&req=diUuH813nolaW%2FMW1HO4zTjXMuCOKsTmj7blKEDtUI2SBr%2F9NVgAYu8ZXBNT%0AFYsyUsl6YDOOc%2F7A0oA%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493852/2e58b92d18f307bb79ae30650f26/1bbe52f3-202b-4d5d-9f9a-eeda4d6952c3?expires=1787280300&signature=128b785bf2eb4803db4d37d79296fc3720c36838bbe3ff9cbf46598bf4df87b3&req=diUuH813nolaW%2FMW1HO4zTjXMuCOJsDmj7blKEDtUI3yoHo4B5L6Ofo4BVY9%0A0krdHAQSP7ES5LwW9qE%3D%0A) You can also delete the conversation you have open: tap the "⋯" button in the top right corner, tap "Delete," then confirm. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493848/997184c386d0e6fb0bd2d7c1f2b6/5d2bc394-25fc-4814-8c2a-2f54d004f83f?expires=1787244300&signature=e3e725b39e6be470e5a47a45ef763a52fa4b51b62d3c2089bcdb3d5df8cf9b7a&req=diUuH813nolbUfMW1HO4zVCIqp3Nz9hFzQl%2BKgU984zg7HebjNp3cPhIEGno%0AyqAwI6KztGjQMeHCJbg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493848/997184c386d0e6fb0bd2d7c1f2b6/5d2bc394-25fc-4814-8c2a-2f54d004f83f?expires=1787280300&signature=409f39d7af7d57b7dbb5f8dfe40b11f4e9b7de36e0082424a20f81dd4c1382b9&req=diUuH813nolbUfMW1HO4zVCIqp3Nw9xFzQl%2BKgU984yZyefCRuX4NaQtZkzg%0ATT2w6iv6KCwSwphjJGw%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493856/799041da9fa918e90068c5ebf5bd/2e8d5cee-c45a-41d7-a14b-486e50a37f88?expires=1787244300&signature=2642580a5051a3f9efa5a6f781e7015f1e50c1483da4dfbe9c0ee17eb4107529&req=diUuH813nolaX%2FMW1HO4zVCl4A%2Fw1WFOEDIU8RT6jk1VTVLMaCH84iIiBVJ9%0ALTAcjIXdArA64lAz7zg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493856/799041da9fa918e90068c5ebf5bd/2e8d5cee-c45a-41d7-a14b-486e50a37f88?expires=1787280300&signature=31d9744a42967be641090ab7d6bc6590243c762e3b6dfa430d6cfae1cb8c3d0b&req=diUuH813nolaX%2FMW1HO4zVCl4A%2Fw2WVOEDIU8RT6jk1eOR78m9%2FhIM1xwIaw%0AbXYS4HN97LHmnrzBePg%3D%0A) ## Delete or rename a conversation on Claude for Android @@ -66,9 +66,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by 3. If deleting, tap "Delete" again in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493850/a64e6561222d535f2f5bd03e71f0/5de429c2-d8ed-4e8a-89e8-a13ccaa49767?expires=1787244300&signature=953ed88d56a26601c7c6a98611e4c23de1535bfd161a1baca2e35be987a8a1a8&req=diUuH813nolaWfMW1HO4zVTdd9UuxlR2rqtc0YNNUtLHzLTfbt5Gfli%2F%2FK5s%0Ag5%2FHxjWphIP17nsFraw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493850/a64e6561222d535f2f5bd03e71f0/5de429c2-d8ed-4e8a-89e8-a13ccaa49767?expires=1787280300&signature=63779a48b7f64ddea7727f63fbae613bf6e253c6757fc50c8911d72760f8c940&req=diUuH813nolaWfMW1HO4zVTdd9UuylB2rqtc0YNNUtJzOQ2krAHpXp7S8vfJ%0A2D1JOUg61MF%2BWjsXGJM%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493851/f21b39c60e88050d4b0745325f0d/0a8c0d08-dc53-4ef1-8d9f-2b995242c1f9?expires=1787244300&signature=e91d85e7b904656568b31bb2bb5d3f55f30caf8a26af87ff2b227d4c766f3984&req=diUuH813nolaWPMW1HO4zUYvw1IJpjpf%2FjekULCQNzUNrUDoIZzvLYODCbml%0Al49v8hqi53WizVogH0o%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493851/f21b39c60e88050d4b0745325f0d/0a8c0d08-dc53-4ef1-8d9f-2b995242c1f9?expires=1787280300&signature=983edd5c87d2124d5d3c91f567b31d0fd1eb6ed49d7719051d42c3fdf8d203d8&req=diUuH813nolaWPMW1HO4zUYvw1IJqj5f%2FjekULCQNzXE7JLgRR2doeh5MY16%0AMRSRPE8bov608v2VE%2FY%3D%0A) **To delete multiple conversations at once:** @@ -78,9 +78,9 @@ These steps apply to the Claude for Android, listed on Google Play as Claude by 3. Tap the trash icon, then tap "Delete" in the confirmation prompt. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493849/3013a0ab921337b4544f7ffeffa6/e828ec14-fb52-4205-a840-707b6f2a848d?expires=1787244300&signature=396f5cd712fdf106113e0e53dbcfc355080d743717d0b458c422426490e2df70&req=diUuH813nolbUPMW1HO4zWGamMB2fonc4AqhTnZa84XOrQE%2F0J5AMjbzzg4V%0AO78T5rOJMnECFYfsdbM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493849/3013a0ab921337b4544f7ffeffa6/e828ec14-fb52-4205-a840-707b6f2a848d?expires=1787280300&signature=c7acc2c9f9646165a1644c8150daa5494eff6f4bb766de9d1b7e70cb12f14fa3&req=diUuH813nolbUPMW1HO4zWGamMB2co3c4AqhTnZa84WoTwb7uh4c2fOKxJ7n%0ARk22OgyQmvuEIV4rri4%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493853/e2507f53cce8a26776a22a457b1a/bd79bb8a-b078-420f-a4e1-75590367aa80?expires=1787244300&signature=a8a8a429597f34af7441c9b28466e6f82b18f99189a5089260287d4b8d04dab4&req=diUuH813nolaWvMW1HO4zQTtExLzwEQ7SBGfF3I2bRjAG6wGp2srv9lWrWMf%0AgKGBidWC8TjtzuoycLQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2599493853/e2507f53cce8a26776a22a457b1a/bd79bb8a-b078-420f-a4e1-75590367aa80?expires=1787280300&signature=34657d5ff5a734388296bfd391856e560b1891f3f76c8855482ed587e7b1f94a&req=diUuH813nolaWvMW1HO4zQTtExLzzEA7SBGfF3I2bRizZQZYa%2BbKn0KnWMVv%0AjKCArKtCB8RtBQA2F6o%3D%0A) ## What happens when you delete a conversation diff --git a/content/support/8325618-paid-plan-billing-faqs.md b/content/support/8325618-paid-plan-billing-faqs.md index c798d13e93..05fbffb815 100644 --- a/content/support/8325618-paid-plan-billing-faqs.md +++ b/content/support/8325618-paid-plan-billing-faqs.md @@ -50,7 +50,7 @@ There's no separate option to remove a card, and updating to a new card replaces If you want to use a name other than the one tied to your payment method, check the "Use a different name on invoices" box when adding or updating your payment method in **[Settings > Billing](https://claude.ai/settings/billing)**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1787244300&signature=077a243d1628b247988988ba47fb5fd7ec5a6ef5162b1260d9b2bbf0340beb1c&req=dSklFMh6nIZXXPMW1HO4zVXW8GqpbzfPQoNvNFTb5ccLiGgOr2zF0WUm8EMw%0Azo6xmIXomdgXrQ7TEDQ%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1922141785/666191101c11030b05f03a668a74/image.png?expires=1787280300&signature=f8de1bc405ec20edd3215a7f7c3841b32a11a50728a029c7b65f5b8500a16442&req=dSklFMh6nIZXXPMW1HO4zVXW8GqpYzPPQoNvNFTb5cdoZ34GQFHqWT7vqHEL%0ADgtDl3YKaCKALBBFGF8%3D%0A) ## How can I edit a paid invoice? diff --git a/content/support/8606394-how-large-is-the-context-window-on-paid-claude-plans.md b/content/support/8606394-how-large-is-the-context-window-on-paid-claude-plans.md index f4eadc5209..f9cb0cd051 100644 --- a/content/support/8606394-how-large-is-the-context-window-on-paid-claude-plans.md +++ b/content/support/8606394-how-large-is-the-context-window-on-paid-claude-plans.md @@ -4,6 +4,8 @@ Claude Opus 5 and Sonnet 5 support a 1M token context window on all paid plans w When using Claude Code with a Pro, Max, Team, or Enterprise plan, Claude Sonnet 5, Fable 5, Opus 5, Opus 4.8, Opus 4.7, and Opus 4.6 support a 1M token context window. Pro users need to enable usage credits to access the 1M token context window for Opus models. Sonnet 4.6 also supports a 1M context window for all paid Claude plans on Claude Code, but usage credits must be enabled to access it (except for usage-based Enterprise plans). +When using Claude Cowork with a Pro, Max, Team, or Enterprise plan, Claude Opus 5, Opus 4.8, Opus 4.7, Sonnet 5, and Fable 5 support a 1M token context window. Claude Sonnet 5 automatically compacts the conversation at 500K tokens. Claude Sonnet 4.6, Opus 4.6, and Haiku 4.5 support a 200K token context window in Cowork. + ## Automatic context management For users on paid plans with code execution enabled, Claude automatically manages your conversation context. When your conversation approaches the context window limit, Claude summarizes earlier messages to make room for new content. This does not count towards your usage limit, and allows conversations to continue indefinitely in most cases. diff --git a/content/support/8887527-customizing-your-appearance-settings.md b/content/support/8887527-customizing-your-appearance-settings.md index 3722aa1f86..0f095dc06e 100644 --- a/content/support/8887527-customizing-your-appearance-settings.md +++ b/content/support/8887527-customizing-your-appearance-settings.md @@ -8,7 +8,7 @@ 3. Select from Light, Match System, and Dark under **Color mode**. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1787244300&signature=d1c0598d019ff1f98de865830bf05ce32b4c969e5bd413391817f4671237d761&req=dSYjHst4nYVeXvMW1HO4zc2jJ6U%2FhI%2FnSBkgeTglJrp3UT44hkRem3i0BxCo%0AoIG%2F5YrVtrFgvC0tzp8%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260417/d478c757c7115ad58a12026d4caf/AD_4nXc__Qop4X9hknWGfGj_y_DCpLutLruhxIclJIfir0ilsgNMg7X8ksIVnqk1Oce5FKlGIOYu9CKbVsu8DqD7iIY2aC0ZfXMyFTeAdNq-Cao2mXcj_WUpNF0kM2HoYR_dEx6N_cuJow?expires=1787280300&signature=e078050463da9bda54a9b96333f18afbef67442ea75c82f6362dabcdc475c52b&req=dSYjHst4nYVeXvMW1HO4zc2jJ6U%2FiIvnSBkgeTglJroAs%2Bbu97Q5EC6lNtOV%0A4fXRdmb%2FGj774b6Dy9s%3D%0A) ## How to change your font @@ -16,10 +16,10 @@ 2. Select from Default, Match System, and Dyslexic Friendly. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1787244300&signature=882a647c174b637ef0f5235fd6cf571ccfc4850ca7a09aa847f1291947446277&req=dSYjHst4nYVeX%2FMW1HO4zc8962fnWXU%2FQtNFlF5%2FHEeYlzVttvqGFdw40PDT%0A3GGdnRSHJR5vrAULVLo%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1648260416/7fc0803d44d8de40f8e6636b2eb6/AD_4nXf0UEDa1i2QmqlQtoB5BgpQ-FfZVzss_7wMVQdvkmEDSfoTxixnG0GSxC6qrOs21HdkXH-I2Yn_GHDAf8yjd6FJtoh9FadALozvIErFp9r8LychDGLPb7OpN1CN4PRcgVAYNCre?expires=1787280300&signature=e88bff58e1fc31c13c8c3d3301020dbdc400c447cc1a75f967d8d0c39ed71878&req=dSYjHst4nYVeX%2FMW1HO4zc8962fnVXE%2FQtNFlF5%2FHEfWVnkXl%2FFBlAe8icMk%0ANY9LY0rD23K%2BtHgYT3s%3D%0A) ## Can I disable the sidebar? It's not currently possible to completely disable the sidebar. You can click the button on the top right of the sidebar to open or close it. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1787244300&signature=1db4c0c2239845d243aea25aece5242a92cf2aadf42a20056c1a292804accea0&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BB1j0XX%2FsylfYa7uDb9mtOpHAtj8XygbBIpMk%0AKMGdD0SA06U3HlBGkrc%3D%0A) \ No newline at end of file +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1941108004/5217903737ddd9bb62fe5d7a904c/CleanShot+2026-01-14+at+09_12_58.png?expires=1787280300&signature=bf2d6924aad2e958e53833fd51933b672245f5acc44e77eaff072789d9a5f8e5&req=dSkjF8h%2BlYFfXfMW1HO4zUS%2BB1j0UXvsylfYa7uDb9k6zrT9b6gVQxqVjY2V%0AIOqrb8OeAvYcOgH6%2Beo%3D%0A) \ No newline at end of file diff --git a/content/support/9028421-delete-your-claude-account.md b/content/support/9028421-delete-your-claude-account.md new file mode 100644 index 0000000000..00f3285068 --- /dev/null +++ b/content/support/9028421-delete-your-claude-account.md @@ -0,0 +1,61 @@ +# Delete your Claude account + +This article shows you how to permanently delete your account on the web and in the Claude mobile apps, and explains what happens to your data when you do. + +**Important:** Deleting your account is permanent. You'll lose access to your conversations, projects, and other saved data, and you can't recover the account afterward. If you want to keep your data, export it on web or desktop before you delete. Learn more about **[exporting your Claude data](https://support.claude.com/en/articles/9450526-how-can-i-export-my-claude-data)**. + +## Before you delete a paid account + +If you're on a Pro or Max plan: + +1. Cancel your subscription from your **[Billing settings](https://claude.ai/settings/billing)**. + +2. Wait until the end of your current subscription period. + +3. Once the subscription lapses, delete your account using the steps below. + +For detailed cancellation instructions, including for Claude for iOS and Android, see **[Cancel your Pro or Max subscription](https://support.claude.com/en/articles/8325617)**. + +## Delete your account on the web + +1. Go to **[claude.ai](https://claude.ai/)** and click your initials or name in the lower left corner. + +2. Select "Settings," or navigate directly to **[Settings > Account](https://claude.ai/settings/account)**. + +3. Click "Delete account" and follow the prompts. + +## Delete your account on Claude for iOS + +These steps apply to Claude for iOS, listed on the App Store as Claude by Anthropic. + +1. Open the Claude app and tap "Settings." + +2. Find the **Account** section and tap "Profile." + +3. Tap "Delete account." + +4. Tap "Delete" to confirm. + +## Delete your account on Claude for Android + +These steps apply to Claude for Android, listed on Google Play as Claude by Anthropic. + +1. Open the Claude app and tap the menu button in the upper left corner. + +2. Tap your initials in the lower left corner. + +3. Tap "Profile." + +4. Under **Account Actions**, tap "Delete Account." + +5. Tap "I Understand" to confirm. + +## What happens when you delete your account + +When you delete your account, you’ll no longer have access to your conversations, projects, and account information. Learn more about **[how long Anthropic stores your data](https://privacy.claude.com/en/articles/10023548-how-long-do-you-store-my-data)**. + +## When you need to contact support + +In some scenarios you'll need to contact our team to delete your account. If this applies to you, it'll be noted in your account settings. Learn more about **[how to get support](https://support.claude.com/en/articles/9015913-how-to-get-support)**. + +If you have multiple accounts associated with the same email address, you'll need to specify which accounts you want to delete when you contact us. \ No newline at end of file diff --git a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md index cdf871dc9e..b1997f1f3a 100644 --- a/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md +++ b/content/support/9267400-move-your-personal-claude-account-to-a-team-or-enterprise-organization.md @@ -126,7 +126,7 @@ For the full walkthrough of your options, deadlines, and what happens to your su You may have both a personal account and an organization account tied to the same email address. You can switch between them by clicking your initials or name in the lower left corner of the screen. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312193347/712f763fc290b2488c103849f20c/0c135a6f-3442-4ee1-9ab7-98673f03ef6e?expires=1787244300&signature=0baff71d57199698de5d1753567f615ee653c896fa14949206990be9d19edcb2&req=diMmFMh3noJbXvMW1HO4zXhPndc0zBtiufhmlOXMdYYu1jwedNTnwAPrvcv4%0Au8gOf5vMR8xtYjiHLqg%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2312193347/712f763fc290b2488c103849f20c/0c135a6f-3442-4ee1-9ab7-98673f03ef6e?expires=1787280300&signature=ba4721ed2dd793ac5d198da39f7da8a189709d260aa3e2cd5ea6bfc71ad5f88b&req=diMmFMh3noJbXvMW1HO4zXhPndc0wB9iufhmlOXMdYb%2FVQy8yG5RiLf5xo1n%0AfNbhsNIjlWvEBsAs3qA%3D%0A) A blue checkmark shows which account you're currently using. Click the other account to switch to it and access its separate conversations and projects. diff --git a/content/support/9519189-manage-project-visibility-and-sharing.md b/content/support/9519189-manage-project-visibility-and-sharing.md index 33a0163c98..1a7fdc874e 100644 --- a/content/support/9519189-manage-project-visibility-and-sharing.md +++ b/content/support/9519189-manage-project-visibility-and-sharing.md @@ -12,7 +12,7 @@ When creating a project on a Team or Enterprise plan, you can choose between two - **Private:** Only invited members can view and use the project. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370991/2b6b16e5deff094e073a5b4bb0ea/63197103-24c0-41e5-aebd-9b8f431837bb?expires=1787244300&signature=03aabfb1935ee90730378b99f7676bf04e703e224748e2b79516dac9b532494b&req=dScjFsp5nYhWWPMW1HO4zd3a2VsmIIqkHK95%2FTFaPyncZY2ny3XDWwvtjZqj%0A67yjAkPgvc9TSKDwatw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370991/2b6b16e5deff094e073a5b4bb0ea/63197103-24c0-41e5-aebd-9b8f431837bb?expires=1787280300&signature=423db25873b9f45fa6348f33c9ca09b8e3efefe2fe2e395fde3cb38d49c53f52&req=dScjFsp5nYhWWPMW1HO4zd3a2VsmLI6kHK95%2FTFaPykv8uJiEypm7iIbaaYS%0AMNDeo3rSLMccvCUEyMs%3D%0A) ## What are public projects? @@ -22,11 +22,11 @@ If you choose to share a project with the rest of your organization upon creatio Yes, you can switch the visibility of a project you created as public to private at any time by opening the project and clicking the “Share” button to the right of the project name: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370987/5d5db997e6b42e627ffa62fddf75/4823906b-9535-4a19-b89e-a1003f1e6e68?expires=1787244300&signature=b5cd3e2a555c94b3fde28eb12753585127425ac71d2f47ac9accb5fa92acc54b&req=dScjFsp5nYhXXvMW1HO4zUiDoi71hQIqE8Kp5wh0MSBxNthX%2FMn%2Bqb9aXm1I%0AMNXjeJSj%2BYgWQU4%2FT3A%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370987/5d5db997e6b42e627ffa62fddf75/4823906b-9535-4a19-b89e-a1003f1e6e68?expires=1787280300&signature=70f6f7c025489cee0a859306f723631422c4dd249185e45497dc35e21aea61e6&req=dScjFsp5nYhXXvMW1HO4zUiDoi71iQYqE8Kp5wh0MSDJg2ZRQd0Q5sR73ksp%0ANKJfa8uN5GI5aI1cx7A%3D%0A) Click “Everyone at [your organization]” under **General access** and select “Only people invited” to change the project from public to private: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370988/386407facbf3e73d2f5538623a18/69d8ffcd-e1ca-470f-a219-5b88704e41f2?expires=1787244300&signature=0b2dff9f8ee88f762814fd7668447b6fb13123f8254ee3479e3ef4f9f51acf5d&req=dScjFsp5nYhXUfMW1HO4zckCIfVgZianl3XeGelDRW1lL3kcUdOKYSzSwztA%0ABz9p8ZslD7uNKxmY7m0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370988/386407facbf3e73d2f5538623a18/69d8ffcd-e1ca-470f-a219-5b88704e41f2?expires=1787280300&signature=2fd63eb2994e800a8528b58d2d7bdc846d6b977648197a8ac04712fa9f1f40a2&req=dScjFsp5nYhXUfMW1HO4zckCIfVgaiKnl3XeGelDRW2fNP4S%2BDUgeCxz3shf%0ADX51bRnEqrtjgYSYzFE%3D%0A) ## What are private projects? @@ -36,11 +36,11 @@ Choosing “Only people invited” keeps your project private so that you are th Yes, you can switch the visibility of a project you created as private to public at any time by opening the project and clicking the “Share” button to the right of the project name: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370989/f829dcd8bdd88e944322f678323f/9d25eff1-6df3-40be-82eb-ba7fe09187e8?expires=1787244300&signature=3316569dbd26110be3cfd883408c7c44b5d74cd36b423ea5aa7e1895edb68cb0&req=dScjFsp5nYhXUPMW1HO4zaSEGlSeTrwO2JrJefVtywmCV1Ydkz642pbNZ1%2FP%0AF3AF87Yo2rx%2B%2FlgrMhs%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370989/f829dcd8bdd88e944322f678323f/9d25eff1-6df3-40be-82eb-ba7fe09187e8?expires=1787280300&signature=719712a045bc9459843111f58b9c1e00232e384855a9703366b32ffef4336ba6&req=dScjFsp5nYhXUPMW1HO4zaSEGlSeQrgO2JrJefVtywmbBYckp5nRoklujMWW%0A0chMuxsOvNXBHEYQOjE%3D%0A) Click “Only people invited” under General access and select “Everyone at [your organization]” to change the project from private to public: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370990/d173fbc6f030780d30c6d7b8e204/7e47b9d1-89fe-4607-8b5b-f7b06e7ad0d6?expires=1787244300&signature=98b3d30478ff6c8fec9bbc81be1527b3e2d1805e2abf1bf2b23195060f9ae0b7&req=dScjFsp5nYhWWfMW1HO4zT7Q08%2B5uQgVAmYRPrgMBZmwsYUcf1n17j%2FphYYx%0AqMDyw%2Fo0spnMW0n7Y7c%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1740370990/d173fbc6f030780d30c6d7b8e204/7e47b9d1-89fe-4607-8b5b-f7b06e7ad0d6?expires=1787280300&signature=b9cad6a9265780bc5a48cad9ec1820df08ee516cdb30ce6702e400d33004d740&req=dScjFsp5nYhWWfMW1HO4zT7Q08%2B5tQwVAmYRPrgMBZkNT20DjI5aMqCGzdjL%0AkqexFXQAtu0JsHzoRpU%3D%0A) ## Add and remove access to private projects diff --git a/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md b/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md index f9be70153b..5819c50cae 100644 --- a/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md +++ b/content/support/9534590-cost-and-usage-reporting-in-the-claude-console.md @@ -8,7 +8,7 @@ The Claude Console provides detailed cost and usage reporting to help you effect Users with access to these reports can click into them on the left navigation menu on the Console: -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584654217/db0a977417e38e43639f060d96e0/image.png?expires=1787244300&signature=967f0037a99725e61ce9fd23191f7ab4389e6c74d62d2232c400b987922aad8d&req=dSUvEs97mYNeXvMW1HO4zYCWiSMahcKZuqqBX2puyxQTAKXsmoBX1okTXdXP%0AxKiV%2Betp1nLs%2F4wjVJk%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584654217/db0a977417e38e43639f060d96e0/image.png?expires=1787280300&signature=9fb4a6ad03f88f6d21dfddd7d65b1e959a73e0590f3d5353cb4728ed4c1be820&req=dSUvEs97mYNeXvMW1HO4zYCWiSMaicaZuqqBX2puyxTElwJkQzfCE2JMryhH%0Ai7sXIvPH3zI7xZSpDqc%3D%0A) --- @@ -46,9 +46,9 @@ The [Usage page](https://platform.claude.com/usage) offers a detailed breakdown 6. Use the export button to download a CSV of the displayed data. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584664321/59b50eba0b61e0789f7055fcf9f4/image+%285%29.png?expires=1787244300&signature=42cd25482e869e945771d9e1896bace09133d6fef0312346822f29507f368047&req=dSUvEs94mYJdWPMW1HO4zQwER3QoJYtlqMITUZbanFAiMTvzi7dgujbbkZ9L%0AMCe2wlIIGyN25vDclvM%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584664321/59b50eba0b61e0789f7055fcf9f4/image+%285%29.png?expires=1787280300&signature=73db177aa10b170a6afdb43b4f43319a77acc57e5b9d468eae8912eef51043bd&req=dSUvEs94mYJdWPMW1HO4zQwER3QoKY9lqMITUZbanFA2%2BtLWAr7Y2GCIZCwN%0AFEzx9q1%2BsN2bH%2FQmpB0%3D%0A) -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584693386/aed472efe163abcbc14fa32f3699/rate+limited+requests.png?expires=1787244300&signature=1189f28b3517a541b5a2e2e270848f4f76cf4e64f632826d14d51c27ad59fa87&req=dSUvEs93noJXX%2FMW1HO4zRxEwWxP4lVv21D6pckxWMb%2FUD0ufv1Db7YZvIuQ%0AJL0sOfK9SSol%2F7MX%2BU0%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584693386/aed472efe163abcbc14fa32f3699/rate+limited+requests.png?expires=1787280300&signature=3d5d95da6fa773d26fbe19cca86eb82c007c9de7bddc0fd8c503f08290f75061&req=dSUvEs93noJXX%2FMW1HO4zRxEwWxP7lFv21D6pckxWMZ6kjl58R2bCEb1zJgM%0AViyrr%2B%2Fbtq49qA1og84%3D%0A) ### Rate Limit Use @@ -88,6 +88,6 @@ The [Cost page](https://platform.claude.com/cost) helps you understand your spen 5. Use the export button to download a CSV of the cost data. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584679401/4d0bc8ed08625e1adee414e77030/CleanShot+2025-06-23+at+08_54_40%402x.png?expires=1787244300&signature=cf86217436fd167685fc92d028d4948c2fdf8fac03c602b7bdc2bb9a5ecf6650&req=dSUvEs95lIVfWPMW1HO4zUR%2Bh5vBV9RiCyIF5nuUsbyP3qXIeq5TW8g82NvW%0AePh%2BGxq1tyvFJbCAEqI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1584679401/4d0bc8ed08625e1adee414e77030/CleanShot+2025-06-23+at+08_54_40%402x.png?expires=1787280300&signature=00de58f3efda2676690370f6fc1bf2233ae24cff15b29c100f343dcc7bdf28d2&req=dSUvEs95lIVfWPMW1HO4zUR%2Bh5vBW9BiCyIF5nuUsbwupKbJlMAuvmDjQy5L%0ASEx7c3y3OXOpu6XUIG8%3D%0A) **Note**: Currently, it's not possible to break down usage or cost by individual users. \ No newline at end of file diff --git a/content/support/9547008-publish-and-share-artifacts.md b/content/support/9547008-publish-and-share-artifacts.md index d140a04980..c5739d0b6e 100644 --- a/content/support/9547008-publish-and-share-artifacts.md +++ b/content/support/9547008-publish-and-share-artifacts.md @@ -56,11 +56,11 @@ Publishing also adds the artifact to the **[Artifacts](https://claude.ai/artifac After publishing, you'll see a “Get embed code” button. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951684960/0cd917c4455b31e86b70a97f8234/image.png?expires=1787244300&signature=b993ec00608731fd30ce2fb1c88b7183144822ae5cf3bbf230943818e3e9773b&req=dSkiF892mYhZWfMW1HO4zdcpD1FQ4QeCR8xgMH3ra8iVjaxavTs7jFaS3O5t%0AvtckIzB4eakSXeVSMqU%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951684960/0cd917c4455b31e86b70a97f8234/image.png?expires=1787280300&signature=979c532498a0c062c8bbc3229c82d779b081d4f9e1f284be52718bfffd2af6a7&req=dSkiF892mYhZWfMW1HO4zdcpD1FQ7QOCR8xgMH3ra8jU0YBDTEbfGySZtzup%0AsEaKehfi5NkgLsaKFl0%3D%0A) Click it to open a modal with automatically generated code you can copy and paste to embed your artifact on another website. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951685860/6bf1aa2c57d6ff95804797779e9c/image.png?expires=1787244300&signature=4d89f16f0970449d7c2c011b32df1f6cbe987f4a02510a70e56da60693398677&req=dSkiF892mIlZWfMW1HO4zcqH796BzYBuf3CUbx4Ru6UfRSUiGhObP2zHvVDO%0Anacg6ItU2orZL6NjQWw%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951685860/6bf1aa2c57d6ff95804797779e9c/image.png?expires=1787280300&signature=fbb253737a614f3891c9e32522dec9ae79b31c2ba627514f40916cdbf60b021d&req=dSkiF892mIlZWfMW1HO4zcqH796BwYRuf3CUbx4Ru6VZKljK%2BYV1AwGgTQjQ%0AkGx6T5cswdZwfbPpYDA%3D%0A) You must specify which websites can embed your artifact by entering URLs in the **Allowed domains** field, separated by commas. @@ -116,7 +116,7 @@ Artifacts created on Team or Enterprise accounts can only be shared within your 4. Click “Share & copy link” to make this version shareable. -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951680160/d5a38784df4c6d0cc55eda339279/Screenshot%2B2025-10-28%2Bat%2B2_00_15-E2-80-AFPM.png?expires=1787244300&signature=3254e732f4cb3c1df266107766b2f261078cd4d10e495fd44f058fcbcbc05a31&req=dSkiF892nYBZWfMW1HO4zbvYOlbnKX2QK6hAzMpXfmO2DH7oYJGIve6ByL6g%0Ae8DJ1FwvU6wq69xZMDI%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951680160/d5a38784df4c6d0cc55eda339279/Screenshot%2B2025-10-28%2Bat%2B2_00_15-E2-80-AFPM.png?expires=1787280300&signature=0a123c842c4629fe4aedf14a98f691a0dee343c05488166082bd78a1688f1d11&req=dSkiF892nYBZWfMW1HO4zbvYOlbnJXmQK6hAzMpXfmOeKgEOq9oVY%2Bfloih%2F%0Ai2cdPh1bpzIhivIkM%2Fw%3D%0A) ### Who can access shared artifacts @@ -138,7 +138,7 @@ When you share an artifact, viewers also gain access to any attachments and file 2. In the **Artifact shared** modal, click “Unshare.” -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951676927/c66153a2c075c6a64404306aefd0/Screenshot%2B2025-10-28%2Bat%2B1_58_24-E2-80-AFPM.png?expires=1787244300&signature=ff1323195e2461d864fb42cf123903239627e38bf662a35524ceceafe57de62c&req=dSkiF895m4hdXvMW1HO4zW9Ewg6%2F%2FXCwgj8mTHivCKbtychvmBOllW55Cv8m%0AmL2qeOefjnf8rTXDxXY%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/1951676927/c66153a2c075c6a64404306aefd0/Screenshot%2B2025-10-28%2Bat%2B1_58_24-E2-80-AFPM.png?expires=1787280300&signature=682d347f8d3de8b3f7a29606cbfc05a341b2563b2afed2b11fbf9610add155fc&req=dSkiF895m4hdXvMW1HO4zW9Ewg6%2F8XSwgj8mTHivCKatnCqODhGfwIdvsulr%0A2WAnCyWdE8G%2B4QzB1bY%3D%0A) --- diff --git a/content/support/9927533-disable-public-projects-for-your-organization.md b/content/support/9927533-disable-public-projects-for-your-organization.md index 6803d36d22..e0a42a52e4 100644 --- a/content/support/9927533-disable-public-projects-for-your-organization.md +++ b/content/support/9927533-disable-public-projects-for-your-organization.md @@ -10,7 +10,7 @@ Follow these steps: 2. Find **Public projects** and toggle it off -![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053902291/8c39d1a79dedc97411eed54dec5c/CleanShot+2026-02-11+at+11_25_34%402x.png?expires=1787244300&signature=9e58d144953956c5fa0d5a0b1e89e7d602cbfb523c588567146ffeb67963f06d&req=diAiFcB%2Bn4NWWPMW1HO4zfGib2CmbwRcYabJlVJ9VPxcR4xwpcclCR9umETM%0Az8bv3PtEcJ93vExnrG4%3D%0A) +![](https://downloads.intercomcdn.com/i/o/lupk8zyo/2053902291/8c39d1a79dedc97411eed54dec5c/CleanShot+2026-02-11+at+11_25_34%402x.png?expires=1787280300&signature=72fd998bd68dfd1f47f8b3a680041dac40b03213a023711b6361c75ca069efb6&req=diAiFcB%2Bn4NWWPMW1HO4zfGib2CmYwBcYabJlVJ9VPwxF8QWy1lGv%2B5UAHIz%0AQq4aQShxEJhJAiiKuhE%3D%0A) ## How does disabling public projects work?