Follow Discord
Sweep 06 Nov 2026 · 01:32Z Build v2.1.319 537 read Stable v2.1.311 Latest v2.1.318 Next v2.1.319 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261105T230715Z

124 pages moved out of 886 read.

Pages moved 124 significant first
Pages read 886 in this capture
Captured 23:07 UTC
Corpus hash 3c8e2c2885cd corpus-hash

What this read moved

1-25 of 124, page 1 of 5

This capture is too large to show at once. Changes 1-25 of 124 are below, significant first; the rest are on the following screens.

about-claude/models/optimizing-for-cost-and-intelligence Changed · +37 / -31 lines

from line 110
110110| Pauses run for minutes | Claude Fable 5.1 | 5-minute cache kept warm, instead of the 1-hour duration |
111111| Pauses run toward an hour | Claude Fable 5.1 | 1-hour duration |
112112 
113On Claude Haiku 5.5, use the “Any” rows: it reads the cache at the standard 0.1x the input price, twice the 0.05x of Claude Opus 5.5 and Claude Sonnet 5.5, so by list prices each keep-alive request costs twice as much relative to the input price. A `max_tokens: 0` request refreshed its cache in a separate test (reference 16).
113On Claude Haiku 5.5, use the “Any” rows: it reads the cache at the standard 0.1x the input price, twice the 0.05x of Claude Opus 5.5 and Claude Sonnet 5.5, so by list prices each keep-alive request costs twice as much, relative to the input price, as on those two models. A `max_tokens: 0` request refreshed its cache in a separate test (reference 16).
114114 
115115**Why, row by row.**
116116 
from line 245
245245* With tool search, the run cost stayed flat at every catalog size.
246246* Accuracy was in the same range either way, and the model never called a wrong tool, so at this scale unused definitions cost money, not correctness.
247247* [Keep your 3 to 5 most used tools loaded](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#deferred-tool-loading), so Claude can call them without searching first.
248* On the same earlier model, deferring a public GitHub MCP server’s toolset (`default_config: {defer_loading: true}` on the [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector)) cut the run cost at the same accuracy. With no tool search tool in the request, no run then called the server’s tools.
248* On the same earlier model, deferring a public GitHub MCP server’s toolset (`default_config: {defer_loading: true}` on the [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector)) cut the run cost at the same accuracy. With the toolset deferred and no tool search tool in the request, no run called the server’s tools.
249249 
250250#### Keep data files out of the prompt
251251 
from line 485
485485* At `xhigh` and `max`, Claude Sonnet 5.5 can start its own rounds of review after it finishes a task, which takes more time and tokens. To keep that work on the task, add the prompt under “Thoroughness at `xhigh` and `max` effort” in [Prompting Claude Sonnet 5.5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5#steer-initiative-and-scope) to your system prompt.
486486* On research tasks, measure the model you ship. Claude Fable 5.1 scored 2.5 points higher at `high` than at `low` on DeepResearch Bench II, for 1.6 times the cost, and no higher at `medium` than at `low`; Claude Opus 5.5 scored 13.3 points lower at `low` than at `medium` on DRACO<sup>[21](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>. The two results come from different models on different benchmarks, so they show that the answer varies, not why.
487487* At `low`, Claude Opus 5.5’s typical task took 84% less time than at `medium` on DRACO<sup>[21](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, 30% less on HLE<sup>[22](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, and 47% less on an internal set of physics problems<sup>[23](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, and it scored 13.3, 3.4, and 14.0 points lower (3, 3, and 4 attempts per task).
488* On an internal defect-search benchmark for work larger than one context window<sup>[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, Claude Fable 5.1 took 15.2, 17.5, and 19.9 hours per run at `low`, `medium`, and `high` (3 runs each). To save time, also compare lower effort with the two changes in [Show the model elapsed time](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#show-the-model-elapsed-time): `low` effort saved more time, and the changes kept more of the score.
488* On an internal defect-search benchmark<sup>[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup> (10 runs per setting), Claude Opus 5.5 scored 34 points lower at `low` than at `medium`, for about a fifth of the cost. Claude Fable 5.1 scored 1.8 points lower at `low` than at `high`, for about a quarter less.
489489 
490490### Re-run failures at higher effort
491491 
from line 625
625625 
626626### Orchestrator strategy: delegate bulk work
627627 
628Delegation saved money in only two situations, in measurements with workers on Claude Sonnet 5, an earlier model:
628In Anthropic’s measurements, delegation came out ahead in only two situations:
629629 
630* Routine work with a long cost tail (an easy slice of BrowseComp<sup>[4](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>)
630* Routine work with a long cost tail (an easy slice of BrowseComp<sup>[4](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, on earlier models)
631631* Work larger than one context window (an internal defect-search benchmark<sup>[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>)
632632 
633633When the work is one dependent chain, or fits in a single context without a long cost tail, the orchestrator’s model alone at lower effort came out ahead in every case measured on earlier models (the harder BrowseComp set and DeepWideSearch<sup>[6](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>); independent external work reports the same pattern<sup>[5](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>.
634634 
635To build an orchestrator, use [multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) in Claude Managed Agents: configure an orchestrator agent and worker agents that it can call, each with its own model.
635To build an orchestrator, use [multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) in Claude Managed Agents: configure an orchestrator agent and the subagents it can call, each with its own model.
636636 
637637<Frame>
638638 ![Diagram of the orchestrator strategy: a frontier model fans subtasks out to three lower-cost worker models](https://platform.claude.com/docs/images/model-routing-orchestrator-strategy.svg)
639639</Frame>
640640 
641The following chart plots the defect-search benchmark’s configurations by cost and score:
641The following chart plots 9 of the defect-search benchmark’s 12 configurations by cost and score:
642642 
643643<Frame>
644 ![Chart, defect-search benchmark: the orchestrator costs about half of Fable 5.1 alone at any effort and scores 10 to 12 points below](https://platform.claude.com/docs/images/cost-intel/corpus-pareto.svg)
644 ![Scatter chart, defect search: Opus 5.5 with Sonnet 5.5 subagents matches Opus 5.5 alone, at medium, for about a third less](https://platform.claude.com/docs/images/cost-intel/corpus-pareto.svg)
645645</Frame>
646646 
647647**What to do.**
648648 
649649* **Routine work with a long cost tail:** measure this case first, for accuracy as well as cost. The measurement behind it covers only problems that the delegated configuration answered correctly in every run (reference 4).
650* **Work larger than one context window:** delegate partitions to workers. Lowering effort cannot help, because the bill is the reading itself: on the defect-search benchmark<sup>[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, Claude Fable 5.1 alone cost $468 USD to $552 USD per run across its three effort settings and took 15 to 20 hours. With earlier-model workers, delegation cost less and finished sooner, for a lower score.
650* **Work larger than one context window:** split it into parts, one session or one subagent per part. On the defect-search benchmark<sup>[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>, Claude Opus 5.5 with Claude Sonnet 5.5 subagents cost about a third less than one Claude Opus 5.5 session per part at its default effort, and scored about the same. Claude Fable 5.1 as the orchestrator in Claude Opus 5.5’s place cost 24% more for no measurable gain. Alone, Claude Fable 5.1 cost 2.2 to 3.0 times as much as Claude Opus 5.5 at `high` and scored no higher.
651651* **Claude Haiku 5.5 subagents on coding tasks:** compare them with lower effort first. On an internal coding benchmark on Claude Managed Agents, they were an alternative to lowering effort, not better. Adding them to Claude Opus 5.5 at `medium`, with a short delegation prompt, cut cost per attempt by 32% and the pass rate by about 4 percentage points (95% interval 1.3 to 7.1), about what a mix of `low` and `medium` without subagents would give at that cost<sup>[29](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup>.
652652 
653653## Measure on your own workload
from line 855
855855 
856856The following table lists the levers in the order to try them. The figures come from Anthropic’s tests, launch posts, and published prices and speeds:
857857 
858| Lever | Saving | Quality cost | Latency | Where |
859| -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
860| Prompt caching | Cost cut by a factor of 4.8 to 7.2 on a research agent, and by 83% to 86% on a small triage agent | None | Faster | [Cache repeated context](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#cache-repeated-context) |
861| 1-hour cache duration | With 1 turn in 10 after a pause, the 5-minute default cost 54% more; with 1 in 20, about the same | None | On earlier models, stayed warm after a pause<sup>[16](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup> | [Pick the cache duration](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#pick-the-cache-duration) |
862| Input trimming | A further 21% to 26% off a small triage agent’s bill | With tool search, accuracy in the same range as without<sup>[27](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup> | Neutral | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
863| Tool search | 45% with 500 tool definitions attached; 20% from deferring a GitHub MCP server’s toolset | None for tools the task never needs | Neutral | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
864| Data files through code execution | 92% on a data task of 25 questions, with prompt caching off | A gain: 25 of 25 correct instead of 7 | Faster | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
865| Batch API | 50% | None | Results within 24 hours | [Batch work that can wait](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#batch-work-that-can-wait) |
866| Prompt audit against the current model | 14% on both model upgrades tested | None; a gain on one | Faster (fewer tool rounds) | [Audit prompts against the current model](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#audit-prompts-against-the-current-model) |
867| Upgrade the model | Usually less: up to 40% less on typical workloads, and up to 87% less per solved task on a coding benchmark | None; a gain on most | Neutral | [Upgrade the model](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#upgrade-the-model) |
868| Lower effort | On long coding tasks, `medium` cost about 30% to 52% less than `high`, and `low` about two thirds less | Up to 15 points lower, depending on the task; 2.5 on one research agent | Faster | [Tune effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#tune-effort) |
869| Re-run failures | About 40% less than running everything at `high`, at the same pass rate or slightly better | None | A second attempt 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) |
870| Ask for shorter answers | About 13% less, from 39% fewer output tokens | None | 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) |
871| Raising `max_tokens` | None: cost per solved task stayed about the same | A gain: up to 22 points more tasks solved on one coding benchmark; none on another | 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) |
872| Advisor | None: about 2.1 times the cost of the model alone, on a coding benchmark | On coding, a small gain that may be chance; on chart reading, a loss | About 1.4 extra calls per attempt, on coding | [Advisor strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#advisor-strategy-escalate-hard-decisions) |
873| Orchestrator | About half the cost of the orchestrator’s model alone, on work larger than one context window; on routine work, measure first | 10 to 12 points lower on that work | Much faster on that work | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) |
874| Fast mode | None: twice the standard token prices | None | Up to 2.5x higher output tokens per second | [Show the model elapsed time](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#show-the-model-elapsed-time) |
858| Lever | Saving | Quality cost | Latency | Where |
859| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
860| Prompt caching | Cost cut by a factor of 4.8 to 7.2 on a research agent, and by 83% to 86% on a small triage agent | None | Faster | [Cache repeated context](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#cache-repeated-context) |
861| 1-hour cache duration | With 1 turn in 10 after a pause, the 5-minute default cost 54% more; with 1 in 20, about the same | None | On earlier models, stayed warm after a pause<sup>[16](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup> | [Pick the cache duration](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#pick-the-cache-duration) |
862| Input trimming | A further 21% to 26% off a small triage agent’s bill | With tool search, accuracy in the same range as without<sup>[27](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs)</sup> | Neutral | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
863| Tool search | 45% with 500 tool definitions attached; 20% from deferring a GitHub MCP server’s toolset | None for tools the task never needs | Neutral | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
864| Data files through code execution | 92% on a data task of 25 questions, with prompt caching off | A gain: 25 of 25 correct instead of 7 | Faster | [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens) |
865| Batch API | 50% | None | Results within 24 hours | [Batch work that can wait](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#batch-work-that-can-wait) |
866| Prompt audit against the current model | 14% on both model upgrades tested | None; a gain on one | Faster (fewer tool rounds) | [Audit prompts against the current model](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#audit-prompts-against-the-current-model) |
867| Upgrade the model | Usually less: up to 40% less on typical workloads, and up to 87% less per solved task on a coding benchmark | None; a gain on most | Neutral | [Upgrade the model](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#upgrade-the-model) |
868| Lower effort | On long coding tasks, `medium` cost about 30% to 52% less than `high`, and `low` about two thirds less | Up to 34 points lower, depending on the task and the model; 2.5 on one research agent | Faster | [Tune effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#tune-effort) |
869| Re-run failures | About 40% less than running everything at `high`, at the same pass rate or slightly better | None | A second attempt 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) |
870| Ask for shorter answers | About 13% less, from 39% fewer output tokens | None | 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) |
871| Raising `max_tokens` | None: cost per solved task stayed about the same | A gain: up to 22 points more tasks solved on one coding benchmark; none on another | 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) |
872| Advisor | None: about 2.1 times the cost of the model alone, on a coding benchmark | On coding, a small gain that may be chance; on chart reading, a loss | About 1.4 extra calls per attempt, on coding | [Advisor strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#advisor-strategy-escalate-hard-decisions) |
873| Orchestrator | With subagents on the next model down, about a third less than the orchestrator’s model alone at its default effort, on work larger than one context window; on routine work, measure first | No measurable loss on that work | Up to 25 subagents at a time | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) |
874| Fast mode | None: twice the standard token prices | None | Up to 2.5x higher output tokens per second | [Show the model elapsed time](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#show-the-model-elapsed-time) |
875875 
876876### Automate the search with the Claude API skill
877877 
from line 949
949949 * **Caching chart:** The caching chart re-prices the same requests with every input token at the uncached rate. The evaluation harness set the cache breakpoints.
950950 * **Comparability:** These scores are not comparable with the benchmark’s leaderboard.
951951 
9528. **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 one in which the Claude Fable 5.1 orchestrator ran the whole sweep inside the platform at its documented limit of 25 concurrent Claude Sonnet 5 workers, run August 30, 2026; its three runs scored F1 0.764, 0.825, and 0.791 after the extras audit (raw 0.751, 0.821, and 0.781) for $225 USD, $234 USD, and $283 USD. The team configuration cost about half as much as Claude Fable 5.1 alone at `low`, `medium`, or `high` (47% to 55% less), scored 10 to 12 points below it, and took about 2.3 hours per run, compared with 15 to 20 hours. The team configuration read about 560 million cached tokens per run, nearly all of them at Claude Sonnet 5’s cache-read rate. That is about one and a half times the roughly 365 million that Claude Fable 5.1 read alone. Claude Fable 5.1 alone at `high` effort still holds peak accuracy, at about 2.2 times the team configuration’s cost, so delegation here buys most of the accuracy, not all of it. The configuration with Claude Sonnet 5 alone ran August 3 to 4, 2026; the configurations with Claude Fable 5.1 alone ran August 24 to 25, 2026, under the platform’s launch serving settings, three seeds per effort setting, on the same corpus build. The sandbox image carried installed copies of part of the corpus, and Claude Fable 5.1’s final assembly step compared against them in 7 of 9 runs; re-grading without those additions moved the affected seeds by up to 3 points. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like.
9528. **Internal defect-search benchmark:**
953953 
954 * **What was measured:** Anthropic-internal, for work larger than one context window: a corpus of about 22 million tokens from 14 public Python package sources, in 201 parts, with 130 planted defects and deterministic grading. Ten runs per configuration, on [Claude Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview): 51 of the 120 on October 27 to 29, 2026, and 69 on November 2 to 3, 2026.
955 * **Configurations:** Alone, each model ran one session per part, each session given the findings so far: Claude Fable 5.1 and Claude Opus 5.5 at `low`, `medium`, and `high`, and Claude Sonnet 5.5 and Claude Haiku 5.5 at each model’s default (`high` and `medium`). With subagents, Claude Fable 5.1 or Claude Opus 5.5 ran at `high` as the orchestrator, through [multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration) (the `multiagent_20261001` type): one predefined agent as the subagent, at its model’s default effort, called once for each part, up to 25 at a time, with inline agents and dynamic workflows turned off. Every configuration ended with one more session, without subagents, that assembled the findings. Thinking ran at the platform’s default: on, with the model choosing when to think.
956 * **Tools:** Every agent used the benchmark’s own shell and file tools, in an isolated virtual machine. Before any agent started, the evaluation removed installed copies of the corpus’s packages from that machine and checked that no connection from it succeeded.
957 * **Results:** Mean F1 (range) and mean cost per run. Claude Haiku 5.5 alone: 0.577 (0.550 to 0.606), $25 USD. Claude Sonnet 5.5 alone: 0.760 (0.669 to 0.788), $103 USD. Claude Opus 5.5 alone at `low`: 0.489 (0.437 to 0.551), $38 USD; at `medium`: 0.827 (0.797 to 0.850), $200 USD; at `high`: 0.850 (0.829 to 0.876), $236 USD. Claude Fable 5.1 alone at `low`: 0.829 (0.807 to 0.841), $527 USD; at `medium`: 0.839 (0.817 to 0.856), $603 USD; at `high`: 0.847 (0.829 to 0.861), $716 USD. Claude Opus 5.5 with Claude Sonnet 5.5 subagents: 0.831 (0.814 to 0.850), $139 USD; with Claude Haiku 5.5 subagents: 0.677 (0.640 to 0.718), $47 USD. Claude Fable 5.1 with Claude Sonnet 5.5 subagents: 0.825 (0.812 to 0.858), $172 USD; with Claude Haiku 5.5 subagents: 0.687 (0.660 to 0.723), $88 USD. Among the configurations that score above 0.80, every pair of ranges overlaps. Differences in mean F1, with 95% intervals: Claude Opus 5.5 with Claude Sonnet 5.5 subagents scored 0.4 points higher than Claude Opus 5.5 alone at `medium` (1.1 lower to 1.9 higher), 1.9 lower than alone at `high` (0.6 to 3.2), and 7.1 higher than Claude Sonnet 5.5 alone (4.6 to 9.7). Alone, Claude Opus 5.5 scored 2.3 points higher at `high` than at `medium` (0.7 to 3.9). Claude Fable 5.1 alone scored 1.8 points lower at `low` than at `high` (0.8 to 2.8); at `high` it scored 2.0 points higher than Claude Opus 5.5 alone at `medium` (0.7 to 3.4) and 0.3 lower than Claude Opus 5.5 alone at `high` (1.5 lower to 1.0 higher). With Claude Sonnet 5.5 subagents, Claude Fable 5.1 scored 0.6 points lower than Claude Opus 5.5 (1.9 lower to 0.6 higher). The Claude Opus 5.5 pairing cost 31% less than Claude Opus 5.5 alone at `medium` and 41% less than alone at `high`. Alone, Claude Opus 5.5 cost 15% less at `medium` than at `high`. All seven of November’s runs of Claude Sonnet 5.5 alone scored below October’s three (0.669 to 0.775, compared with 0.783 to 0.788); the cause is not known, and every run counts. Claude Fable 5.1 with Claude Haiku 5.5 subagents cost $85.77 USD per run in October and $89.06 USD in November.
958 * **How priced:** The platform’s list cost of each run’s sessions: tokens with prompt caching, plus session runtime. Five of Claude Opus 5.5’s runs at `high` are priced only from their token counts, at 5-minute cache prices, because each ran partly with the 1-hour cache duration, whose cache writes cost more. The cost of an extra check on tool calls, part of the evaluation’s safety setup, is left out.
959 
9549609. **GPQA Diamond:** Rein et al., “GPQA: A Graduate-Level Google-Proof Q\&A Benchmark,” 2023. The 198-question Diamond subset, model-graded against reference answers, advisor tokens metered per request. Claude Haiku 5.5 and Claude Sonnet 5.5, each alone and with a Claude Opus 5.5 advisor, and Claude Opus 5.5 alone ran two runs per configuration on October 7, 2026, all with [server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) off, at each model’s default effort, and with refusals counted as wrong. A platform safety check refused one biology question per run on Claude Haiku 5.5 and Claude Sonnet 5.5 alone, one in two runs on Haiku 5.5 with the advisor, none on Sonnet 5.5 with the advisor, and six per run on Opus 5.5, which scored 91% with them counted as wrong and 93.5% on the questions it answered. Claude Haiku 5.5 alone scored 85%, 6 points below Opus 5.5. The advisor configurations added the tool without a prompt asking for consultations, and neither executor called the advisor on any question. The pairings scored 0.5 points (Claude Haiku 5.5) and 1.0 points (Claude Sonnet 5.5) above the executor alone, both within run-to-run noise.
955961 
95696210. **DeepSWE:** Datacurve, “DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks,” arXiv:2607.07946, 2026. The set has 113 original tasks across five languages with program-based verifiers. Pairings are two runs each, run August 7, 2026, 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. On this benchmark a low-effort Claude Sonnet 5 executor with an advisor scored 23 points above the same executor alone.
from line 1045
10391045 * **Mid-session arm:** The mid-session arm paid $0.23 USD per session in cache re-writes; the difference between the mid-session and boundary arms was $0.20 USD with a 95% confidence interval of $0.11 USD to $0.29 USD. In the mid-session arm, the effort change and the added tool rewrote 39,000 and 60,000 cached tokens. One of its sessions ran cheap ($0.82 USD) after its model mis-called the search tool following compaction and got empty results; it is included, and without it the arm averages $0.98 USD.
10401046 * **Accuracy and cache reads:** Accuracy averaged 14.2 of 20 labels in each August 24 arm and 14.7 in the August 25 arm; cache reads were 91% of prompt tokens with no changes, 85% mid-session, 91% at the boundary, and 86% with the changes on the triggering request.
10411047 * **Separate measurement, status line:** A separate measurement on the 20-issue triage job from [Trim input and context tokens](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#trim-input-and-context-tokens), run August 18, 2026, also on Claude Sonnet 5 with the 5-minute cache, priced the same way, three runs per arm: with a 25-token status line at the front of the system prompt, a run cost $4.24 USD on average ($4.12 USD to $4.47 USD across the three runs) and read nothing from the cache; with the same line at the end of the newest user turn, after the last cache breakpoint, a run cost $0.59 USD ($0.55 USD to $0.61 USD). The first is more than the same job cost with caching off. A later re-run with the same configuration gave $4.28 USD and $0.61 USD.
1042 * **Compaction trigger on Claude Haiku 5.5:** Measured October 21, 2026, on the Messages API with [compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold), no tools, adaptive thinking, the default effort (`medium`), the 5-minute cache, a cache breakpoint on the system prompt, and [automatic caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#automatic-caching). Each session was one conversation of 45 requests: a 5,000-token system prompt, 10,000 tokens of filler text with every user turn, and one-word assistant turns, except that a reply with a compaction block was sent back whole. Four settings ran three sessions each: triggers of 150,000 tokens (the default), 90,000, and 50,000 (the lowest allowed), and no compaction. Costs within a setting agreed to within 4%. With the default trigger, 15 of each session’s 45 replies and all 3 summaries had prompts over 100,000 tokens. With a trigger of 90,000, the largest prompt held 97,269 tokens. Compaction ran at the first request whose whole prompt had reached the trigger, counting the system prompt, cache reads, and cache writes. The summary was written from that prompt plus 44 tokens, up to 7,269 tokens over the trigger. Three more sessions, with a 22,000-token system prompt and a trigger of 50,000, showed that the system prompt counts. The summaries were short (184 to 640 output tokens) because the text was filler. The requests ran in one Anthropic-internal organization on the Claude API.
1048 * **Compaction trigger on Claude Haiku 5.5:** Measured October 21, 2026, on the Messages API with [compaction at a token threshold](https://platform.claude.com/docs/en/build-with-claude/compaction-threshold), no tools, adaptive thinking, the default effort (`medium`), the 5-minute cache, a cache breakpoint on the system prompt, and [automatic caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#automatic-caching). Each session was one conversation of 45 requests: a 5,000-token system prompt, 10,000 tokens of filler text with every user turn, and one-word assistant turns, except that a reply with a compaction block was sent back whole. Four settings ran three sessions each: triggers of 150,000 tokens (the default), 90,000, and 50,000 (the lowest allowed), and no compaction. Costs within a setting agreed to within 4%. With the default trigger, 15 of each session’s 45 replies and all 3 summaries had prompts over 100,000 tokens. With a trigger of 90,000, the largest prompt held 97,269 tokens. Compaction ran at the first request whose whole prompt had reached the trigger, counting the system prompt, cache reads, and cache writes. The summary was written from that prompt plus 44 tokens, which together were up to 7,269 tokens over the trigger. Three more sessions, with a 22,000-token system prompt and a trigger of 50,000, showed that the system prompt counts. The summaries were short (184 to 640 output tokens) because the text was filler. The requests ran in one Anthropic-internal organization on the Claude API.
10431049 * **Compaction trigger on Claude Haiku 5.5, how priced:** From the `usage` fields at list prices, a session cost $0.272 USD with the default trigger, $0.082 USD at 90,000, $0.075 USD at 50,000, and $0.729 USD with no compaction. Per request, from the request after the first compaction through the last compaction, the three triggers cost $0.00605 USD, $0.00181 USD, and $0.00166 USD. With every prompt at the prices for prompts up to 100,000 tokens, the default would cost $0.00206 USD per request, and a trigger of 90,000 would save 12%. A compaction’s summary and reply are each priced by their own prompt’s size.
10441050 
1045105119. **Cache duration measurement on Claude Fable 5.1:** The same 20-issue triage job and harness as reference 16, with `max_tokens` raised to 4,096, run August 23 and August 26, 2026, on the Claude Fable 5.1 launch snapshot at its launch prices ($10 USD input, $12.50 USD 5-minute write, $20 USD 1-hour write, $0.25 USD cache read, $50 USD output per million tokens), three settings per schedule: the 5-minute cache, the 1-hour cache, and the 5-minute cache kept warm by a `max_tokens: 0` request on the unchanged prefix every 4 minutes, timed from the previous request’s start (the August 23 runs sent keep-alive requests with `max_tokens: 1`; in the August 26 cells reported here, every answered keep-alive request refreshed the cache and its response reported no output tokens). Schedules: no pauses, 10% of turns, and every turn at 6 minutes on all 20 issues, and 45-minute pauses on the 5-issue subset; three runs per cell (six for the August 26 keep-alive cell with 45-minute pauses), cost computed from each response’s `usage` fields at list prices, accuracy against the same gold labels (12 to 18 exact labels of 20). Per-session means on August 26 for the 5-minute, 1-hour, and keep-alive settings: no pauses $2.42 USD, $3.09 USD, $2.29 USD; 10% paused $4.50 USD, $2.96 USD, $2.36 USD; every turn $22.89 USD, $3.01 USD, $2.62 USD; the August 23 cells agree within 6%. The 45-minute figures ($1.68 USD, $0.59 USD, and $0.71 USD per 5-issue session) are from later sessions of August 26: that day’s first set of sessions was cut off when its machine was shut down, and the second was affected by a fault in the service and is set aside. The third set gives the 5-minute and 1-hour figures; its three keep-alive sessions sent each keep-alive request once, lost requests to rate-limit refusals, and are not in the mean. The keep-alive figure is the mean of six further sessions that sent any refused keep-alive request again within two seconds. The August 23 runs gave $1.67 USD, $0.58 USD, and $0.70 USD. The break-even between the 5-minute and 1-hour settings is 3.1% of turns, the same measure as reference 16. Claude Fable 5.1’s cache read costs 0.025x the input price while its cache writes keep the standard multipliers, so a keep-alive request that re-reads the prefix is cheap and the 1-hour duration’s write premium is the larger bill, except with 45-minute pauses, where the keep-alive requests cost more than the premium.

about-claude/pricing Changed · +1 / -4 lines

from line 34
3434| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.10 / MTok | $0.125 / MTok | $0.20 / MTok | $0.01 / MTok | $0.50 / MTok |
3535| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.50 / MTok | $0.625 / MTok | $1 / MTok | $0.05 / MTok | $2.50 / MTok |
3636| Claude Haiku 4.5 | $1 / MTok | $1.25 / MTok | $2 / MTok | $0.10 / MTok | $5 / MTok |
37| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.80 / MTok | $1 / MTok | $1.60 / MTok | $0.08 / MTok | $4 / MTok |
3837 
3938*<sup>1 Cache hits and refreshes on Claude Fable 5.1 and Claude Mythos 5.1 are priced at 0.025x the base input price.</sup>*
4039 
from line 206
207206| Claude Haiku 5.5 (for prompts up to 100,000 tokens) | $0.05 / MTok | $0.25 / MTok |
208207| Claude Haiku 5.5 (for prompts over 100,000 tokens) | $0.25 / MTok | $1.25 / MTok |
209208| Claude Haiku 4.5 | $0.50 / MTok | $2.50 / MTok |
210| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | $0.40 / MTok | $2 / MTok |
211209 
212210* **MTok:** Million tokens. $5 / MTok is $5 for every million tokens.
213211* **Limited access:** Available only to organizations verified through Anthropic’s verification programs, such as the [Cyber Verification Program](https://support.claude.com/en/articles/14604842). To request access, apply to the program that covers your use case.
from line 254
256254| Claude Sonnet 4 ([retired, except on Claude Models on Google Cloud (Google managed) and Bedrock](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens |
257255| Claude Haiku 5.5 | 286 tokens | 406 tokens |
258256| Claude Haiku 4.5 | 496 tokens | 588 tokens |
259| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens |
260257 
261258* **auto, none:** The count when tool\_choice is auto or none.
262259* **any, tool:** The count when tool\_choice is any or tool.
from line 342
345342 
346343Web search is available on the Claude API for **$10 USD per 1,000 searches**, plus standard token costs for search-generated content. Web search results retrieved throughout a conversation are counted as input tokens, in search iterations run during a single turn and in subsequent conversation turns.
347344 
348Each web search counts as one use, regardless of the number of results returned. If an error occurs during web search, the web search will not be billed.
345Each web search counts as one use, regardless of the number of results returned. A web search that fails with an error is not billed.
349346 
350347#### Web fetch tool
351348 

agents-and-tools/agent-skills/overview Changed · +9 / -12 lines

from line 124
124124 * `scripts/`
125125 * `fill_form.py` (utility script)
126126 
127**Instructions:** Additional markdown files (`FORMS.md`, `REFERENCE.md`) containing specialized guidance and workflows
127**Instructions:** Additional Markdown files (`FORMS.md`, `REFERENCE.md`) containing specialized guidance and workflows
128128 
129129**Code:** Executable scripts (`fill_form.py`, `validate.py`) that Claude runs using bash, providing deterministic operations without loading their code into context
130130 
from line 163
163163Here’s how Claude loads and uses the custom `pdf-processing` Skill from the earlier examples (not the pre-built `pdf` Skill):
164164 
1651651. **Startup:** System prompt includes: `pdf-processing - Extract text and tables from PDF files, fill forms, merge documents. Use when working with PDF files or when the user mentions PDFs, forms, or document extraction.`
1662. **User request:** “Extract the text from this PDF and summarize it”
1673. **Claude calls:** `bash: cat pdf-processing/SKILL.md` → Instructions loaded into context
1684. **Claude determines:** Form filling is not needed, so `FORMS.md` is not read
1695. **Claude executes:** Uses instructions from `SKILL.md` to complete the task
1662. **User request:** “Extract the text from this PDF and summarize it.”
1673. **Claude calls:** `bash: cat pdf-processing/SKILL.md` → Instructions loaded into context.
1684. **Claude determines:** Form filling is not needed, so Claude doesn’t read `FORMS.md`.
1695. **Claude completes the task:** Uses the instructions from `SKILL.md`.
170170 
171171<Frame>
172 ![Skills loading into context window - showing the progressive loading of skill metadata and content](https://platform.claude.com/docs/images/agent-skills-context-window.svg)
172 ![Skills loading into the context window: the progressive loading of Skill metadata and content](https://platform.claude.com/docs/images/agent-skills-context-window.svg)
173173</Frame>
174174 
175175## Where Skills work
from line 208
208208 
209209**Pre-built Agent Skills:** These Skills are active when you create documents. Claude uses them with no setup required.
210210 
211**Custom Skills:** Upload your own Skills as zip files through **Settings > Features**. Available on Pro, Max, Ultra, Team, and Enterprise plans with [code execution enabled](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude). Custom Skills are individual to each user. They are not shared organization-wide and cannot be centrally managed by admins.
211**Custom Skills:** Upload your own Skills as zip files. Available on Pro, Max, Ultra, Team, and Enterprise plans with [code execution enabled](https://support.claude.com/en/articles/12111783-create-and-edit-files-with-claude).
212212 
213213To learn more about using Skills in claude.ai, see the following resources in the Claude Help Center:
214214 
from line 304
304304 
305305## Limitations and constraints
306306 
307Claude Platform on AWS and Microsoft Foundry follow the same limitations as the Claude API in the following subsections. In addition, on Microsoft Foundry, the [Skill version download endpoint](https://platform.claude.com/docs/en/api/beta/skills/versions/download) (`GET /v1/skills/{skill_id}/versions/{version}/content`) is not supported.
307Claude Platform on AWS and Microsoft Foundry follow the same limitations as the Claude API in the following subsections. In addition, on Microsoft Foundry, the [Skill version download endpoint](https://platform.claude.com/docs/en/api/beta/skills/versions/download) (`GET /v1/skills/{skill_id}/versions/{version}/content`) is not available.
308308 
309309### Cross-surface availability
310310 
from line 320
320320 
321321Skills have different sharing models depending on where you use them:
322322 
323* **claude.ai:** Individual user only. Each team member must upload separately.
324323* **Claude API:** Workspace-wide. All workspace members can access uploaded Skills.
325* **Claude Code:** Personal (`~/.claude/skills/`) or project-based (`.claude/skills/`). Can also be shared through Claude Code Plugins.
326 
327claude.ai does not support centralized admin management or org-wide distribution of custom Skills.
324* **Claude Code:** Personal (`~/.claude/skills/`) or project-based (`.claude/skills/`). Can also be shared through Claude Code plugins.
328325 
329326### Runtime environment constraints
330327 

agents-and-tools/agent-skills/quickstart Changed · +4 / -4 lines

from line 51
5151 </Tab>
5252 
5353 <Tab title="go install">
54 You can also install the CLI from source using `go install`. Requires Go 1.25 or later.
54 You can also install the CLI from source with `go install`, which requires Go 1.26.10 or later.
5555 
5656 ```bash
5757 go install github.com/anthropics/anthropic-cli/v2/cmd/ant@latest
5858 ```
5959 
60 The binary is placed in `$(go env GOPATH)/bin`. Add it to your `PATH` if it isn’t already:
60 `go install` places the binary in `$(go env GOPATH)/bin`. Add that directory to your `PATH` if it isn’t already there:
6161 
6262 ```bash
6363 export PATH="$PATH:$(go env GOPATH)/bin"
from line 120
120120 </Tab>
121121 
122122 <Tab title="go install">
123 You can also install the CLI from source using `go install`. Requires Go 1.25 or later.
123 You can also install the CLI from source with `go install`, which requires Go 1.26.10 or later.
124124 
125125 ```bash
126126 go install github.com/anthropics/anthropic-cli/v2/cmd/ant@latest
127127 ```
128128 
129 The binary is placed in `$(go env GOPATH)/bin`. Add it to your `PATH` if it isn’t already:
129 `go install` places the binary in `$(go env GOPATH)/bin`. Add that directory to your `PATH` if it isn’t already there:
130130 
131131 ```bash
132132 export PATH="$PATH:$(go env GOPATH)/bin"

agents-and-tools/tool-use/advisor-tool Changed · +46 / -44 lines

from line 256
256256 [
257257 'type' => 'advisor_20260301',
258258 'name' => 'advisor',
259 'model' => 'claude-opus-5-5',
259 'model' => Model::CLAUDE_OPUS_5_5,
260260 ],
261261 ],
262262 betas: ['advisor-tool-2026-03-01'],
from line 269
269269 client = Anthropic::Client.new
270270 
271271 response = client.beta.messages.create(
272 model: "claude-sonnet-5",
272 model: Anthropic::Model::CLAUDE_SONNET_5,
273273 max_tokens: 16000,
274274 tools: [
275275 {
276276 type: "advisor_20260301",
277277 name: "advisor",
278 model: "claude-opus-5-5"
278 model: Anthropic::Model::CLAUDE_OPUS_5_5
279279 }
280280 ],
281281 messages: [
from line 308
308308 
309309## Tool parameters
310310 
311| Parameter | Type | Default | Description |
312| ------------ | -------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
313| `type` | string | *required* | Must be `"advisor_20260301"`. |
314| `name` | string | *required* | Must be `"advisor"`. |
315| `model` | string | *required* | The advisor model ID, such as claude-opus-5-5. Billed at this model’s rates for the sub-inference. |
316| `max_uses` | integer | unlimited | Maximum number of advisor calls allowed in a single request. Once the executor reaches this cap, further advisor calls return an `advisor_tool_result_error` with `error_code: "max_uses_exceeded"` and the executor continues without further advice. This is a per-request cap, not a per-conversation cap. See [Cost control](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#cost-control) for conversation-level limits. |
317| `max_tokens` | integer | advisor model’s output cap | Caps the advisor’s total output (thinking plus text) per call. Minimum 1024. See [Capping advisor output](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#capping-advisor-output). |
318| `caching` | object \| null | `null` (off) | Enables [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for the advisor’s own transcript across calls within a conversation. See [Advisor prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#advisor-prompt-caching). |
311| Parameter | Type | Default | Description |
312| ------------ | -------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
313| `type` | string | *required* | Must be `"advisor_20260301"`. |
314| `name` | string | *required* | Must be `"advisor"`. |
315| `model` | string | *required* | The advisor model ID, such as claude-opus-5-5. Billed at this model’s rates for the sub-inference. |
316| `max_uses` | integer | unlimited | Maximum number of advisor calls allowed in a single turn. Once the executor reaches this cap, further advisor calls return an `advisor_tool_result_error` with `error_code: "max_uses_exceeded"` and the executor continues without further advice. See [Cost control](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#cost-control) for conversation-level limits. |
317| `max_tokens` | integer | advisor model’s output cap | Caps the advisor’s total output (thinking plus text) per call. Minimum 1024. See [Capping advisor output](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#capping-advisor-output). |
318| `caching` | object \| null | `null` (off) | Enables [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for the advisor’s own transcript across calls within a conversation. See [Advisor prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#advisor-prompt-caching). |
319319 
320The `max_uses` cap applies to a whole turn, and a turn can span several requests. A request continues the turn when it [resumes after `pause_turn`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#resuming-a-paused-turn) or when its last message contains only `tool_result` blocks. Advisor calls from earlier requests in that turn count against the cap.
321 
320322The `caching` object has the shape `{"type": "ephemeral", "ttl": "5m" | "1h"}`. Unlike `cache_control` on content blocks, this is not a breakpoint marker. It is an on/off switch. The server determines where cache boundaries go.
321323 
322324The advisor tool also accepts the generic properties available on any tool definition: `cache_control`, `allowed_callers`, `defer_loading`, and `strict` (covered in [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)). See [Tool definition properties](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-reference#tool-definition-properties) in the Tool reference for their semantics.
from line 404
402404 
403405Both result variants carry a `stop_reason` field when you set [`max_tokens`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#capping-advisor-output) on the tool definition, and omit it when you do not. It holds the advisor sub-call’s stop reason, typically `"end_turn"`, or `"max_tokens"` when the cap is hit. The values match the top-level Messages API [`stop_reason`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons).
404406 
405With `advisor_result`, the `text` field contains human-readable advice. With `advisor_redacted_result`, the `encrypted_content` field contains an opaque blob that you cannot read. On the next turn, the server decrypts it and renders the plaintext into the executor’s prompt.
407With `advisor_result`, the `text` field contains human-readable advice. With `advisor_redacted_result`, the `encrypted_content` field contains an opaque blob that you cannot read. In the next request, the server decrypts it and renders the plaintext into the executor’s prompt.
406408 
407In both cases, round-trip the content verbatim on subsequent turns. If you switch advisor models mid-conversation, branch on `content.type` to handle both shapes.
409In both cases, round-trip the content verbatim in later requests. If you switch advisor models mid-conversation, branch on `content.type` to handle both shapes.
408410 
409411### Error results
410412 
from line 425
423425 
424426The executor receives the error and continues without further advice. The request itself does not fail.
425427 
426| `error_code` | Meaning |
427| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
428| `max_uses_exceeded` | The request reached the `max_uses` cap set on the tool definition. Further advisor calls in the same request return this error. |
429| `too_many_requests` | The advisor sub-inference was rate-limited. |
430| `overloaded` | The advisor sub-inference hit capacity limits. |
431| `prompt_too_long` | The transcript exceeded the advisor model’s context window. |
432| `execution_time_exceeded` | The advisor sub-inference timed out. |
433| `model_not_found` | The configured advisor model is not available. |
434| `unavailable` | Any other advisor failure. |
428| `error_code` | Meaning |
429| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
430| `max_uses_exceeded` | The turn reached the [`max_uses`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#tool-parameters) cap set on the tool definition. Further advisor calls in the same turn return this error. |
431| `too_many_requests` | The advisor sub-inference was rate-limited. |
432| `overloaded` | The advisor sub-inference hit capacity limits. |
433| `prompt_too_long` | The transcript exceeded the advisor model’s context window. |
434| `execution_time_exceeded` | The advisor sub-inference timed out. |
435| `model_not_found` | The configured advisor model is not available. |
436| `unavailable` | Any other advisor failure. |
435437 
436438Advisor rate limits draw from the same per-model bucket as direct calls to the advisor model. A rate limit on the advisor appears as `too_many_requests` inside the tool result. A rate limit on the executor fails the whole request with HTTP 429.
437439 
438440## Multi-turn conversations
439441 
440Pass the full assistant content, including `advisor_tool_result` blocks, back to the API on subsequent turns. Round-trip the result blocks verbatim: with the newest Opus model as the advisor, as in this example, the result block’s `content` is the encrypted `advisor_redacted_result` variant, and the server decrypts it and renders the advice into the executor’s prompt on the next turn (see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants)). The mechanics are identical for any advisor model.
442Pass the full assistant content, including `advisor_tool_result` blocks, back to the API in later requests. Round-trip the result blocks verbatim. With the newest Opus model as the advisor, as in this example, the result block’s `content` is the encrypted `advisor_redacted_result` variant. In the next request, the server decrypts it and renders the advice into the executor’s prompt (see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants)). The mechanics are identical for any advisor model.
441443 
442444<CodeGroup exclude="shell">
443445 ```python Python
from line 666
664666 [
665667 'type' => 'advisor_20260301',
666668 'name' => 'advisor',
667 'model' => 'claude-opus-5-5',
669 'model' => Model::CLAUDE_OPUS_5_5,
668670 ],
669671 ];
670672 
from line 680
678680 $response = $client->beta->messages->create(
679681 maxTokens: 16000,
680682 messages: $messages,
681 model: 'claude-sonnet-5',
683 model: Model::CLAUDE_SONNET_5,
682684 tools: $tools,
683685 betas: ['advisor-tool-2026-03-01'],
684686 );
from line 694
692694 $response = $client->beta->messages->create(
693695 maxTokens: 16000,
694696 messages: $messages,
695 model: 'claude-sonnet-5',
697 model: Model::CLAUDE_SONNET_5,
696698 tools: $tools,
697699 betas: ['advisor-tool-2026-03-01'],
698700 );
from line 707
705707 {
706708 type: "advisor_20260301",
707709 name: "advisor",
708 model: "claude-opus-5-5"
710 model: Anthropic::Model::CLAUDE_OPUS_5_5
709711 }
710712 ]
711713 
from line 719
717719 ]
718720 
719721 response = client.beta.messages.create(
720 model: "claude-sonnet-5",
722 model: Anthropic::Model::CLAUDE_SONNET_5,
721723 max_tokens: 16000,
722724 tools: tools,
723725 messages: messages,
from line 733
731733 messages << { role: "user", content: "Now add a max-in-flight limit of 10." }
732734 
733735 response = client.beta.messages.create(
734 model: "claude-sonnet-5",
736 model: Anthropic::Model::CLAUDE_SONNET_5,
735737 max_tokens: 16000,
736738 tools: tools,
737739 messages: messages,
from line 742
740742 ```
741743</CodeGroup>
742744 
743You can drop the advisor tool from `tools` on a follow-up turn while the message history still contains `advisor_tool_result` blocks. The request is accepted and the historical blocks are preserved; the model cannot call the advisor on that turn. You must still send the `advisor-tool-2026-03-01` beta header for those history blocks to be accepted.
745You can drop the advisor tool from `tools` in a follow-up request while the message history still contains `advisor_tool_result` blocks, as long as no advisor call is [still pending](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#resuming-a-paused-turn). The API accepts the request and keeps the historical blocks, but the model cannot call the advisor in that request. You must still send the `advisor-tool-2026-03-01` beta header for those history blocks to be accepted.
744746 
745747<Note>
746748 The advisor tool has no built-in conversation-level cap. To limit advisor calls across a conversation, count them client-side. When you reach your ceiling, remove the advisor tool from your `tools` array. You do not need to strip `advisor_tool_result` blocks from your message history.
from line 1149
11471149 {
11481150 $results = [];
11491151 foreach ($content as $block) {
1150 if ($block->type === 'tool_use') {
1152 if ($block instanceof \Anthropic\Beta\Messages\BetaToolUseBlock) {
11511153 $results[] = [
11521154 'type' => 'tool_result',
11531155 'tool_use_id' => $block->id,
from line 1161
11591161 }
11601162 
11611163 $tools = [
1162 ['type' => 'advisor_20260301', 'name' => 'advisor', 'model' => 'claude-opus-5-5'],
1164 ['type' => 'advisor_20260301', 'name' => 'advisor', 'model' => Model::CLAUDE_OPUS_5_5],
11631165 // ... your other tools
11641166 ];
11651167 $task = 'Build a concurrent worker pool in Go with graceful shutdown.';
from line 1172
11701172 $response = $client->beta->messages->create(
11711173 maxTokens: 4096,
11721174 messages: $messages,
1173 model: 'claude-haiku-5-5',
1175 model: Model::CLAUDE_HAIKU_5_5,
11741176 tools: $tools,
11751177 betas: ['advisor-tool-2026-03-01'],
11761178 );
11771179 $messages[] = ['role' => 'assistant', 'content' => $response->content];
11781180 foreach ($response->content as $block) {
1179 if ($block->type === 'server_tool_use' && $block->name === 'advisor') {
1181 if ($block instanceof \Anthropic\Beta\Messages\BetaServerToolUseBlock && $block->name === 'advisor') {
11801182 $advisorCalled = true;
11811183 }
11821184 }
from line 1328
13261328 
13271329### Executor-side caching
13281330 
1329The `advisor_tool_result` block is cacheable like any other content block. A `cache_control` breakpoint placed after it on a subsequent turn hits. The executor’s prompt always contains the plaintext advice regardless of whether your client received `text` or `encrypted_content`, so caching behavior is identical for both result variants.
1331The `advisor_tool_result` block is cacheable like any other content block. A `cache_control` breakpoint placed after it in a later request hits. The executor’s prompt always contains the plaintext advice regardless of whether your client received `text` or `encrypted_content`, so caching behavior is identical for both result variants.
13301332 
13311333### Advisor-side caching
13321334 
from line 1400
13981400 [
13991401 'type' => 'advisor_20260301',
14001402 'name' => 'advisor',
1401 'model' => 'claude-opus-5-5',
1403 'model' => Model::CLAUDE_OPUS_5_5,
14021404 'caching' => ['type' => 'ephemeral', 'ttl' => '5m'],
14031405 ],
14041406 ];
from line 1411
14091411 {
14101412 type: "advisor_20260301",
14111413 name: "advisor",
1412 model: "claude-opus-5-5",
1414 model: Anthropic::Model::CLAUDE_OPUS_5_5,
14131415 caching: { type: "ephemeral", ttl: "5m" }
14141416 }
14151417 ]
from line 1558
15561558 [
15571559 'type' => 'advisor_20260301',
15581560 'name' => 'advisor',
1559 'model' => 'claude-opus-5-5',
1561 'model' => Model::CLAUDE_OPUS_5_5,
15601562 ],
15611563 [
15621564 'name' => 'run_bash',
from line 1581
15791581 {
15801582 type: "advisor_20260301",
15811583 name: "advisor",
1582 model: "claude-opus-5-5"
1584 model: Anthropic::Model::CLAUDE_OPUS_5_5
15831585 },
15841586 {
15851587 name: "run_bash",
from line 1692
16901692Advisor output is the advisor’s largest cost driver, and the top-level `max_tokens` does not bound it. The advisor receives both your system prompt and your user messages as quoted context about the executor’s task, so instructions that address the advisor directly are followed much more reliably than third-person descriptions. The most effective placement Anthropic tested is a line in the user message:
16911693 
16921694```text wrap
1693(Advisor: please keep your guidance under 80 words — I need a focused starting point, not a comprehensive plan.)
1695(Advisor: please keep your guidance under 80 words. I need a focused starting point, not a comprehensive plan.)
16941696```
16951697 
16961698This line can be prefixed programmatically by your agent framework before sending the request. The limit is a soft constraint. The advisor occasionally exceeds it, so ask for roughly 80 percent of your true ceiling.
from line 1770
17681770 [
17691771 'type' => 'advisor_20260301',
17701772 'name' => 'advisor',
1771 'model' => 'claude-opus-5-5',
1773 'model' => Model::CLAUDE_OPUS_5_5,
17721774 'max_tokens' => 2048,
17731775 ],
17741776 ];
from line 1781
17791781 {
17801782 type: "advisor_20260301",
17811783 name: "advisor",
1782 model: "claude-opus-5-5",
1784 model: Anthropic::Model::CLAUDE_OPUS_5_5,
17831785 max_tokens: 2048
17841786 }
17851787 ]
from line 2002
20002002 
20012003### Platform availability
20022004 
2003The advisor tool is available in beta on the Claude API, on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed). It is not currently available on Amazon Bedrock, Claude Models on Google Cloud (Google managed), or Microsoft Foundry.
2005The advisor tool is available in beta on the Claude API, on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), and on [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed).
20042006 
20052007## Advisor on Claude Managed Agents
20062008 

agents-and-tools/tool-use/browser-use-tool Changed · +5 / -1 lines

from line 1151
11511151 
11521152Claude 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.
11531153 
1154Anthropic has trained the model to resist these prompt injections and has added an extra layer of defense. If you use the browser use tool, classifiers will automatically scan what the browser returns, such as page text or screenshots, to flag potential prompt injections. When these classifiers identify a potential prompt injection, they will automatically steer the model to check whether the instruction really came from you before acting on it.
1154Anthropic has trained the model to resist these prompt injections and has added an extra layer of defense. If you use the browser use tool, classifiers automatically scan what the browser returns, such as page text or screenshots, to flag potential prompt injections. When these classifiers identify a potential prompt injection, they steer the model to check whether the instruction really came from you before acting on it.
11551155 
11561156This extra protection isn’t ideal for every use case (for example, use cases without a human in the loop), so if you’d like to opt out and turn it off, [contact support](https://support.claude.com/en/). The precautions listed earlier remain important even with these classifiers in place.
11571157 
from line 1592
15921592<CardGroup cols={2}>
15931593 <Card title="Browser and computer use with the SDK toolsets" icon="code" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-sdk">
15941594 Start from a partner’s driver, or write your own in Python or TypeScript. The SDK runs the loop and the checks you configure.
1595 </Card>
1596 
1597 <Card title="Example browser driver" icon="github-logo" href="https://github.com/anthropics/claude-quickstarts/tree/main/browser-toolset">
1598 Read a minimal Python and TypeScript driver for the SDK’s browser toolset. It controls Chromium through the Chrome DevTools Protocol and isn’t production code.
15951599 </Card>
15961600 
15971601 <Card title="Computer use tool" icon="computer" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool">

agents-and-tools/tool-use/computer-use-tool Changed · +14 / -14 lines

from line 64
6464 
6565In some circumstances, Claude follows commands found in content 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. Take precautions to isolate Claude from sensitive data and actions to avoid risks related to prompt injection.
6666 
67Anthropic has trained the model to resist these prompt injections and has added an extra layer of defense. If you use the computer use tools, classifiers will automatically scan what the tools return, such as screenshots, to flag potential prompt injections. When these classifiers identify a potential prompt injection, they will automatically steer the model to check whether the instruction really came from you before acting on it.
67Anthropic has trained the model to resist these prompt injections and has added an extra layer of defense. If you use the computer use tool, classifiers automatically scan what the tool returns, such as screenshots, to flag potential prompt injections. When these classifiers identify a potential prompt injection, they steer the model to check whether the instruction really came from you before acting on it.
6868 
6969This extra protection isn’t ideal for every use case (for example, use cases without a human in the loop), so if you’d like to opt out and turn it off, [contact support](https://support.claude.com/en/). The precautions listed earlier remain important even with these classifiers in place.
7070 
from line 341
341341 </Step>
342342</Steps>
343343 
344The 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).
344Steps 3 and 4, repeated without user input, form the “agent loop”: Claude responds with a tool use request, and your application responds to Claude with the results of evaluating that request.
345345 
346346### Batch actions
347347 
from line 443
443443 
4444442. **Desktop environment:** A lightweight UI with window manager (Mutter) and panel (Tint2) running on Linux, which provides a consistent graphical interface for Claude to interact with.
445445 
4463. **Applications:** Pre-installed Linux applications such as Firefox, LibreOffice, text editors, and file managers that Claude can use to complete tasks.
4463. **Applications:** Preinstalled Linux applications such as Firefox, LibreOffice, text editors, and file managers that Claude can use to complete tasks.
447447 
4484484. **Tool implementations:** Integration code that translates Claude’s abstract tool requests (such as “move mouse” or “take screenshot”) into actual operations in the virtual environment.
449449 
from line 451
451451 
452452When you use computer use, Claude doesn’t directly connect to this environment. Instead, your application:
453453 
4541. Receives Claude’s tool use requests
4552. Translates them into actions in your computing environment
4563. Captures the results (such as screenshots and command outputs)
4574. Returns these results to Claude
4541. Receives Claude’s tool use requests.
4552. Translates them into actions in your computing environment.
4563. Captures the results (such as screenshots and command outputs).
4574. Returns these results to Claude.
458458 
459459For security and isolation, the reference implementation runs all of this inside a Docker container with appropriate port mappings for viewing and interacting with the environment.
460460 
from line 465
465465Upgrading 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.
466466 
467467<Tip>
468 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.
468 The [computer use reference implementation](https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo) is a complete working example: a [containerized environment](https://github.com/anthropics/claude-quickstarts/blob/main/computer-use-demo/Dockerfile) suitable for computer use, implementations of [the computer use tools](https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo/computer_use_demo/tools), an [agent loop](https://github.com/anthropics/claude-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. To use `computer_toolset_20260801`, choose a [model that supports it](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#availability-feature-support), then select the toolset under **Tool Versions** in the web interface’s sidebar.
469469</Tip>
470470 
471471### Understand the agent loop
from line 893
893893 
894894### Build a custom computer use environment
895895 
896The [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 need:
896The [reference implementation](https://github.com/anthropics/claude-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 need:
897897 
898898* A virtualized or containerized environment suitable for computer use with Claude
899899* An implementation of the computer use tool’s actions
from line 906
906906 
907907<Steps>
908908 <Step title="Set up your computing environment">
909 Create a virtual display or connect to an existing display that Claude will interact with. This typically involves setting up Xvfb (X Virtual Framebuffer) or similar technology.
909 Create a virtual display or connect to an existing display that Claude interacts with. This typically involves setting up Xvfb (X Virtual Framebuffer) or similar technology.
910910 </Step>
911911 
912912 <Step title="Implement action handlers">
from line 2188
21882188 
21892189## Limitations
21902190 
21911. **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.
21911. **Latency:** Computer use latency for human-AI interactions might be too slow compared with 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.
219221922. **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.
219321933. **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.
219421944. **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.
from line 2236
22362236 Fix the most common tool-use errors with symptom-to-fix diagnostic tables.
22372237 </Card>
22382238 
2239 <Card title="Reference implementation" icon="github-logo" href="https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo">
2240 Get started with the complete Docker-based implementation
2239 <Card title="Reference implementation" icon="github-logo" href="https://github.com/anthropics/claude-quickstarts/tree/main/computer-use-demo">
2240 Get started with the complete Docker-based implementation.
22412241 </Card>
22422242 
22432243 <Card title="Tool use with Claude" icon="tool" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview">
from line 2245
22452245 </Card>
22462246 
22472247 <Card title="Best practices in detail" icon="book" href="https://claude.com/blog/best-practices-for-computer-and-browser-use-with-claude">
2248 Benchmarked recommendations for resolution, thinking effort, and context management
2248 Benchmarked recommendations for resolution, thinking effort, and context management.
22492249 </Card>
22502250 
22512251 <Card title="Browser use tool" icon="browser" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool">

agents-and-tools/tool-use/manage-tool-context Changed · +10 / -10 lines

from line 10
1010 
1111Each approach targets a different source of context pressure. Pick the one that matches where your tokens are going.
1212 
13| Approach | What it reduces | When it fits | Learn more |
14| ------------------------- | --------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
15| Tool search | Tool definitions loaded upfront | Large toolsets (20+ tools) where most tools aren’t needed every turn | [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) |
16| Programmatic tool calling | `tool_result` roundtrips | Chains of tool calls that can run as a single script | [Programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) |
17| Prompt caching | Token cost of repeated tool definitions | Stable toolsets across many requests | [Tool use with prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching) |
18| Context editing | Old `tool_result` blocks in history | Long conversations where early results are no longer relevant | [Context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) |
13| Approach | What it reduces | When it fits | Learn more |
14| ------------------------- | --------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
15| Tool search | Tool definitions loaded upfront | Many tools (10+), most of which aren’t needed every turn | [Tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool) |
16| Programmatic tool calling | `tool_result` roundtrips | Chains of tool calls that can run as a single script | [Programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) |
17| Prompt caching | Token cost of repeated tool definitions | Stable tool definitions across many requests | [Tool use with prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching) |
18| Context editing | Old `tool_result` blocks in history | Long conversations where early results are no longer relevant | [Context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) |
1919 
2020### Tool search
2121 
22Tool search keeps tool definitions out of the context window until Claude asks for them. Instead of sending 50 tool schemas upfront, you send a single `tool_search` tool and let Claude discover the rest on demand. This trades a small amount of latency (one extra turn to look up a tool) for a large reduction in baseline context usage.
22Tool search keeps tool definitions out of the context window until Claude asks for them. Instead of loading 50 tool schemas into context upfront, you mark them with `defer_loading: true`, add a tool search tool, and let Claude discover them on demand. This trades a small amount of latency (one extra turn to look up a tool) for a large reduction in baseline context usage.
2323 
2424### Programmatic tool calling
2525 
from line 27
2727 
2828### Prompt caching
2929 
30Prompt caching doesn’t reduce the number of tokens in context, but it reduces what you pay for them on subsequent requests. If your tool definitions are stable, cache them once and reuse the cached prefix across thousands of requests. This is the right choice when the toolset is large but fixed.
30Prompt caching doesn’t reduce the number of tokens in context, but it reduces what you pay for them on subsequent requests. If your tool definitions are stable, cache them once and reuse the cached prefix across thousands of requests. This is the right choice when your list of tools is large but fixed.
3131 
3232### Context editing
3333 
from line 35
3535 
3636## Combining approaches
3737 
38These approaches compose. A long-running agent might use tool search to keep the toolset lean, prompt caching to amortize the cost of the remaining definitions, and context editing to trim stale results as the conversation grows. Each solves a different part of the problem, so there’s no conflict in using them together.
38You can use these approaches together, because each solves a different part of the problem. A long-running agent might use tool search to load fewer tool definitions, prompt caching to amortize the cost of the remaining definitions, and context editing to trim stale results as the conversation grows.
3939 
4040A reasonable starting point for a high-volume agent:
4141 
42421. Enable prompt caching on your tool definitions from the start. Cache writes carry a 25 percent markup over base input pricing, which pays back on the second request that hits the cache.
432. Add tool search once your toolset grows past roughly 20 tools or your baseline context usage becomes noticeable.
432. Add tool search once you have 10 or more tools or your baseline context usage becomes noticeable.
44443. Add context editing once individual conversations start running long enough that early results become irrelevant.
45454. Consider programmatic tool calling if you notice repetitive chains of small tool calls that could run as a single batch.
4646 

agents-and-tools/tool-use/overview Changed · +17 / -18 lines

from line 16
1616 -H "content-type: application/json" \
1717 -d '{
1818 "model": "claude-opus-5-5",
19 "max_tokens": 1024,
19 "max_tokens": 4096,
2020 "tools": [{"type": "web_search_20260209", "name": "web_search"}],
21 "messages": [{"role": "user", "content": "What'\''s the latest on the Mars rover?"}]
21 "messages": [{"role": "user", "content": "What is the latest on the Mars rover?"}]
2222 }'
2323 ```
2424 
from line 25
2525 ```bash CLI
2626 ant messages create \
2727 --model claude-opus-5-5 \
28 --max-tokens 1024 \
28 --max-tokens 4096 \
2929 --tool '{type: web_search_20260209, name: web_search}' \
3030 --message '{role: user, content: "What is the latest on the Mars rover?"}'
3131 ```
from line 34
3434 client = anthropic.Anthropic()
3535 response = client.messages.create(
3636 model="claude-opus-5-5",
37 max_tokens=1024,
37 max_tokens=4096,
3838 tools=[{"type": "web_search_20260209", "name": "web_search"}],
39 messages=[{"role": "user", "content": "What's the latest on the Mars rover?"}],
39 messages=[{"role": "user", "content": "What is the latest on the Mars rover?"}],
4040 )
4141 print(response.content)
4242 ```
from line 45
4545 const client = new Anthropic();
4646 const response = await client.messages.create({
4747 model: "claude-opus-5-5",
48 max_tokens: 1024,
48 max_tokens: 4096,
4949 tools: [{ type: "web_search_20260209", name: "web_search" }],
50 messages: [{ role: "user", content: "What's the latest on the Mars rover?" }]
50 messages: [{ role: "user", content: "What is the latest on the Mars rover?" }]
5151 });
5252 console.log(response.content);
5353 ```
from line 58
5858 var parameters = new MessageCreateParams
5959 {
6060 Model = Model.ClaudeOpus5_5,
61 MaxTokens = 1024,
61 MaxTokens = 4096,
6262 Tools = [new ToolUnion(new WebSearchTool20260209())],
63 Messages = [new UserMessageParam { Content = "What's the latest on the Mars rover?" }]
63 Messages = [new UserMessageParam { Content = "What is the latest on the Mars rover?" }]
6464 };
6565 
6666 var message = await client.Messages.Create(parameters);
from line 72
7272 
7373 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
7474 Model: anthropic.ModelClaudeOpus5_5,
75 MaxTokens: 1024,
75 MaxTokens: 4096,
7676 Tools: []anthropic.ToolUnionParam{
7777 {OfWebSearchTool20260209: &anthropic.WebSearchTool20260209Param{}},
7878 },
7979 Messages: []anthropic.MessageParam{
80 anthropic.NewUserMessage(anthropic.NewTextBlock("What's the latest on the Mars rover?")),
80 anthropic.NewUserMessage(anthropic.NewTextBlock("What is the latest on the Mars rover?")),
8181 },
8282 })
8383 if err != nil {
from line 94
9494 
9595 MessageCreateParams params = MessageCreateParams.builder()
9696 .model(Model.CLAUDE_OPUS_5_5)
97 .maxTokens(1024L)
97 .maxTokens(4096L)
9898 .addTool(WebSearchTool20260209.builder().build())
99 .addUserMessage("What's the latest on the Mars rover?")
99 .addUserMessage("What is the latest on the Mars rover?")
100100 .build();
101101 
102102 Message response = client.messages().create(params);
from line 109
109109 
110110 $message = $client->messages->create(
111111 model: 'claude-opus-5-5',
112 maxTokens: 1024,
112 maxTokens: 4096,
113113 tools: [
114114 ['type' => 'web_search_20260209', 'name' => 'web_search'],
115115 ],
116116 messages: [
117 ['role' => 'user', 'content' => "What's the latest on the Mars rover?"],
117 ['role' => 'user', 'content' => 'What is the latest on the Mars rover?'],
118118 ],
119119 );
120120 
from line 126
126126 
127127 message = client.messages.create(
128128 model: Anthropic::Model::CLAUDE_OPUS_5_5,
129 max_tokens: 1024,
129 max_tokens: 4096,
130130 tools: [{ type: "web_search_20260209", name: "web_search" }],
131 messages: [{ role: "user", content: "What's the latest on the Mars rover?" }]
131 messages: [{ role: "user", content: "What is the latest on the Mars rover?" }]
132132 )
133133 puts message.content
134134 ```
from line 779
779779| Claude Sonnet 4 ([retired, except on Claude Models on Google Cloud (Google managed) and Bedrock](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 313 tokens | 315 tokens |
780780| Claude Haiku 5.5 | 286 tokens | 406 tokens |
781781| Claude Haiku 4.5 | 496 tokens | 588 tokens |
782| Claude Haiku 3.5 ([retired, except on Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | 264 tokens | 355 tokens |
783782 
784783* **auto, none:** The count when tool\_choice is auto or none.
785784* **any, tool:** The count when tool\_choice is any or tool.

agents-and-tools/tool-use/programmatic-tool-calling Changed · +20 / -18 lines

from line 457
457457* **Container creation:** A new container is created for each request unless you reuse an existing one.
458458* **Container ID:** Returned in responses in the `container` field, along with an `expires_at` timestamp.
459459* **Reuse:** Pass the container ID back on the next request to keep state. While a programmatic tool call is waiting for your result, the container ID is required on that request, not optional: the API rejects the request without it.
460* **Expiration:** `expires_at` tells you how long the container has left. Idle containers are currently reclaimed after about 5 minutes, and no container can be reused more than 30 days after it was created.
460* **Expiration:** Containers expire 30 days after creation. After about 5 minutes of inactivity a container is checkpointed, and sending a request with its ID inside the 30-day window restores it. The `expires_at` timestamp is a shorter rolling value and doesn’t report the 30-day limit.
461461 
462462<Warning>
463463 While Claude’s code is waiting for a programmatic tool result, the pending call times out after about 4 minutes and raises a `TimeoutError` inside the code. Return each tool result well before the `expires_at` timestamp on the paused response. See [Container expiration during tool call](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#container-expiration-during-tool-call).
from line 475
475475 Provide detailed descriptions of your tool’s output format in the tool description. If you specify that the tool returns JSON, Claude attempts to deserialize and process the result in code. The more detail you provide about the output schema, the better Claude can handle the response programmatically.
476476</Note>
477477 
478The request shape is identical to the [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#quick-start) example: include `code_execution` in your tools list, add `allowed_callers: ["code_execution_20260120"]` to any tool you want Claude to invoke from code, and send your user message. The remaining steps in this workflow use the user message `"Query customer purchase history from the last quarter and identify our top 5 customers by revenue"`.
478The request shape is identical to the [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling#quick-start) example: include `code_execution` in your tools list, add `allowed_callers: ["code_execution_20260120"]` to any tool you want Claude to call from code, and send your user message. The remaining steps in this workflow use the user message `"Query customer purchase history from the last quarter and identify our top 5 customers by revenue"`.
479479 
480480### Step 2: API response with tool call
481481 
from line 544
544544 "content": [
545545 {
546546 "type": "text",
547 "text": "I'\''ll query the purchase history and analyze the results."
547 "text": "I will query the purchase history and analyze the results."
548548 },
549549 {
550550 "type": "server_tool_use",
from line 655
655655 ```
656656 
657657 ```python Python
658 client = anthropic.Anthropic()
659 
658660 response = client.messages.create(
659661 model="claude-opus-5-5",
660662 max_tokens=4096,
from line 724
722724 ```
723725 
724726 ```typescript TypeScript
727 const client = new Anthropic();
728 
725729 const response = await client.messages.create({
726730 model: "claude-opus-5-5",
727731 max_tokens: 4096,
from line 1040
10361040 ],
10371041 ],
10381042 ],
1039 model: 'claude-opus-5-5',
1043 model: Model::CLAUDE_OPUS_5_5,
10401044 container: 'container_xyz789',
10411045 // Same tools array as the original request
10421046 tools: [
from line 1070
10661070 ```
10671071 
10681072 ```ruby Ruby
1069 require "anthropic"
1070 
10711073 client = Anthropic::Client.new
10721074 
10731075 message = client.messages.create(
1074 model: "claude-opus-5-5",
1076 model: Anthropic::Model::CLAUDE_OPUS_5_5,
10751077 max_tokens: 4096,
10761078 container: "container_xyz789",
10771079 messages: [
from line 1196
11941196 
11951197This pattern:
11961198 
1197* Reduces model round-trips from N (one for each region) to 1
1199* Reduces model round trips from N (one for each region) to 1
11981200* Processes large result sets programmatically before returning to Claude
11991201* Saves tokens by only returning aggregated conclusions instead of raw data
12001202 
from line 1319
13171319 
13181320To prevent timeouts:
13191321 
1320* Monitor the `expires_at` field in responses.
1322* Monitor the `expires_at` field on paused responses.
13211323* Implement timeouts for your tool execution.
13221324* Consider breaking long operations into smaller chunks.
13231325 
from line 1408
14061408 
14071409### Validate tool results before use
14081410 
1409When implementing user-defined tools that will be called programmatically:
1411When implementing user-defined tools that Claude calls programmatically:
14101412 
14111413* **Tool results are returned as strings:** They can contain any content, including code snippets or executable commands that might be processed by the execution environment.
14121414* **Validate external tool results:** If your tool returns data from external sources or accepts user input, be aware of code injection risks if the output is interpreted or run as code.
from line 1417
14151417 
14161418Programmatic tool calling reduces token consumption in three ways:
14171419 
1418* **Tool results from programmatic calls are not added to Claude’s context** - only the final code output is
1419* **Intermediate processing occurs in code** - filtering, aggregation, and other transformations don’t consume model tokens
1420* **Multiple tool calls in one code execution** - reduces overhead compared to separate model turns
1420* **Tool results from programmatic calls are not added to Claude’s context:** Only the final code output is.
1421* **Intermediate processing occurs in code:** Filtering, aggregation, and other transformations don’t consume model tokens.
1422* **Multiple tool calls in one code execution:** This reduces overhead compared to separate model turns.
14211423 
1422For example, calling 10 tools directly uses \~10x the tokens of calling them programmatically and returning a summary.
1424For example, calling 10 tools directly uses roughly 10 times the tokens of calling them programmatically and returning a summary.
14231425 
14241426In Anthropic’s internal evaluations on a production Claude model:
14251427 
from line 1449
14471449 
14481450### When to use programmatic calling
14491451 
1450Programmatic tool calling trades a small fixed overhead (container startup, script generation) for large savings on tool-result tokens and model round-trips. Whether that trade is worthwhile depends on workload shape.
1452Programmatic tool calling trades a small fixed overhead (container startup, script generation) for large savings on tool-result tokens and model round trips. Whether that trade is worthwhile depends on workload shape.
14511453 
14521454**Strong fit:**
14531455 
from line 1459
14571459 
14581460**Weak fit:**
14591461 
1460* Strictly sequential workflows where each call depends on Claude reasoning over the previous result, because the script cannot skip the model round-trip in that case
1462* Strictly sequential workflows where each call depends on Claude reasoning over the previous result, because the script cannot skip the model round trip in that case
14611463* A small number of tool calls with small responses, especially on the first turn of a conversation, where container and script overhead can exceed the savings
14621464* Tools that require immediate user feedback between calls
14631465 
from line 1480
14781480 
14791481**Container expiration**
14801482 
1481* Respond to each programmatic tool call well before the paused response’s `expires_at` timestamp. Claude’s code stops waiting for a result after about 4 minutes, and idle containers are currently reclaimed after about 5 minutes.
1483* Respond to each programmatic tool call well before the paused response’s `expires_at` timestamp. Claude’s code stops waiting for a result after about 4 minutes.
14821484* Consider implementing faster tool execution.
14831485 
14841486**Tool result not parsed correctly**

agents-and-tools/tool-use/server-tools Changed · +41 / -41 lines

from line 37
3737 -H "content-type: application/json" \
3838 -d '{
3939 "model": "claude-opus-5-5",
40 "max_tokens": 1024,
40 "max_tokens": 4096,
4141 "messages": [
4242 {
4343 "role": "user",
from line 50
5050 
5151 ```bash CLI
5252 # Initial request. If "stop_reason" in the output is "pause_turn", re-run with
53 # the assistant content appended to messages (see the SDK tabs).
53 # the assistant content appended to messages.
5454 ant messages create <<'YAML'
5555 model: claude-opus-5-5
56 max_tokens: 1024
56 max_tokens: 4096
5757 tools:
5858 - {type: web_search_20250305, name: web_search, max_uses: 10}
5959 messages:
from line 67
6767 # Initial request with web search
6868 response = client.messages.create(
6969 model="claude-opus-5-5",
70 max_tokens=1024,
70 max_tokens=4096,
7171 messages=[
7272 {
7373 "role": "user",
from line 91
9191 # Send the continuation request
9292 continuation = client.messages.create(
9393 model="claude-opus-5-5",
94 max_tokens=1024,
94 max_tokens=4096,
9595 messages=messages,
9696 tools=[{"type": "web_search_20250305", "name": "web_search", "max_uses": 10}],
9797 )
from line 107
107107 // Initial request with web search
108108 const response = await client.messages.create({
109109 model: "claude-opus-5-5",
110 max_tokens: 1024,
110 max_tokens: 4096,
111111 messages: [
112112 {
113113 role: "user",
from line 139
139139 // Send the continuation request
140140 const continuation = await client.messages.create({
141141 model: "claude-opus-5-5",
142 max_tokens: 1024,
142 max_tokens: 4096,
143143 messages,
144144 tools: [
145145 {
from line 162
162162 var parameters = new MessageCreateParams
163163 {
164164 Model = Model.ClaudeOpus5_5,
165 MaxTokens = 1024,
165 MaxTokens = 4096,
166166 Messages = [
167167 new UserMessageParam
168168 {
from line 180
180180 var continuationParams = new MessageCreateParams
181181 {
182182 Model = Model.ClaudeOpus5_5,
183 MaxTokens = 1024,
183 MaxTokens = 4096,
184184 Messages = [
185185 new UserMessageParam
186186 {
from line 214
214214 
215215 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
216216 Model: anthropic.ModelClaudeOpus5_5,
217 MaxTokens: 1024,
217 MaxTokens: 4096,
218218 Messages: []anthropic.MessageParam{
219219 anthropic.NewUserMessage(anthropic.NewTextBlock("Search for comprehensive information about quantum computing breakthroughs in 2025")),
220220 },
from line 228
228228 // Pass the paused response back as-is so Claude can continue the turn
229229 continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
230230 Model: anthropic.ModelClaudeOpus5_5,
231 MaxTokens: 1024,
231 MaxTokens: 4096,
232232 Messages: []anthropic.MessageParam{
233233 anthropic.NewUserMessage(anthropic.NewTextBlock("Search for comprehensive information about quantum computing breakthroughs in 2025")),
234234 response.ToParam(),
from line 253
253253 
254254 MessageCreateParams params = MessageCreateParams.builder()
255255 .model(Model.CLAUDE_OPUS_5_5)
256 .maxTokens(1024L)
256 .maxTokens(4096L)
257257 .addUserMessage("Search for comprehensive information about quantum computing breakthroughs in 2025")
258258 .addTool(WebSearchTool20250305.builder()
259259 .maxUses(10L)
from line 266
266266 && response.stopReason().get().equals(StopReason.PAUSE_TURN)) {
267267 MessageCreateParams continuationParams = MessageCreateParams.builder()
268268 .model(Model.CLAUDE_OPUS_5_5)
269 .maxTokens(1024L)
269 .maxTokens(4096L)
270270 .addUserMessage("Search for comprehensive information about quantum computing breakthroughs in 2025")
271271 .addMessage(response)
272272 .addTool(WebSearchTool20250305.builder()
from line 286
286286 $client = new Client();
287287 
288288 $response = $client->messages->create(
289 maxTokens: 1024,
289 maxTokens: 4096,
290290 messages: [
291291 [
292292 'role' => 'user',
from line 316
316316 ];
317317 
318318 $continuation = $client->messages->create(
319 maxTokens: 1024,
319 maxTokens: 4096,
320320 messages: $messages,
321321 model: 'claude-opus-5-5',
322322 tools: [
from line 339
339339 
340340 response = client.messages.create(
341341 model: Anthropic::Model::CLAUDE_OPUS_5_5,
342 max_tokens: 1024,
342 max_tokens: 4096,
343343 messages: [
344344 {
345345 role: "user",
from line 370
370370 
371371 continuation = client.messages.create(
372372 model: Anthropic::Model::CLAUDE_OPUS_5_5,
373 max_tokens: 1024,
373 max_tokens: 4096,
374374 messages: messages,
375375 tools: [
376376 {
from line 496
496496 To give Claude more input, send it as a separate user message after the turn completes.
497497</Warning>
498498 
499**How this differs from `pause_turn`:** A [`pause_turn` response](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn) can also end with a `server_tool_use` block that has not run, but it never leaves a client `tool_use` block waiting on you, so you continue it by re-sending the assistant content as-is. A response that leaves a client `tool_use` block waiting on you never has a `stop_reason` of `pause_turn`: when Claude stops to call your tools, `stop_reason` is `tool_use`, and you continue it by sending the client `tool_result` blocks rather than by re-sending the response. In both cases the API runs the pending server tool at the start of the next request.
499**How this differs from `pause_turn`:** A [`pause_turn` response](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn) can also end with a `server_tool_use` block that has not run, but it never leaves a client `tool_use` block waiting on you, so you continue it by re-sending the assistant content as-is. A response that leaves a client `tool_use` block waiting on you never has a `stop_reason` of `pause_turn`: when Claude stops to call your tools, `stop_reason` is `tool_use`, and you continue it by sending the response back with a new user message that holds the client `tool_result` blocks. In both cases the API runs the pending server tool at the start of the next request.
500500 
501501The following example enables web fetch together with a user-defined `run_command` tool and handles the mixed response:
502502 
from line 504
504504 ```bash cURL
505505 # If "stop_reason" is "tool_use" and a server_tool_use block has no matching
506506 # result block, that call is not finished. Run the client tools, then POST
507 # again with one more user message containing only their tool_result blocks
508 # and the same tools array (see the SDK tabs).
507 # again with the assistant content, one more user message containing only their
508 # tool_result blocks, and the same tools array.
509509 curl https://api.anthropic.com/v1/messages \
510510 -H "x-api-key: $ANTHROPIC_API_KEY" \
511511 -H "anthropic-version: 2026-10-21" \
from line 512
512512 -H "content-type: application/json" \
513513 -d '{
514514 "model": "claude-opus-5-5",
515 "max_tokens": 1024,
515 "max_tokens": 4096,
516516 "messages": [
517517 {
518518 "role": "user",
from line 536
536536 
537537 ```bash CLI
538538 # If "stop_reason" is "tool_use" and a server_tool_use block has no matching
539 # result block, run the client tools and re-run with a user message of only
540 # their tool_result blocks appended (see the SDK tabs).
539 # result block, run the client tools and re-run with the assistant content and
540 # a user message of only their tool_result blocks appended.
541541 ant messages create <<'YAML'
542542 model: claude-opus-5-5
543 max_tokens: 1024
543 max_tokens: 4096
544544 messages:
545545 - role: user
546546 content: "Summarize https://example.com/article and run uname -a to tell me what system this is on."
from line 581
581581 ]
582582 
583583 response = client.messages.create(
584 model="claude-opus-5-5", max_tokens=1024, tools=tools, messages=messages
584 model="claude-opus-5-5", max_tokens=4096, tools=tools, messages=messages
585585 )
586586 
587587 tool_results = [
from line 600
600600 # Send back only the client tool_result blocks, with the same tools.
601601 continuation = client.messages.create(
602602 model="claude-opus-5-5",
603 max_tokens=1024,
603 max_tokens=4096,
604604 tools=tools,
605605 messages=[
606606 *messages,
from line 644
644644 
645645 const response = await client.messages.create({
646646 model: "claude-opus-5-5",
647 max_tokens: 1024,
647 max_tokens: 4096,
648648 tools: [webFetchTool, runCommandTool],
649649 messages
650650 });
from line 666
666666 // Send back only the client tool_result blocks, with the same tools.
667667 const continuation = await client.messages.create({
668668 model: "claude-opus-5-5",
669 max_tokens: 1024,
669 max_tokens: 4096,
670670 tools: [webFetchTool, runCommandTool],
671671 messages: [
672672 ...messages,
from line 712
712712 var response = await client.Messages.Create(new MessageCreateParams
713713 {
714714 Model = Model.ClaudeOpus5_5,
715 MaxTokens = 1024,
715 MaxTokens = 4096,
716716 Tools = tools,
717717 Messages = [userMessage]
718718 });
from line 738
738738 var continuation = await client.Messages.Create(new MessageCreateParams
739739 {
740740 Model = Model.ClaudeOpus5_5,
741 MaxTokens = 1024,
741 MaxTokens = 4096,
742742 Tools = tools,
743743 Messages =
744744 [
from line 785
785785 
786786 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
787787 Model: anthropic.ModelClaudeOpus5_5,
788 MaxTokens: 1024,
788 MaxTokens: 4096,
789789 Tools: tools,
790790 Messages: []anthropic.MessageParam{userMessage},
791791 })
from line 807
807807 // Send back only the client tool_result blocks, with the same tools.
808808 continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
809809 Model: anthropic.ModelClaudeOpus5_5,
810 MaxTokens: 1024,
810 MaxTokens: 4096,
811811 Tools: tools,
812812 Messages: []anthropic.MessageParam{
813813 userMessage,
from line 844
844844 
845845 Message response = client.messages().create(MessageCreateParams.builder()
846846 .model(Model.CLAUDE_OPUS_5_5)
847 .maxTokens(1024L)
847 .maxTokens(4096L)
848848 .addTool(WebFetchTool20250910.builder()
849849 .maxUses(5L)
850850 .build())
from line 871
871871 // Send back only the client tool_result blocks, with the same tools.
872872 Message continuation = client.messages().create(MessageCreateParams.builder()
873873 .model(Model.CLAUDE_OPUS_5_5)
874 .maxTokens(1024L)
874 .maxTokens(4096L)
875875 .addTool(WebFetchTool20250910.builder()
876876 .maxUses(5L)
877877 .build())
from line 909
909909 $userMessage = ['role' => 'user', 'content' => 'Summarize https://example.com/article and run uname -a to tell me what system this is on.'];
910910 
911911 $response = $client->messages->create(
912 maxTokens: 1024,
912 maxTokens: 4096,
913913 messages: [$userMessage],
914914 model: 'claude-opus-5-5',
915915 tools: $tools,
from line 931
931931 // A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
932932 // Send back only the client tool_result blocks, with the same tools.
933933 $continuation = $client->messages->create(
934 maxTokens: 1024,
934 maxTokens: 4096,
935935 messages: [
936936 $userMessage,
937937 ['role' => 'assistant', 'content' => $response->content],
from line 971
971971 }
972972 
973973 response = client.messages.create(
974 model: "claude-opus-5-5",
975 max_tokens: 1024,
974 model: Anthropic::Model::CLAUDE_OPUS_5_5,
975 max_tokens: 4096,
976976 tools: tools,
977977 messages: [user_message]
978978 )
from line 993
993993 # A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
994994 # Send back only the client tool_result blocks, with the same tools.
995995 continuation = client.messages.create(
996 model: "claude-opus-5-5",
997 max_tokens: 1024,
996 model: Anthropic::Model::CLAUDE_OPUS_5_5,
997 max_tokens: 4096,
998998 tools: tools,
999999 messages: [
10001000 user_message,
from line 1088
10881088 
10891089Server-tool events stream as part of the normal server-sent events (SSE) flow. A `server_tool_use` block that Claude calls directly streams like a client `tool_use` block: a `content_block_start` event followed by `input_json_delta` events. The result block arrives complete in a single `content_block_start` event, with no deltas.
10901090 
1091See [Streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for the full event reference. Individual tool pages document tool-specific event names where they differ.
1091See [Streaming messages](https://platform.claude.com/docs/en/build-with-claude/streaming) for the full event reference. Individual tool pages document tool-specific event names where they differ.
10921092 
10931093## Batch requests
10941094 

agents-and-tools/tool-use/tool-reference Changed · +10 / -14 lines

from line 84
8484 
8585## Tool definition properties
8686 
87Every 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.
87Every 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. You can combine these properties, with two exceptions: a tool with `defer_loading: true` can’t also carry `cache_control`, and a user-defined tool with `strict: true` can’t list a code execution caller in `allowed_callers`.
8888 
89| Property | Purpose | Available on | Detailed guide |
90| ----------------------- | --------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
91| `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) |
92| `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) |
93| `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) |
94| `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) |
95| `input_examples` | Provide example input objects to show Claude 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) |
96| `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) |
89| Property | Purpose | Available on | Detailed guide |
90| ----------------------- | --------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
91| `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) |
92| `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) |
93| `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 [MCP toolset 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) |
94| `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) |
95| `input_examples` | Provide example input objects to show Claude 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) |
96| `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) |
9797 
9898### `allowed_callers` values
9999 
from line 110
110110 
111111### `defer_loading` and prompt caching
112112 
113Tools with `defer_loading: true` are stripped from the rendered tools section before the cache key is computed. They don’t appear in the system-prompt prefix at all. When tool search discovers a deferred tool and returns a `tool_reference` for it, the tool’s full definition is expanded inline at that point in the conversation body, not in the prefix.
114 
115This means `defer_loading: true` preserves your prompt cache. You can add deferred tools to a request without invalidating an existing cache entry, and the cache remains valid across the turn where the tool is discovered and the turn where it’s called.
116 
117To learn how to combine `defer_loading` with `cache_control` breakpoints, see the [Tool search tool prompt caching guidance](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#prompt-caching).
113`defer_loading: true` preserves your prompt cache: tool search can load a deferred tool during a conversation without invalidating an existing cache entry. Put `cache_control` breakpoints on non-deferred tools. To learn how deferred tools keep the cache valid, see [`defer_loading` and cache preservation](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-use-with-prompt-caching#defer-loading-and-cache-preservation).
118114 

agents-and-tools/tool-use/tool-search-tool Changed · +22 / -22 lines

from line 67
6767 
6868Both tool search variants are available on the following models:
6969 
70| Model | Tool versions |
71| ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
72| Claude Fable 5.1 (claude-fable-5-1) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
73| Claude Mythos 5.1 (claude-mythos-5-1) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
74| Claude Fable 5 (claude-fable-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
75| Claude Mythos 5 (claude-mythos-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
76| Claude Opus 5.5 (claude-opus-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
77| Claude Opus 5 (claude-opus-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
78| Claude Sonnet 5.5 (claude-sonnet-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
79| Claude Sonnet 5 (claude-sonnet-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
80| Claude Haiku 5.5 (claude-haiku-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
81| Claude Opus 4.8 (claude-opus-4-8) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
82| Claude Opus 4.7 (claude-opus-4-7) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
83| Claude Opus 4.6 (claude-opus-4-6) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
84| Claude Sonnet 4.6 (claude-sonnet-4-6) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
85| Claude Opus 4.5 (claude-opus-4-5-20251101) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
86| Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
87| Claude Haiku 4.5 (claude-haiku-4-5-20251001) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
70| Model | Tool versions |
71| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
72| Claude Fable 5.1 (claude-fable-5-1) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
73| Claude Mythos 5.1 (claude-mythos-5-1) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
74| Claude Fable 5 (claude-fable-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
75| Claude Mythos 5 (claude-mythos-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
76| Claude Opus 5.5 (claude-opus-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
77| Claude Opus 5 (claude-opus-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
78| Claude Sonnet 5.5 (claude-sonnet-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
79| Claude Sonnet 5 (claude-sonnet-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
80| Claude Haiku 5.5 (claude-haiku-5-5) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
81| Claude Opus 4.8 (claude-opus-4-8) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
82| Claude Opus 4.7 (claude-opus-4-7) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
83| Claude Opus 4.6 (claude-opus-4-6) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
84| Claude Sonnet 4.6 (claude-sonnet-4-6) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
85| Claude Opus 4.5 (claude-opus-4-5-20251101) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
86| Claude Sonnet 4.5 (claude-sonnet-4-5-20250929) (deprecated; see [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
87| Claude Haiku 4.5 (claude-haiku-4-5-20251001) | `tool_search_tool_regex_20251119`, `tool_search_tool_bm25_20251119` |
8888 
8989Claude Opus 4.1 and earlier models don’t support the tool search tool.
9090 
from line 626
626626 
627627Both tool search variants (`regex` and `bm25`) search tool names, descriptions, argument names, and argument descriptions.
628628 
629Internally, 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.
629Internally, 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 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 list of tools, so using `defer_loading` with strict mode doesn’t make the API recompile the grammar.
630630 
631631## Response format
632632 
from line 819
819819 
820820## Streaming
821821 
822With streaming enabled, you’ll receive tool search events as part of the stream:
822With streaming enabled, you receive tool search events as part of the stream:
823823 
824824```sse
825825event: content_block_start
from line 840
840840 
841841## Batch requests
842842 
843You can include the tool search tool in the [Messages Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing).
843You can include the tool search tool in the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing).
844844 
845845## Limits and best practices
846846 
from line 857
857857 
858858* You have 10 or more tools available.
859859* Your tool definitions consume more than 10k tokens.
860* Tool selection accuracy drops as your toolset grows.
860* Tool selection accuracy drops as you add more tools.
861861* You aggregate multiple MCP servers (200+ tools).
862862* Your tool library grows over time.
863863 

agents-and-tools/tool-use/tool-use-with-prompt-caching Changed · +11 / -11 lines

from line 50
5050 
5151This means adding tools dynamically through tool search does not break your cache. You can start a conversation with a small set of always-loaded tools (cached), let the model discover additional tools as needed, and keep the same cache hit across every turn.
5252 
53`defer_loading` also acts independently of grammar construction for [strict mode](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). The grammar builds from the full toolset regardless of which tools are deferred, so prompt caching and grammar caching are both preserved when tools load dynamically.
53`defer_loading` also acts independently of grammar construction for [strict mode](https://platform.claude.com/docs/en/agents-and-tools/tool-use/strict-tool-use). The grammar builds from the full list of tools regardless of which tools are deferred, so prompt caching and grammar caching are both preserved when tools load dynamically.
5454 
5555## What invalidates your cache
5656 
5757The cache follows a prefix hierarchy (`tools` → `system` → `messages`), so a change at one level invalidates that level and everything after it:
5858 
59| Change | Invalidates |
60| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
61| Modifying tool definitions | Entire cache (tools, system, messages) |
62| Toggling web search or citations | System and messages caches |
63| Changing `tool_choice` | Messages cache |
64| Changing `disable_parallel_tool_use` | Messages cache |
65| Toggling images present/absent | Messages cache |
66| Changing thinking parameters | Messages cache always; tool and system caches too on models that render the thinking configuration ahead of them ([details](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching)) |
67| Changing `output_config.effort` | Same as thinking parameters; setting the model’s default explicitly is equivalent to omitting it |
59| Change | Invalidates |
60| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
61| Modifying tool definitions | Entire cache (tools, system, messages) |
62| Toggling web search or citations | System and messages caches |
63| Changing `tool_choice` | Messages cache |
64| Changing `disable_parallel_tool_use` | Messages cache |
65| Toggling images present/absent | Messages cache |
66| Changing thinking parameters | Messages cache always; tool and system caches too on models that render the thinking configuration ahead of them (see [Thinking and prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching)) |
67| Changing `output_config.effort` | Same as thinking parameters; setting the model’s default explicitly is equivalent to omitting it |
6868 
6969<Note>
7070 If you need to vary `tool_choice` mid-conversation, consider placing cache breakpoints before the variation point.
from line 99
9999 Learn the full prompt caching model, including TTLs and pricing.
100100 </Card>
101101 
102 <Card title="Tool search" icon="magnifying-glass" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool">
102 <Card title="Tool search tool" icon="magnifying-glass" href="https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool">
103103 Load tools on demand without breaking your cache.
104104 </Card>
105105 

agents-and-tools/tool-use/web-fetch-tool Changed · +27 / -32 lines

from line 65
6565 If data exfiltration is a concern, consider:
6666 
6767 * Disabling the web fetch tool entirely
68 * Using the `max_uses` parameter to limit the number of requests
68 * Using the [`max_uses`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#max-uses) parameter to limit the number of fetches in a turn
6969 * Using the `allowed_domains` parameter to restrict to known safe domains
7070 * Using the `url_sources` parameter to stop client-side tool results from counting as a source (see [URL sources](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#url-sources))
7171</Warning>
from line 136
136136 ```
137137 
138138 ```bash CLI
139 ant messages create <<'YAML'
140 model: claude-opus-5-5
141 max_tokens: 4096
142 messages:
143 - role: user
144 content: >-
145 Fetch the content at https://example.com/research-paper
146 and extract the key findings.
147 tools:
148 - type: web_fetch_20260318
149 name: web_fetch
150 YAML
139 ant messages create \
140 --model claude-opus-5-5 \
141 --max-tokens 4096 \
142 --message '{role: user, content: "Fetch the content at https://example.com/research-paper and extract the key findings."}' \
143 --tool '{type: web_fetch_20260318, name: web_fetch}'
151144 ```
152145 
153146 ```python Python
from line 239
246239 messages: [
247240 ['role' => 'user', 'content' => 'Fetch the content at https://example.com/research-paper and extract the key findings.']
248241 ],
249 model: 'claude-opus-5-5',
242 model: Model::CLAUDE_OPUS_5_5,
250243 tools: [[
251244 'type' => 'web_fetch_20260318',
252245 'name' => 'web_fetch',
from line 252
259252 client = Anthropic::Client.new
260253 
261254 message = client.messages.create(
262 model: "claude-opus-5-5",
255 model: Anthropic::Model::CLAUDE_OPUS_5_5,
263256 max_tokens: 4096,
264257 messages: [
265258 { role: "user", content: "Fetch the content at https://example.com/research-paper and extract the key findings." }
from line 284
291284 -H "content-type: application/json" \
292285 -d '{
293286 "model": "claude-opus-5-5",
294 "max_tokens": 1024,
287 "max_tokens": 4096,
295288 "messages": [
296289 {
297290 "role": "user",
from line 302
309302 ```bash CLI
310303 ant messages create \
311304 --model claude-opus-5-5 \
312 --max-tokens 1024 \
305 --max-tokens 4096 \
313306 --message '{role: user, content: "Please analyze the content at https://example.com/article"}' \
314307 --tool '{type: web_fetch_20250910, name: web_fetch, max_uses: 5}'
315308 ```
from line 312
319312 
320313 response = client.messages.create(
321314 model="claude-opus-5-5",
322 max_tokens=1024,
315 max_tokens=4096,
323316 messages=[
324317 {
325318 "role": "user",
from line 329
336329 
337330 const response = await client.messages.create({
338331 model: "claude-opus-5-5",
339 max_tokens: 1024,
332 max_tokens: 4096,
340333 messages: [
341334 {
342335 role: "user",
from line 354
361354 var parameters = new MessageCreateParams
362355 {
363356 Model = Model.ClaudeOpus5_5,
364 MaxTokens = 1024,
357 MaxTokens = 4096,
365358 Messages = [new UserMessageParam { Content = "Please analyze the content at https://example.com/article" }],
366359 Tools = [new ToolUnion(new WebFetchTool20250910() { MaxUses = 5 })]
367360 };
from line 368
375368 
376369 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
377370 Model: anthropic.ModelClaudeOpus5_5,
378 MaxTokens: 1024,
371 MaxTokens: 4096,
379372 Messages: []anthropic.MessageParam{
380373 anthropic.NewUserMessage(anthropic.NewTextBlock("Please analyze the content at https://example.com/article")),
381374 },
from line 392
399392 
400393 MessageCreateParams params = MessageCreateParams.builder()
401394 .model(Model.CLAUDE_OPUS_5_5)
402 .maxTokens(1024L)
395 .maxTokens(4096L)
403396 .addUserMessage("Please analyze the content at https://example.com/article")
404397 .addTool(WebFetchTool20250910.builder()
405398 .maxUses(5L)
from line 408
415408 $client = new Client();
416409 
417410 $message = $client->messages->create(
418 maxTokens: 1024,
411 maxTokens: 4096,
419412 messages: [
420413 ['role' => 'user', 'content' => 'Please analyze the content at https://example.com/article']
421414 ],
422 model: 'claude-opus-5-5',
415 model: Model::CLAUDE_OPUS_5_5,
423416 tools: [[
424417 'type' => 'web_fetch_20250910',
425418 'name' => 'web_fetch',
from line 426
433426 client = Anthropic::Client.new
434427 
435428 message = client.messages.create(
436 model: "claude-opus-5-5",
437 max_tokens: 1024,
429 model: Anthropic::Model::CLAUDE_OPUS_5_5,
430 max_tokens: 4096,
438431 messages: [
439432 { role: "user", content: "Please analyze the content at https://example.com/article" }
440433 ],
from line 450
457450 "type": "web_fetch_20250910",
458451 "name": "web_fetch",
459452 
460 // Optional: Limit the number of fetches for each request
453 // Optional: Limit the number of fetches
461454 "max_uses": 10,
462455 
463456 // Optional: Only fetch from these domains
from line 478
485478 
486479### Max uses
487480 
488The `max_uses` parameter limits the number of web fetches performed. Failed fetches count against the limit. If Claude attempts more fetches than allowed, the `web_fetch_tool_result` is an error with the `max_uses_exceeded` error code. There is currently no default limit.
481The `max_uses` parameter limits the number of web fetches in a single turn. Failed fetches count against the limit. If Claude calls web fetch directly more times than allowed, the `web_fetch_tool_result` is an error with the `max_uses_exceeded` error code. If Claude calls web fetch from code execution more times than allowed, the code execution run ends with an error. There is no default limit.
489482 
483A turn can span several requests. A request continues a turn when it resumes after [`pause_turn`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn) or when its last message contains only `tool_result` blocks. Fetches from earlier requests in that turn count against the limit, unless Claude ran them from code execution through [dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool#dynamic-filtering).
484 
490485### Domain filtering
491486 
492487For domain filtering with `allowed_domains` and `blocked_domains`, see [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#domain-filtering).
from line 522
527522 Requires `web_fetch_20260318` or later.
528523</Note>
529524 
530The `response_inclusion` parameter controls how fetch result blocks appear in the API response when the result was consumed by a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same turn. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, reducing output token costs for agentic workflows that don’t need to echo raw page content back to the client. The default is `"full"`. 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.
525The `response_inclusion` parameter controls how fetch result blocks appear in the API response when a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same response consumed the result. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, for agentic workflows that don’t need the raw page content. Token usage is unaffected, because Claude reads the code’s output rather than these blocks. The default is `"full"`. The API always returns results from direct calls, or from code execution calls that paused before completing, in full so that you can send them back in the next request.
531526 
532527```json
533528{
from line 927
932927 messages: [
933928 ['role' => 'user', 'content' => 'Find recent articles about quantum computing and analyze the most relevant one in detail']
934929 ],
935 model: 'claude-opus-5-5',
930 model: Model::CLAUDE_OPUS_5_5,
936931 tools: [
937932 [
938933 'type' => 'web_search_20250305',
from line 949
954949 client = Anthropic::Client.new
955950 
956951 message = client.messages.create(
957 model: "claude-opus-5-5",
952 model: Anthropic::Model::CLAUDE_OPUS_5_5,
958953 max_tokens: 4096,
959954 messages: [
960955 { role: "user", content: "Find recent articles about quantum computing and analyze the most relevant one in detail" }
from line 1014
10191014 
10201015## Batch requests
10211016 
1022You can include the web fetch tool in the [Messages Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web fetch tool calls through the Messages Batches API are priced the same as those in regular Messages API requests.
1017You can include the web fetch tool in the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web fetch tool calls through the Message Batches API are priced the same as those in regular Messages API requests.
10231018 
10241019## Usage and pricing
10251020 

agents-and-tools/tool-use/web-search-tool Changed · +23 / -21 lines

from line 88
8888* Analysis of content already provided in the conversation
8989* Conversational turns and greetings
9090 
91Triggering is steerable through your system prompt: you can encourage Claude to search more readily or to prefer answering directly. For a hard constraint, use `max_uses` to cap the number of searches for each request.
91Triggering is steerable through your system prompt: you can encourage Claude to search more readily or to prefer answering directly. To enforce a limit, use [`max_uses`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#max-uses) to cap the number of searches in a turn.
9292 
9393### Dynamic filtering
9494 
from line 237
237237 messages: [
238238 ['role' => 'user', 'content' => 'Search for the current prices of AAPL and GOOGL, then calculate which has a better P/E ratio.'],
239239 ],
240 model: 'claude-opus-5-5',
240 model: Model::CLAUDE_OPUS_5_5,
241241 tools: [
242242 [
243243 'type' => 'web_search_20260318',
from line 285
285285 -H "content-type: application/json" \
286286 -d '{
287287 "model": "claude-opus-5-5",
288 "max_tokens": 1024,
288 "max_tokens": 4096,
289289 "messages": [
290290 {
291291 "role": "user",
from line 303
303303 ```bash CLI
304304 ant messages create \
305305 --model claude-opus-5-5 \
306 --max-tokens 1024 \
306 --max-tokens 4096 \
307307 --message '{role: user, content: What is the weather in NYC?}' \
308308 --tool '{type: web_search_20250305, name: web_search, max_uses: 5}'
309309 ```
from line 313
313313 
314314 response = client.messages.create(
315315 model="claude-opus-5-5",
316 max_tokens=1024,
316 max_tokens=4096,
317317 messages=[{"role": "user", "content": "What's the weather in NYC?"}],
318318 tools=[{"type": "web_search_20250305", "name": "web_search", "max_uses": 5}],
319319 )
from line 325
325325 
326326 const response = await client.messages.create({
327327 model: "claude-opus-5-5",
328 max_tokens: 1024,
328 max_tokens: 4096,
329329 messages: [
330330 {
331331 role: "user",
from line 350
350350 var parameters = new MessageCreateParams
351351 {
352352 Model = Model.ClaudeOpus5_5,
353 MaxTokens = 1024,
353 MaxTokens = 4096,
354354 Messages = [new UserMessageParam { Content = "What's the weather in NYC?" }],
355355 Tools = [new ToolUnion(new WebSearchTool20250305() { MaxUses = 5 })]
356356 };
from line 364
364364 
365365 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
366366 Model: anthropic.ModelClaudeOpus5_5,
367 MaxTokens: 1024,
367 MaxTokens: 4096,
368368 Messages: []anthropic.MessageParam{
369369 anthropic.NewUserMessage(anthropic.NewTextBlock("What's the weather in NYC?")),
370370 },
from line 388
388388 
389389 MessageCreateParams params = MessageCreateParams.builder()
390390 .model(Model.CLAUDE_OPUS_5_5)
391 .maxTokens(1024L)
391 .maxTokens(4096L)
392392 .addUserMessage("What's the weather in NYC?")
393393 .addTool(WebSearchTool20250305.builder()
394394 .maxUses(5L)
from line 404
404404 $client = new Client();
405405 
406406 $message = $client->messages->create(
407 maxTokens: 1024,
407 maxTokens: 4096,
408408 messages: [
409409 ['role' => 'user', 'content' => "What's the weather in NYC?"],
410410 ],
411 model: 'claude-opus-5-5',
411 model: Model::CLAUDE_OPUS_5_5,
412412 tools: [
413413 [
414414 'type' => 'web_search_20250305',
from line 426
426426 
427427 message = client.messages.create(
428428 model: Anthropic::Model::CLAUDE_OPUS_5_5,
429 max_tokens: 1024,
429 max_tokens: 4096,
430430 messages: [
431431 { role: "user", content: "What's the weather in NYC?" }
432432 ],
from line 449
449449 "type": "web_search_20250305",
450450 "name": "web_search",
451451 
452 // Optional: Limit the number of searches for each request
452 // Optional: Limit the number of searches
453453 "max_uses": 5,
454454 
455455 // Optional: Only include results from these domains.
from line 474
474474 
475475### Max uses
476476 
477The `max_uses` parameter limits the number of searches performed. If Claude attempts more searches than allowed, the `web_search_tool_result` is an error with the `max_uses_exceeded` error code.
477The `max_uses` parameter limits the number of searches in a single turn. Single-fact queries typically use 1–3 searches; comparative or multientity research can use 10 or more.
478478 
479Simple factual queries typically use 1–3 searches; comparative or multientity research can use 10 or more. For guidance on choosing a value, see [Server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools).
479Failed searches count against the limit. If Claude calls web search directly more times than allowed, the `web_search_tool_result` is an error with the `max_uses_exceeded` error code. If Claude calls web search from code execution more times than allowed, the code execution run ends with an error.
480480 
481A turn can span several requests. A request continues a turn when it resumes after [`pause_turn`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools#the-server-side-loop-and-pause-turn) or when its last message contains only `tool_result` blocks. Searches from earlier requests in that turn count against the limit, unless Claude ran them from code execution through [dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering).
482 
481483### Domain filtering
482484 
483485Provide `allowed_domains` or `blocked_domains`, not both. If a request includes both, the API returns a 400 error. Entries are bare domains with an optional path, for example `example.com` or `example.com/blog`, without a scheme.
from line 506
504506 Requires `web_search_20260318` or later.
505507</Note>
506508 
507The `response_inclusion` parameter controls how search result blocks appear in the API response when the result was consumed by a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same turn. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, reducing output token costs for agentic workflows that don’t need to echo raw search content back to the client. The default is `"full"`. 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.
509The `response_inclusion` parameter controls how search result blocks appear in the API response when a completed [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) call in the same response consumed the result. Set `"response_inclusion": "excluded"` to drop those nested `server_tool_use` and result block pairs entirely from the response, for agentic workflows that don’t need the raw search content. Token usage is unaffected, because Claude reads the code’s output rather than these blocks. The default is `"full"`. The API always returns results from direct calls, or from code execution calls that paused before completing, in full so that you can send them back in the next request.
508510 
509511```json JSON
510512{
from line 598
596598* `page_age`: When the site was last updated
597599* `encrypted_content`: Encrypted content that you must pass back in multi-turn conversations
598600 
599To continue a conversation that contains search results, send the assistant’s content blocks back exactly as you received them, including each result’s `encrypted_content`. The API decrypts that content on later turns to restore the search results in Claude’s context. If `encrypted_content` is missing or modified, the request fails with a 400 validation error.
601To continue a conversation that contains search results, send the assistant’s content blocks back exactly as you received them, including each result’s `encrypted_content`. The API decrypts that content in later requests to restore the search results in Claude’s context. If `encrypted_content` is missing or modified, the request fails with a 400 validation error.
600602 
601603### Citations
602604 
from line 655
653655 
654656## Streaming
655657 
656With streaming enabled, you’ll receive search events as part of the stream. There is a pause while the search runs:
658With streaming enabled, you receive search events as part of the stream. There is a pause while the search runs:
657659 
658660```sse Output
659661event: message_start
from line 684
682684 
683685## Batch requests
684686 
685You can include the web search tool in the [Messages Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web search tool calls through the Messages Batches API are priced the same as those in regular Messages API requests.
687You can include the web search tool in the [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing). Web search tool calls through the Message Batches API are priced the same as those in regular Messages API requests.
686688 
687689To protect shared capacity, the Batches API throttles web search requests for each organization, so large batches with many searches might take longer to complete. You can see your organization’s web search rate limit on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console. To request a higher limit, contact sales from that page.
688690 
from line 708
706708 
707709Web search is available on the Claude API for **$10 USD per 1,000 searches**, plus standard token costs for search-generated content. Web search results retrieved throughout a conversation are counted as input tokens, in search iterations run during a single turn and in subsequent conversation turns.
708710 
709Each web search counts as one use, regardless of the number of results returned. If an error occurs during web search, the web search will not be billed.
711Each web search counts as one use, regardless of the number of results returned. A web search that fails with an error is not billed.
710712 
711713## Next steps
712714 

api/beta Changed · +31 / -33 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 4675
46754675 
46764676 - `max_tokens: optional number or null`
46774677 
4678 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
4678 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.
46794679 
46804680 minimum: 1024
46814681 
from line 7615
76157615 - `BetaComputerToolset20260801 object`
76167616 
76177617 The computer toolset: a single `tools[]` entry (carrying no
7618 `name`) that
7618 `name`) that declares

api/beta/messages Changed · +34 / -43 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 3242
32423242 
32433243 - `max_tokens: optional number or null`
32443244 
3245 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3245 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.
32463246 
32473247 minimum: 1024
32483248 
from line 7020
70207020 
70217021 - `response_inclusion: optional "full" or "excluded"`
70227022 
7023 How this tool's result blocks appear in the
7023 How this tool's result blocks appear in the API resp

api/beta/messages/batches Changed · +9 / -13 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 3262
32623262 
32633263 - `max_tokens: optional number or null`
32643264 
3265 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3265 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.
32663266 
32673267 minimum: 1024
32683268 
from line 7232
72327232 
72337233 `new_tab`'s config overrides.
72347234 
7235 - `defer_loading: optiona
7235 - `defer_loading: optional boolean

api/beta/messages/batches/results Changed · +2 / -3 lines

from line 3026
30263026 
30273027 - `max_tokens: optional number or null`
30283028 
3029 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3029 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.
30303030 
30313031 minimum: 1024
30323032 
from line 3899
38993899 the thinking-block delimiter tokens.
39003900 
39013901 Reflects the raw reasoning the model produced, not the (possibly shorter)
3902 summarized thinking text returned in the response body. Computed by
3903 re-tokenizing the raw reasoning text, so it may differ from the model's exact
3902 summarized thinking text returned in the response body. It may differ from the model's exact
39043903 generation count by a small number of tokens. Always ≤ `output_tokens`;
39053904 `output_tokens - thinking_tokens` approximates the non-reasoning output.
39063905 

api/beta/messages/create Changed · +3 / -4 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 3240
32403240 
32413241 - `max_tokens: optional number or null`
32423242 
3243 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the server also emits a remaining-tokens budget block in the advisor's prompt so the advisor self-shapes toward the cap. When omitted, the advisor model's default output cap applies and no budget block is emitted.
3243 Bounds the advisor's total output (thinking + text) per call. When the advisor hits this cap, the returned advisor_result or advisor_redacted_result block carries stop_reason='max_tokens', and a truncation note is appended to the advice text the worker model sees (inside the encrypted blob in redacted mode). When set, the API also passes the advisor its remaining-token budget, so the advisor shapes its output toward the cap. When omitted, the advisor model's default output cap applies and the API doesn't pass a budget.
32443244 
32453245 minimum: 1024
32463246 
from line 7018
70187018 
70197019 - `response_inclusion: optional "full" or "excluded"`
70207020 
7021 How this tool's result blocks appear in the
7021 How this tool's result blocks appear in the API respo

api/beta/organization Changed · +24 / -24 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 824
824824 
825825 - `geo: string`
826826 
827 Data residency geo. Selects the region that handles this key's encrypt/decrypt roundtrips.
827 Data residency geo. Selects the region this key is used in.
828828 
829829 - `provider_config: BetaAWSExternalKeyConfig or BetaGCPExternalKeyConfig or BetaAzureExternalKeyConfig`
830830 
from line 992
992992 
993993 - `geo: string`
994994 
995 Data residency geo. Selects the region that handles this key's encrypt/decrypt roundtrips.
995 Data residency geo. Selects the region this key is used in.
996996 
997997 - `provider_config: BetaAWSExternalKeyConfig or BetaGCPExternalKeyConfig or BetaAzureExternalKeyConfig`
998998 
from line 1160
11601160 
11611161 - `geo: string`
11621162 
1163 Data residency geo. Selects the region that handles this key's encrypt/decrypt roundtrips.
1163 Data residency geo. Selects the region this key is used in.
11641164 
11651165 - `provider_config: BetaAWSExternalKeyConfig or BetaGCPExternalKeyConfig or BetaAzureExternalKeyConfig`
11661166 
from line 1389
13891389 
13901390 - `geo: string`
13911391 
1392 Data residency geo. Selects the region that handles this key's encrypt/decrypt roundtrips.
1392 Data residency geo. Selects the region this key is used in.
13931393 
13941394 - `provider_config: BetaAWSExternalKeyConfig or BetaGCPExternalKeyConfig or BetaAzureExternalKeyConfig`
13951395 
from line 10365
1036510365 
1036610366 The version of the Claude API you want to use.
1036710367 
10368 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_language

api/beta/organization/analytics Changed · +37 / -37 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 669
669669 
670670 - `chat_cowork_unified_metrics: optional BetaAnalyticsConnectorChatCoworkUnifiedMetrics or null`
671671 
672 Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
672 Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
673673 
674674 - `chat: BetaAnalyticsConnectorChatCoworkUnifiedChatMetrics`
675675 
from line 940
940940 
941941 - `product: string or null`
942942 
943 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
943 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
944944 
945945 - `rbac_group_id: string or null`
946946 
from line 1054
10541054 
10551055 - `product: string or null`
10561056 
1057 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
1057 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
10581058 
10591059 - `rbac_group_id: string or null`
10601060 
from line 1128
11281128 
11291129 - `name: string or null`
11301130 
1131 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"` for usage by Anthropic's security-patching service) or null.
1131 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"`) or null.
11321132 
11331133 - `user_id: string`
11341134 
from line 1204
12041204 
12051205 - `product: string or null`
12061206 
1207 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
1207 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
12081208 
12091209 - `rbac_group_id: string or null`
12101210 
from line 1648
16481648 
16491649 - `chat_cowork_unified_metrics: optional BetaAnalyticsPluginChatCoworkUnifiedMetrics or null`
16501650 
1651 Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
1651 Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
16521652 
16531653 - `distinct_session_plugin_used_count: number or null`
16541654 
from line 1717
17171717 
17181718- `BetaAnalyticsProductFilter = "chat" or "chat_cowork_unified" or "claude-tag" or 5 more`
17191719 
1720 Publicly documented product surfaces. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified.
1720 Publicly documented product surfaces. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available.
17211721 
17221722 - `"chat"`
17231723 
from line 1955
19551955 
19561956 - `chat_cowork_unified_daily_active_user_count: optional number or null`
19571957 
1958 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response on deployments that do not offer Chat and Cowork unified.
1958 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response where Chat and Cowork unified is not available.
19591959 
19601960 - `chat_cowork_unified_monthly_active_user_count: optional number or null`
19611961 
1962 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response on deployments that do not offer Chat and Cowork unified.
1962 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response where Chat and Cowork unified is not available.
19631963 
19641964 - `chat_cowork_unified_weekly_active_user_count: optional number or null`
19651965 
1966 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response on deployments that do not offer Chat and Cowork unified.
1966 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response where Chat and Cowork unified is not available.
19671967 
19681968 - `chat_daily_active_user_count: optional number or null`
19691969 
from line 2127
21272127 
21282128 - `chat_cowork_unified_metrics: optional BetaAnalyticsSkillChatCoworkUnifiedMetrics or null`
21292129 
2130 Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
2130 Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
21312131 
21322132 - `chat: BetaAnalyticsSkillChatCoworkUnifiedChatMetrics`
21332133 
from line 2432
24322432 
24332433 - `product: string or null`
24342434 
2435 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
2435 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
24362436 
24372437 - `rbac_group_id: string or null`
24382438 
from line 2478
24782478 
24792479- `BetaAnalyticsUsageCostProductFilter = "chat" or "chat_cowork_unified" or "claude_code" or 9 more`
24802480 
2481 Publicly documented product surfaces. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified.
2481 Publicly documented product surfaces. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available.
24822482 
24832483 - `"chat"`
24842484 
from line 2590
25902590 
25912591 - `product: string or null`
25922592 
2593 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
2593 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
25942594 
25952595 - `rbac_group_id: string or null`
25962596 
from line 2652
26522652 
26532653 - `name: string or null`
26542654 
2655 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"` for usage by Anthropic's security-patching service) or null.
2655 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"`) or null.
26562656 
26572657 - `user_id: string`
26582658 
from line 2728
27282728 
27292729 - `product: string or null`
27302730 
2731 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
2731 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude-tag`, and `chat_cowork_unified`. `claude-tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
27322732 
27332733 - `rbac_group_id: string or null`
27342734 
from line 3102
31023102 
31033103 - `chat_cowork_unified_metrics: optional BetaAnalyticsChatCoworkUnifiedMetrics or null`
31043104 
3105 Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into `chat` (chat activity) and `sessions` (Cowork activity). Omitted from the response on deployments that do not offer Chat and Cowork unified.
3105 Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into `chat` (chat activity) and `sessions` (Cowork activity). Omitted from the response where Chat and Cowork unified is not available.
31063106 
31073107 - `chat: BetaAnalyticsChatCoworkUnifiedChatMetrics`
31083108 
from line 3262
32623262 
32633263 - `name: string or null`
32643264 
3265 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"` for usage by Anthropic's security-patching service) or null.
3265 The user's full name. Null when the user has not set a name. Returns `"Deleted User"` when the account itself has been deleted, or when the user is no longer a member of the organization or its associated organizations and the organization has chosen to hide the names of removed users. Otherwise, the name stays populated for removed users. Rows for system-minted service accounts render the service name (for example, `"Claude Security"`) or null.
32663266 
32673267 - `user_id: string`
32683268 
from line 3395
33953395 
33963396 - `chat_cowork_unified_daily_active_user_count: optional number or null`
33973397 
3398 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response on deployments that do not offer Chat and Cowork unified.
3398 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response where Chat and Cowork unified is not available.
33993399 
34003400 - `chat_cowork_unified_monthly_active_user_count: optional number or null`
34013401 
3402 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response on deployments that do not offer Chat and Cowork unified.
3402 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response where Chat and Cowork unified is not available.
34033403 
34043404 - `chat_cowork_unified_weekly_active_user_count: optional number or null`
34053405 
3406 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response on deployments that do not offer Chat and Cowork unified.
3406 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response where Chat and Cowork unified is not available.
34073407 
34083408 - `chat_daily_active_user_count: optional number or null`
34093409 
from line 3909
39093909 
39103910 - `chat_cowork_unified_metrics: optional BetaAnalyticsChatCoworkUnifiedMetrics or null`
39113911 
3912 Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into `chat` (chat activity) and `sessions` (Cowork activity). Omitted from the response on deployments that do not offer Chat and Cowork unified.
3912 Activity recorded while the member had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into `chat` (chat activity) and `sessions` (Cowork activity). Omitted from the response where Chat and Cowork unified is not available.
39133913 
39143914 - `chat: BetaAnalyticsChatCoworkUnifiedChatMetrics`
39153915 
from line 4441
44414441 
44424442- `filter: optional array of string`
44434443 
4444 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `connector_name`, `product`, `rbac_group_id`, `user_id`. Value forms: `connector_name` matches case-insensitively, a display name such as 'GitHub MCP' also matches its normalized stored form ('github'), and for rows whose `connector_name` is an opaque connector id the connector's display name (`connector_display_name`) also matches; `product` is one of `chat_cowork_unified`, `chat`, `claude_code`, `cowork`, or `office_agent`; `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only on deployments that offer Chat and Cowork unified.
4444 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `connector_name`, `product`, `rbac_group_id`, `user_id`. Value forms: `connector_name` matches case-insensitively, a display name such as 'GitHub MCP' also matches its normalized stored form ('github'), and for rows whose `connector_name` is an opaque connector id the connector's display name (`connector_display_name`) also matches; `product` is one of `chat_cowork_unified`, `chat`, `claude_code`, `cowork`, or `office_agent`; `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only where Chat and Cowork unified is available.
44454445 
44464446 maxItems: 100
44474447 
from line 4579
45794579 
45804580 - `chat_cowork_unified_metrics: optional BetaAnalyticsConnectorChatCoworkUnifiedMetrics or null`
45814581 
4582 Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
4582 Connector use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
45834583 
45844584 - `chat: BetaAnalyticsConnectorChatCoworkUnifiedChatMetrics`
45854585 
from line 4718
47184718 
47194719- `filter: optional array of string`
47204720 
4721 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `plugin_name`, `product`, `rbac_group_id`, `user_id`. Value forms: `plugin_name` matches case-insensitively; `product` is `chat_cowork_unified`, `claude_code`, or `cowork` (the only surfaces with plugin attribution); `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only on deployments that offer Chat and Cowork unified.
4721 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `plugin_name`, `product`, `rbac_group_id`, `user_id`. Value forms: `plugin_name` matches case-insensitively; `product` is `chat_cowork_unified`, `claude_code`, or `cowork` (the only surfaces with plugin attribution); `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only where Chat and Cowork unified is available.
47224722 
47234723 maxItems: 100
47244724 
from line 4812
48124812 
48134813 - `chat_cowork_unified_metrics: optional BetaAnalyticsPluginChatCoworkUnifiedMetrics or null`
48144814 
4815 Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
4815 Plugin use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
48164816 
48174817 - `distinct_session_plugin_used_count: number or null`
48184818 
from line 4907
49074907 
49084908- `filter: optional array of string`
49094909 
4910 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `product`, `rbac_group_id`, `share_status`, `skill_name`, `user_id`. Value forms: `product` is one of `chat_cowork_unified`, `chat`, `claude_code`, `cowork`, or `office_agent`; `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `share_status` is one of `organization`, `private`, or `public`; `skill_name` matches case-insensitively; `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only on deployments that offer Chat and Cowork unified.
4910 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `product`, `rbac_group_id`, `share_status`, `skill_name`, `user_id`. Value forms: `product` is one of `chat_cowork_unified`, `chat`, `claude_code`, `cowork`, or `office_agent`; `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `share_status` is one of `organization`, `private`, or `public`; `skill_name` matches case-insensitively; `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only where Chat and Cowork unified is available.
49114911 
49124912 maxItems: 100
49134913 
from line 5055
50555055 
50565056 - `chat_cowork_unified_metrics: optional BetaAnalyticsSkillChatCoworkUnifiedMetrics or null`
50575057 
5058 Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response on deployments that do not offer Chat and Cowork unified.
5058 Skill use recorded while members had Chat and Cowork unified (Cowork's features inside claude.ai chat) turned on, split into chat conversations and Cowork sessions. A count is null in date-range mode where it cannot be computed. Omitted from the response where Chat and Cowork unified is not available.
50595059 
50605060 - `chat: BetaAnalyticsSkillChatCoworkUnifiedChatMetrics`
50615061 
from line 5183
51835183 
51845184- `filter: optional array of string`
51855185 
5186 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `artifact_type`, `is_shared`, `product`, `rbac_group_id`, `user_id`. Value forms: `artifact_type` is a canonical artifact MIME type (e.g. `text/markdown`) or `other`; `is_shared` is `true` or `false`; `product` is `chat_cowork_unified`, `chat`, `claude_code`, or `cowork` (the surfaces that create artifacts); `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only on deployments that offer Chat and Cowork unified.
5186 Filters as `dimension:value`, e.g. `filter[]=rbac_group_id:{id}`. Repeat the param for OR within a dimension and across dimensions for AND. Supported dimensions on this endpoint: `artifact_type`, `is_shared`, `product`, `rbac_group_id`, `user_id`. Value forms: `artifact_type` is a canonical artifact MIME type (e.g. `text/markdown`) or `other`; `is_shared` is `true` or `false`; `product` is `chat_cowork_unified`, `chat`, `claude_code`, or `cowork` (the surfaces that create artifacts); `rbac_group_id` takes the tagged id (`rbac_group_...`, as emitted in responses and by the spend-limits API) or a bare group UUID, and matches users who held the group at any point during each covered UTC day (time-of-usage attribution); `user_id` takes a tagged user id (`user_...`), as emitted in responses. An unsupported dimension returns 400. At most 100 entries. `chat_cowork_unified` is accepted as a `product` value only where Chat and Cowork unified is available.
51875187 
51885188 maxItems: 100
51895189 
from line 5282
52825282 "published_artifacts_created_count": 0,
52835283 "product": "product",
52845284 "rbac_group_id": "rbac_group_id",
5285 "rbac_group_name": "rbac_group_nam
5285 "rbac_group_name": "rbac_group_name",
5286 "user_id": "user_id"
5287 }
5288 ],
5289 "next_page": "next_page"
5290}
5291```
5292 
5293## Analytics › Usage
5294 
5295### Get Token Usage By Dimension
5296 
5297**GET** `/v1/organizations/analytics/usage`
5298 
5299Get token usage across a date range, broken out by dimension.
5300 
5301Returns one row per combination of the requested `group_by[]`
5302dimensions (and time bucket, when `time_bucket_width` is set) that has
5303us

api/beta/organization/analytics/cost Changed · +3 / -3 lines

from line 639
639639 
640640 - `product: string or null`
641641 
642 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
642 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
643643 
644644 - `rbac_group_id: string or null`
645645 
from line 958
958958 
959959 - `product: string or null`
960960 
961 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
961 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
962962 
963963 - `rbac_group_id: string or null`
964964 
from line 1270
12701270 
12711271 - `product: string or null`
12721272 
1273 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only on deployments that offer Chat and Cowork unified. Some unattributed usage is reported as "other".
1273 Product surface that produced the usage or cost. Null unless product is in `group_by[]`; it can also be null on grouped rows whose usage cannot be attributed to a known surface. Values include `chat`, `claude_code`, `cowork`, `office_agent`, `claude_in_chrome`, `claude_design`, `claude_tag`, and `chat_cowork_unified`. `claude_tag` is Claude Tag, the Claude product in Slack. `chat_cowork_unified` is Chat and Cowork unified, Cowork's features inside claude.ai chat: chat and Cowork usage by a member who has it turned on is reported under this value instead of `chat` or `cowork`. It is accepted as a filter only where Chat and Cowork unified is available. Some unattributed usage is reported as "other".
12741274 
12751275 - `rbac_group_id: string or null`
12761276 

api/beta/organization/analytics/summaries Changed · +3 / -3 lines

from line 124
124124 
125125 - `chat_cowork_unified_daily_active_user_count: optional number or null`
126126 
127 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response on deployments that do not offer Chat and Cowork unified.
127 Number of users with activity in Chat and Cowork unified on the requested day. Omitted from the response where Chat and Cowork unified is not available.
128128 
129129 - `chat_cowork_unified_monthly_active_user_count: optional number or null`
130130 
131 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response on deployments that do not offer Chat and Cowork unified.
131 Number of users with activity in Chat and Cowork unified in the 28-day rolling window (30 days when the request filters by `rbac_group_id`). Omitted from the response where Chat and Cowork unified is not available.
132132 
133133 - `chat_cowork_unified_weekly_active_user_count: optional number or null`
134134 
135 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response on deployments that do not offer Chat and Cowork unified.
135 Number of users with activity in Chat and Cowork unified in the 7-day rolling window. Omitted from the response where Chat and Cowork unified is not available.
136136 
137137 - `chat_daily_active_user_count: optional number or null`
138138 
Feedback