Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20260820T170710Z

229 pages moved out of 583 read.

Pages moved 229 significant first
Pages read 583 in this capture
Captured 17:07 UTC
Corpus hash 9cf0330dc487 corpus-hash

What this read moved

1-25 of 229, page 1 of 10

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

about-claude/models/migration-guide Changed · +4 / -4 lines

from line 1315
13151315 
13161316 To increase tool usage, raise the effort setting. `high` or `xhigh` effort settings show substantially more tool usage in agentic search and coding. You can also adjust your prompt to explicitly instruct the model about when and how to properly use its tools.
13171317 
13188. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) to request reduced restrictions. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background.
13188. **Real-time cybersecurity safeguards:** Newly added in Claude Opus 4.7, requests that involve prohibited or high-risk topics may lead to refusals. For legitimate security work such as penetration testing, vulnerability research, or red-teaming, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) to request reduced restrictions. The application route depends on how you access Claude.
13191319 
132013209. **High-resolution image support:** Claude Opus 4.7 is the first Claude model with high-resolution image support. Maximum image resolution is 2,576 pixels on the long edge, up from 1,568 pixels on prior models. This unlocks gains on vision-heavy workloads and is particularly valuable for computer use, screenshot understanding, and document analysis.
13211321 
from line 1447
14471447* If you use [web fetch](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool), plan an alternative: it is not available on Claude Opus 5.
14481448* If your organization has a [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models) commitment, note that Priority Tier is not supported on Claude Opus 5.
14491449* Remove verification and self-check instructions carried over from prompts tuned for earlier models; they cause over-verification on Claude Opus 5.
1450* If your product does legitimate security work, apply to the [Cyber Verification Program](https://claude.com/form/cyber-use-case) for access to lower restrictions on cyber content.
1450* If your product does legitimate security work, apply to the [Cyber Verification Program](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for access to lower restrictions on cyber content.
14511451 
14521452#### Migrating from Claude Opus 4.5 or earlier
14531453 
from line 2569
25692569 
257025705. **Sampling parameters removed:** Sampling parameters (`temperature`, `top_p`, `top_k`) set to a non-default value are not accepted and return a 400 error.
25712571 
25726. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background.
25726. **Cybersecurity safeguards:** Claude Sonnet 5 is the first Sonnet-tier model with real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused. Refusals return as a successful HTTP 200 response with `stop_reason: "refusal"`, not an error. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program.
25732573 
25742574#### Migration checklist
25752575 
from line 2673
26732673 
267426745. **Pricing:** Claude Haiku 4.5 is priced at $1/$5 per million input/output tokens. Claude Sonnet 5 is priced at $2/$10 per million input/output tokens. See [Claude pricing](https://platform.claude.com/docs/en/about-claude/pricing).
26752675 
26766. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Safeguards, warnings, and appeals](https://support.claude.com/en/articles/8241253-safeguards-warnings-and-appeals) for background.
26766. **Cybersecurity safeguards:** Claude Sonnet 5 has real-time cybersecurity safeguards. Requests that involve prohibited or high-risk cybersecurity topics may be refused, returned as a successful HTTP 200 response with `stop_reason: "refusal"`. See [Real-time cyber safeguards on Claude Opus and Sonnet](https://support.claude.com/en/articles/14604842-real-time-cyber-safeguards-on-claude-opus-and-sonnet) for what the safeguards block and how legitimate security work can apply to the Cyber Verification Program.
26772677 
26782678#### Migration checklist
26792679 

about-claude/models/optimizing-for-cost-and-intelligence Changed · +15 / -11 lines

from line 51
5151 
5252```text wrap
5353$ claude
54> add prompt caching to this integration
54> /claude-api add prompt caching to this integration
5555 
5656Done. Prompt caching is now wired into the harness. Two changes:
5757 
from line 201
201201Three controls do three different jobs. A task budget saves money, because the model sees it. `max_tokens` is a safety cap that saves nothing. On Claude Managed Agents, a session budget is the hard dollar stop behind both. Set all three: a task budget, a high `max_tokens`, and a session cap for the run you never want on a bill, with a [workspace spend limit](https://platform.claude.com/docs/en/api/rate-limits#setting-lower-limits-for-workspaces) as the final backstop.
202202 
203203* **Task budgets** are in beta (beta header `task-budgets-2026-03-13`) on Claude Opus 5, Claude Fable 5, Claude Opus 4.8, and Claude Opus 4.7, but not Claude Sonnet 5; check the [support table](https://platform.claude.com/docs/en/build-with-claude/task-budgets#feature-support) first. Start near your loop's 90th-percentile token usage, then tighten ([Choosing a budget](https://platform.claude.com/docs/en/build-with-claude/task-budgets#choosing-a-budget) shows how to collect that distribution). Budgets below the current 20,000-token floor are rejected, and very tight budgets can produce refusal-like behavior. Set the budget once, on the first request, because a mid-task change [invalidates the cache](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#cache-repeated-context). The budget is advisory, steering the model rather than stopping it, so verify adherence on your workload.
204* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 33.3% (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see.
204* **`max_tokens`** caps a single response, invisibly to the model, so lowering it does not make the model economize. The turns that needed the room are discarded and still billed. On an internal repository-task benchmark[12](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), a 16,384-token cap ended 15% of Claude Opus 5's attempts and a third of Claude Fable 5's, none of them solved. Capped runs spent less per attempt but bought proportionally fewer solves, so cost per solved task was the same as at 64,000. At that setting nothing was cut off, and Fable solved 54.6% of tasks instead of 36.6% on the problems both runs scored (on a separate cut of the SWE-bench Pro[3](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) subset, described in reference 12, 92% instead of 90%). Retrying capped attempts only adds cost: at the same cap they never succeeded, and at a higher one you also pay for the wasted attempt. Set `max_tokens` to 64,000 for agentic work (128,000, the maximum, at `xhigh` or `max` effort), [stream responses](https://platform.claude.com/docs/en/build-with-claude/streaming) that large, treat [`stop_reason: max_tokens`](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#max-tokens) as a failure, and save money with effort and task budgets, which the model can see.
205205* **Session budgets on Claude Managed Agents** are the hard stop. A [session budget](https://platform.claude.com/docs/en/managed-agents/budgets) is a dollar cap on one session at list rates for tokens, searches, and session time. At the cap, the session pauses with `stop_reason: budget_reached`; raising the budget resumes it. It is platform-enforced, works on any model with a list price (including Claude Sonnet 5), and combines with the advisory task budget. Deployments apply the same field to every run.
206206 
207207The first of two `max_tokens` charts plots cost per attempt and per solved task at each cap:
from line 269
269269 
270270![Diagram of the orchestrator strategy: a Claude Fable 5 orchestrator fans subtasks out to three Claude Sonnet 5 workers](https://platform.claude.com/docs/images/model-routing-orchestrator-strategy.png)
271271 
272This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs) later in this section, an episode took 1.9 hours with the coordinator compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time.
272This pattern saves wall-clock time when workers can run in parallel: on the corpus benchmark[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs), an episode took a little over 2 hours with the coordinator running the platform's documented limit of 25 concurrent workers, compared with 11.4 hours solo. It saved money in only two measured situations. On work a single model could handle alone, the same model at lower effort was cheaper every time.
273273 
274274**Case 1: insurance against the cost tail on routine work.** A frontier model running alone occasionally spirals on a routine problem it would normally solve. Because you cannot tell in advance which those will be, a few such runs dominate the bill. A coordinator that hands routine work to a lower-cost worker caps that tail, because any spiraling now happens at worker rates.
275275 
from line 281
281281 
282282**Case 2: work larger than one context window.** A solo model must work through an input that large serially, one context window at a time, paying to re-read its own state on every pass. Workers each read their own partition, in parallel and at worker rates. Reading-heavy work that still fits in one context window is a model-choice problem, not a delegation problem: on reading cost alone, the orchestrator comes out ahead only when no single context can hold the work.
283283 
284Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost 55% less than any of those settings and scored 3 to 7 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright:
284Anthropic built a benchmark for this case[8](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#refs): a 21.6-million-token corpus of 14 public Python packages with 130 planted defects, too large for any context window. Lowering effort cannot help, because the bill is the corpus read itself: Claude Fable 5 solo cost $720 to $764 per episode at every effort setting, and only its accuracy moved. The coordinator configuration cost more than 60% less than any of those settings and scored 2 to 6 points below Fable at `medium` or the default, while beating a Claude Sonnet 5 solo baseline outright:
285285 
286![Chart, corpus benchmark: the coordinator costs 55% less than Fable solo at every effort setting, 3 to 7 points below its best](https://platform.claude.com/docs/images/cost-intel-corpus-pareto.png)
286![Chart, corpus benchmark: the coordinator costs over 60% less than Fable solo at every effort setting, 2 to 6 points below its best](https://platform.claude.com/docs/images/cost-intel-corpus-pareto.png)
287287 
288The token accounting shows why. The coordinator configuration read more than the solo model (32 million input tokens compared with 14.5 million) and still cost less, because partitioned reading at worker rates is cheaper than repeated re-reading at frontier rates. Fable 5 at default effort still holds peak accuracy, at 2.3 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it.
288The token accounting shows why. Both bills are mostly corpus reading served from the cache: the coordinator configuration read about 570 million cached tokens per episode, nearly three times the solo model's roughly 200 million, and still cost less than half as much, because its reads were billed at Claude Sonnet 5's cache-read rate rather than Claude Fable 5's. Fable 5 at default effort still holds peak accuracy, at 2.8 times the coordinator configuration's cost, so delegation here buys most of the accuracy, not all of it.
289289 
290290**When delegation doesn't pay.** An orchestrator buys something only when there is bulk to hand off: many independent pieces, ideally too many for one context window. When the work is one dependent chain, or fits in a single context, the orchestrator pays for a plan, a handoff, and a merge that a single model gets for free. In every such case measured, the coordinator's model alone at lower effort came out ahead.
291291 
from line 538
538538| Lower effort | Knowledge work: `medium` 15% to 30%, `low` a third to a half; long coding: `medium` about half, `low` about three quarters | 1 to 3 points on knowledge work, 2 to 8 on long coding | Faster | [Tune effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#tune-effort) |
539539| Re-run failures | About half, at the same pass rate | None | Two runs on the tasks that fail | [Re-run failures at higher effort](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#re-run-failures-at-higher-effort) |
540540| Task budget | 18% to 47% | 3 to 4 points | Faster | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) |
541| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 21 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) |
541| Raising `max_tokens` | None per solved task, but more tasks solved | Gains of 2 to 18 points | Neutral | [Set budgets and output caps](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#set-budgets-and-output-caps) |
542542| Advisor | Depends on the capability gap and the consult rate; the chart-reading pairing scored above both models' effort curves, the coding pairing only marginally | Small gains | About two extra calls per task | [Advisor strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#advisor-strategy-escalate-hard-decisions) |
543| Orchestrator | 55% below the frontier model beyond one context window; about half on routine tails | 3 to 7 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) |
543| Orchestrator | More than 60% below the frontier model beyond one context window; about half on routine tails | 2 to 6 points below the frontier model | Much faster on large inputs | [Orchestrator strategy](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#orchestrator-strategy-delegate-bulk-work) |
544544 
545545## Benchmarks referenced
546546 
from line 553
5535535. **Agent-architecture scaling:** Kim et al., "Towards a Science of Scaling Agent Systems," arXiv.08296, 2025. Independent external study, cited only for the direction of the finding on when delegation does not pay, not for any figure.
5545546. **DeepWideSearch:** "DeepWideSearch: Benchmarking Depth and Width in Agentic Information Seeking," arXiv.20168, 2025. The 220 questions span 15 domains, each combining many-row collection with multi-hop retrieval; measured on the benchmark's standing row set, 3 runs per configuration.
5555557. **DeepResearch Bench II:** Li et al., "DeepResearch Bench II: Diagnosing Deep Research Agents via Rubrics from Expert Report," arXiv.08536, 2026. Its 132 research tasks across 22 domains are graded against expert-derived binary rubrics; measured on a 50-task subset stratified across all themes, one attempt per task, 3 runs, scored on tasks no configuration refused. Claude Opus 4.6 judges under the benchmark's rubric protocol; the original uses a different judge, and an Anthropic judge may favor the house style. The runs predate Claude Opus 5, hence its absence from the [Compare models](https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligence#compare-models-on-cost-per-task) chart. The Sonnet 5 cost differs slightly between the caching chart (inference cost, with and without caching) and that chart (all-in cost, caching on); both come from the same runs.
5568. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. The charted team configuration ran its workers on Claude Managed Agents: each of six waves was one session in which the Claude Fable 5 lead ran 40 Claude Sonnet 5 worker threads, the platform's limit at the time (the current default is lower), with a small external driver sequencing the waves and carrying the findings between them. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like.
5568. **Corpus defect sweep:** Anthropic-internal, for work larger than one context window: a 21.6-million-token corpus from 14 public Python package sources with 130 planted defects and deterministic grading; protocol fixed before the runs and internally reviewed; three runs per configuration. Every configuration ran on Claude Managed Agents. The charted team configuration is an August 2026 run in which the Claude Fable 5 coordinator ran the whole sweep inside the platform at its documented limit of 25 concurrent Claude Sonnet 5 workers; its three episodes scored F1 0.842, 0.805, and 0.810 for $263, $299, and $261. The solo configurations are July 2026 runs on the same corpus build. Absolute F1 is specific to this corpus build, not comparable across benchmarks; configuration comparisons are like for like.
5575579. **GPQA Diamond:** Rein et al., "GPQA: A Graduate-Level Google-Proof Q\&A Benchmark," 2023. The 198-question Diamond subset, measured August 2026, two runs per configuration, model-graded against reference answers, advisor tokens metered per request. A platform safety check refused two biology questions on the Sonnet and Opus executors; excluding them changes no comparison by more than one point.
55855810. **DeepSWE:** Datacurve, "DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Tasks," arXiv.07946, 2026. Measured August 2026: 113 original tasks across five languages with program-based verifiers. Pairings are two runs each with advisor tokens metered per request, and used a client-side advisor loop rather than the advisor tool, with identical accounting. Single-model effort sweeps are single runs priced from token counts, a cache-aware approximation. Costs per task are run totals divided by 113.
55955911. **Internal agentic-coding benchmark:** Anthropic-internal: 370 repository tasks graded by the repositories' own tests. The API figures (Opus 5 alone, Fable 5 alone, and the pairing) were measured August 2026 at the default effort with a 128,000-token output cap, one run per configuration: five attempts per task at the default settings and for the pairing, one at `low` and `medium`; the pairing averaged about two advisor consultations per attempt; costs are per attempt. The Claude Code figures are July 2026 runs of the same tasks, one run per configuration, costs approximate.
from line 586
586586 
587587 <Card title="Pricing" icon="dollar-sign" href="https://platform.claude.com/docs/en/about-claude/pricing">
588588 See current per-token pricing for every Claude model.
589 </Card>
590 
591 <Card title="Cookbook: cost optimization on the Claude API" icon="book" href="https://platform.claude.com/cookbook/cost-optimization-cost-optimization">
592 Apply these levers one at a time to a working agent in a runnable notebook, with cost per task after each step.
589593 </Card>
590594 
591595 <Card title="Webinar: Building on the Claude Platform" icon="play" href="https://www.anthropic.com/webinars/building-on-the-claude-platform-claude-fable-5-and-model-orchestration-patterns">

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

from line 34
3434 # List Anthropic-managed Skills
3535 curl --fail-with-body -sS "https://api.anthropic.com/v1/skills?source=anthropic" \
3636 -H "x-api-key: $ANTHROPIC_API_KEY" \
37 -H "anthropic-version: 2023-06-01" \
38 -H "anthropic-beta: skills-2025-10-02" |
39 jq -r '.data[] | "\(.id): \(.display_title)"'
37 -H "anthropic-version: 2023-06-01"
4038 ```
4139 
4240 ```bash CLI
4341 # List Anthropic-managed Skills
44 ant beta:skills list --source anthropic
42 ant skills list --source anthropic
4543 ```
4644 
4745 ```python Python
4846 # List Anthropic-managed Skills
49 skills = client.beta.skills.list(source="anthropic")
47 skills = client.skills.list(source="anthropic")
5048 
5149 for skill in skills.data:
52 print(f"{skill.id}: {skill.display_title}")
50 print(f"{skill.id}: {skill.display_name}")
5351 ```
5452 
5553 ```typescript TypeScript
5654 // List Anthropic-managed Skills
57 const skills = await client.beta.skills.list({ source: "anthropic" });
55 const skills = await client.skills.list({ source: "anthropic" });
5856 
5957 for (const skill of skills.data) {
60 console.log(`${skill.id}: ${skill.display_title}`);
58 console.log(`${skill.id}: ${skill.display_name}`);
6159 }
6260 ```
6361 
6462 ```csharp C#
6563 // List Anthropic-managed Skills
66 var skills = await client.Beta.Skills.List(new SkillListParams { Source = "anthropic" });
64 var skills = await client.Skills.List(new SkillListParams { Source = "anthropic" });
6765 
6866 foreach (var skill in skills.Items)
6967 {
70 Console.WriteLine($"{skill.ID}: {skill.DisplayTitle}");
68 Console.WriteLine($"{skill.ID}: {skill.DisplayName}");
7169 }
7270 ```
7371 
7472 ```go Go
7573 // List Anthropic-managed Skills
76 skills, err := client.Beta.Skills.List(ctx, anthropic.BetaSkillListParams{
74 skills, err := client.Skills.List(ctx, anthropic.SkillListParams{
7775 Source: anthropic.String("anthropic"),
7876 })
7977 if err != nil {
from line 79
8179 }
8280 
8381 for _, skill := range skills.Data {
84 fmt.Printf("%s: %s\n", skill.ID, skill.DisplayTitle)
82 fmt.Printf("%s: %s\n", skill.ID, skill.DisplayName)
8583 }
8684 ```
8785 
8886 ```java Java
8987 // List Anthropic-managed Skills
90 SkillListPage skills = client.beta().skills().list(
88 SkillListPage skills = client.skills().list(
9189 SkillListParams.builder().source("anthropic").build()
9290 );
9391 
94 for (SkillListResponse skill : skills.data()) {
95 IO.println(skill.id() + ": " + skill.displayTitle().orElse(""));
92 for (Skill skill : skills.data()) {
93 IO.println(skill.id() + ": " + skill.displayName());
9694 }
9795 ```
9896 
from line 105
107105 
108106 ```ruby Ruby
109107 # List Anthropic-managed Skills
110 skills = client.beta.skills.list(source: "anthropic")
108 skills = client.skills.list(source: "anthropic")
111109 
112110 skills.data.each do |skill|
113 puts "#{skill.id}: #{skill.display_title}"
111 puts "#{skill.id}: #{skill.display_name}"
114112 end
115113 ```
116114</CodeGroup>
from line 129
131129 -H "content-type: application/json" \
132130 -H "x-api-key: $ANTHROPIC_API_KEY" \
133131 -H "anthropic-version: 2023-06-01" \
134 -H "anthropic-beta: skills-2025-10-02" \
135132 -d @- <<'EOF'
136133 {
137134 "model": "claude-opus-5",
from line 143
146143 }
147144 EOF
148145 )
149 jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response"
150146 ```
151147 
152148 ```bash CLI
153149 # Create a message with the PowerPoint Skill
154 response=$(ant beta:messages create --format json \
155 --beta skills-2025-10-02 <<'YAML'
150 response=$(ant messages create --format json <<'YAML'
156151 model: claude-opus-5
157152 max_tokens: 16000
158153 container:
from line 163
168163 name: code_execution
169164 YAML
170165 )
171 
172 jq -r '"stop_reason=\(.stop_reason), blocks=\(.content | length)"' <<<"$response"
173166 ```
174167 
175168 ```python Python
176169 # Create a message with the PowerPoint Skill
177 response = client.beta.messages.create(
170 response = client.messages.create(
178171 model="claude-opus-5",
179172 max_tokens=16000,
180 betas=["skills-2025-10-02"],
181173 container={
182174 "skills": [{"type": "anthropic", "skill_id": "pptx", "version": "latest"}]
183175 },
from line 187
195187 
196188 ```typescript TypeScript
197189 // Create a message with the PowerPoint Skill
198 const response = await client.beta.messages.create({
190 const response = await client.messages.create({
199191 model: "claude-opus-5",
200192 max_tokens: 16000,
201 betas: ["skills-2025-10-02"],
202193 container: {
203194 skills: [{ type: "anthropic", skill_id: "pptx", version: "latest" }],
204195 },
from line 209
218209 
219210 ```csharp C#
220211 // Create a message with the PowerPoint Skill
221 var response = await client.Beta.Messages.Create(new MessageCreateParams
212 var response = await client.Messages.Create(new MessageCreateParams
222213 {
223214 Model = Model.ClaudeOpus5,
224215 MaxTokens = 16000,
225 Betas = ["skills-2025-10-02"],
226 Container = new BetaContainerParams
216 Container = new ContainerParams
227217 {
228218 Skills =
229219 [
230 new BetaSkillParams
220 new SkillParams
231221 {
232 Type = BetaSkillParamsType.Anthropic,
222 Type = SkillParamsType.Anthropic,
233223 SkillID = "pptx",
234224 Version = "latest",
235225 },
from line 227
237227 },
238228 Messages =
239229 [
240 new BetaMessageParam
230 new MessageParam
241231 {
242232 Role = Role.User,
243233 Content = "Create a presentation about renewable energy with 5 slides",
244234 },
245235 ],
246 Tools = [new BetaCodeExecutionTool20260521()],
236 Tools = [new CodeExecutionTool20260521()],
247237 });
248238 
249239 Console.WriteLine($"stop_reason={response.StopReason?.Raw()}, blocks={response.Content.Count}");
from line 241
251241 
252242 ```go Go
253243 // Create a message with the PowerPoint Skill
254 response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{
244 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
255245 Model: anthropic.ModelClaudeOpus5,
256246 MaxTokens: 16000,
257 Betas: []anthropic.AnthropicBeta{
258 anthropic.AnthropicBetaSkills2025_10_02,
259 },
260 Container: anthropic.BetaMessageNewParamsContainerUnion{
261 OfContainers: &anthropic.BetaContainerParams{
262 Skills: []anthropic.BetaSkillParams{
247 Container: anthropic.MessageCreateParamsContainerUnion{
248 OfContainers: &anthropic.ContainerParams{
249 Skills: []anthropic.SkillParams{
263250 {
264 Type: anthropic.BetaSkillParamsTypeAnthropic,
251 Type: anthropic.SkillParamsTypeAnthropic,
265252 SkillID: "pptx",
266253 Version: anthropic.String("latest"),
267254 },
from line 255
268255 },
269256 },
270257 },
271 Messages: []anthropic.BetaMessageParam{
272 anthropic.NewBetaUserMessage(
273 anthropic.NewBetaTextBlock("Create a presentation about renewable energy with 5 slides"),
258 Messages: []anthropic.MessageParam{
259 anthropic.NewUserMessage(
260 anthropic.NewTextBlock("Create a presentation about renewable energy with 5 slides"),
274261 ),
275262 },
276 Tools: []anthropic.BetaToolUnionParam{
277 {OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{}},
263 Tools: []anthropic.ToolUnionParam{
264 {OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{}},
278265 },
279266 })
280267 if err != nil {
from line 273
286273 
287274 ```java Java
288275 // Create a message with the PowerPoint Skill
289 BetaMessage response = client.beta().messages().create(
276 Message response = client.messages().create(
290277 MessageCreateParams.builder()
291278 .model(Model.CLAUDE_OPUS_5)
292279 .maxTokens(16000)
293 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
294280 .container(
295 BetaContainerParams.builder()
281 ContainerParams.builder()
296282 .addSkill(
297 BetaSkillParams.builder()
298 .type(BetaSkillParams.Type.ANTHROPIC)
283 SkillParams.builder()
284 .type(SkillParams.Type.ANTHROPIC)
299285 .skillId("pptx")
300286 .version("latest")
301287 .build()
from line 289
303289 .build()
304290 )
305291 .addUserMessage("Create a presentation about renewable energy with 5 slides")
306 .addTool(BetaCodeExecutionTool20260521.builder().build())
292 .addTool(CodeExecutionTool20260521.builder().build())
307293 .build()
308294 );
309295 
from line 322
336322 
337323 ```ruby Ruby
338324 # Create a message with the PowerPoint Skill
339 response = client.beta.messages.create(
325 response = client.messages.create(
340326 model: "claude-opus-5",
341327 max_tokens: 16_000,
342 betas: ["skills-2025-10-02"],
343328 container: {
344329 skills: [{type: "anthropic", skill_id: "pptx", version: "latest"}]
345330 },
from line 351
366351* **`tools`:** Enables code execution (required for Skills)
367352 
368353<Note>
369 Skills are generally available on the Claude API and don't require a beta header. The examples on this page still send the `skills-2025-10-02` beta header and use the SDKs' `beta` namespace. Both remain valid, so you can run the examples as written and omit the header in your own requests.
354 Skills are generally available on the Claude API and don't require a beta header. This covers the Skills API, the `container.skills` parameter, and the Files API. Requests that still send the `skills-2025-10-02` or `files-api-2025-04-14` header keep working, and the Skills API and Files API return the earlier response format for them. The PHP tabs in this quickstart still call the SDK's `beta` namespace and send those headers, so their printed output shows the earlier response fields.
370355 
371356 The examples use the `code_execution_20260521` tool version, and the Step 3 code parses the result types that current tool versions return. Skills also work with older [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) versions such as `code_execution_20250825`: any current code execution tool version satisfies the Skills requirement without a beta header. If you use a different version, use the tool `type` listed on the code execution tool page.
372357</Note>
from line 383
398383 curl --fail-with-body -sS "https://api.anthropic.com/v1/files/$file_id/content" \
399384 -H "x-api-key: $ANTHROPIC_API_KEY" \
400385 -H "anthropic-version: 2023-06-01" \
401 -H "anthropic-beta: files-api-2025-04-14" \
402386 -o "$output_path"
403387 echo "Presentation saved to $output_path"
404388 fi
from line 405
421405 if [[ -n "$file_id" ]]; then
422406 # Download the file and save it
423407 output_path="${TMPDIR:-/tmp}/renewable_energy.pptx"
424 ant beta:files download --file-id "$file_id" --output "$output_path"
408 ant files download --file-id "$file_id" --output "$output_path"
425409 echo "Presentation saved to $output_path"
426410 fi
427411 ```
from line 424
440424 if file_id:
441425 # Download the file and save it
442426 output_path = Path(tempfile.gettempdir()) / "renewable_energy.pptx"
443 file_content = client.beta.files.download(file_id=file_id)
427 file_content = client.files.download(file_id=file_id)
444428 file_content.write_to_file(output_path)
445429 print(f"Presentation saved to {output_path}")
446430 ```
from line 448
464448 if (fileId) {
465449 // Download the file and save it
466450 const outputPath = path.join(os.tmpdir(), "renewable_energy.pptx");
467 const fileContent = await client.beta.files.download(fileId);
451 const fileContent = await client.files.download(fileId);
468452 await fs.writeFile(outputPath, Buffer.from(await fileContent.arrayBuffer()));
469453 console.log(`Presentation saved to ${outputPath}`);
470454 }
from line 462
478462 foreach (var block in response.Content)
479463 {
480464 if (block.TryPickBashCodeExecutionToolResult(out var bashResult)
481 && bashResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var bashResultBlock))
465 && bashResult.Content.TryPickBashCodeExecutionResultBlock(out var bashResultBlock))
482466 {
483467 foreach (var output in bashResultBlock.Content)
484468 {
from line 475
491475 {
492476 // Download the file and save it
493477 var outputPath = Path.Combine(Path.GetTempPath(), "renewable_energy.pptx");
494 using var download = await client.Beta.Files.Download(fileId);
478 using var download = await client.Files.Download(fileId);
495479 await using var source = await download.ReadAsStream();
496480 await using var destination = File.Create(outputPath);
497481 await source.CopyToAsync(destination);
from line 490
506490 var fileID string
507491 for _, block := range response.Content {
508492 switch result := block.AsAny().(type) {
509 case anthropic.BetaBashCodeExecutionToolResultBlock:
493 case anthropic.BashCodeExecutionToolResultBlock:
510494 if result.Content.Type == "bash_code_execution_result" {
511495 for _, output := range result.Content.Content {
512496 fileID = output.FileID
from line 502
518502 if fileID != "" {
519503 // Download the file and save it
520504 outputPath := filepath.Join(os.TempDir(), "renewable_energy.pptx")
521 fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{})
505 fileContent, err := client.Files.Download(ctx, fileID)
522506 if err != nil {
523507 panic(err)
524508 }
from line 524
540524 // its Bash sub-tool, and generated files appear as bash_code_execution_output
541525 // items inside the bash_code_execution_tool_result block.
542526 String fileId = null;
543 for (BetaContentBlock block : response.content()) {
527 for (ContentBlock block : response.content()) {
544528 if (block.isBashCodeExecutionToolResult()) {
545529 var content = block.asBashCodeExecutionToolResult().content();
546 if (content.isBetaBashCodeExecutionResultBlock()) {
547 for (var output : content.asBetaBashCodeExecutionResultBlock().content()) {
530 if (content.isBashCodeExecutionResultBlock()) {
531 for (var output : content.asBashCodeExecutionResultBlock().content()) {
548532 fileId = output.fileId();
549533 }
550534 }
from line 538
554538 if (fileId != null) {
555539 // Download the file and save it
556540 Path outputPath = Files.createTempFile("renewable_energy", ".pptx");
557 try (HttpResponse fileContent = client.beta().files().download(fileId)) {
541 try (HttpResponse fileContent = client.files().download(fileId)) {
558542 Files.copy(fileContent.body(), outputPath, StandardCopyOption.REPLACE_EXISTING);
559543 }
560544 IO.println("Presentation saved to " + outputPath);
from line 588
604588 if file_id
605589 # Download the file and save it
606590 output_path = File.join(Dir.tmpdir, "renewable_energy.pptx")
607 file_content = client.beta.files.download(file_id)
591 file_content = client.files.download(file_id)
608592 File.binwrite(output_path, file_content.read)
609593 puts "Presentation saved to #{output_path}"
610594 end
from line 611
627611 -H "content-type: application/json" \
628612 -H "x-api-key: $ANTHROPIC_API_KEY" \
629613 -H "anthropic-version: 2023-06-01" \
630 -H "anthropic-beta: skills-2025-10-02" \
631614 -d '{
632615 "model": "claude-opus-5",
633616 "max_tokens": 16000,
from line 621
638621 {"role": "user", "content": "Create a quarterly sales tracking spreadsheet with sample data"}
639622 ],
640623 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
641 }' | jq -r '"stop_reason=\(.stop_reason)"'
624 }'
642625 ```
643626 
644627 ```bash CLI
645 ant beta:messages create --format json \
646 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
628 ant messages create <<'YAML'
647629 model: claude-opus-5
648630 max_tokens: 16000
649631 container:
from line 643
661643 ```
662644 
663645 ```python Python
664 response = client.beta.messages.create(
646 response = client.messages.create(
665647 model="claude-opus-5",
666648 max_tokens=16000,
667 betas=["skills-2025-10-02"],
668649 container={
669650 "skills": [{"type": "anthropic", "skill_id": "xlsx", "version": "latest"}]
670651 },
from line 660
679660 ```
680661 
681662 ```typescript TypeScript
682 const response = await client.beta.messages.create({
663 const response = await client.messages.create({
683664 model: "claude-opus-5",
684665 max_tokens: 16000,
685 betas: ["skills-2025-10-02"],
686666 container: {
687667 skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }]
688668 },
from line 677
697677 ```
698678 
699679 ```csharp C#
700 var response = await client.Beta.Messages.Create(
680 var response = await client.Messages.Create(
701681 new MessageCreateParams
702682 {
703683 Model = Model.ClaudeOpus5,
704684 MaxTokens = 16000,
705 Betas = ["skills-2025-10-02"],
706 Container = new BetaContainerParams
685 Container = new ContainerParams
707686 {
708687 Skills =
709688 [
710 new BetaSkillParams
689 new SkillParams
711690 {
712 Type = BetaSkillParamsType.Anthropic,
691 Type = SkillParamsType.Anthropic,
713692 SkillID = "xlsx",
714693 Version = "latest",
715694 },
from line 696
717696 },
718697 Messages =
719698 [
720 new BetaMessageParam
699 new MessageParam
721700 {
722701 Role = Role.User,
723702 Content = "Create a quarterly sales tracking spreadsheet with sample data",
724703 },
725704 ],
726 Tools = [new BetaCodeExecutionTool20260521()],
705 Tools = [new CodeExecutionTool20260521()],
727706 }
728707 );
729708 ```
730709 
731710 ```go Go
732 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
711 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
733712 Model: anthropic.ModelClaudeOpus5,
734713 MaxTokens: 16000,
735 Betas: []anthropic.AnthropicBeta{
736 anthropic.AnthropicBetaSkills2025_10_02,
737 },
738 Container: anthropic.BetaMessageNewParamsContainerUnion{
739 OfContainers: &anthropic.BetaContainerParams{
740 Skills: []anthropic.BetaSkillParams{
714 Container: anthropic.MessageCreateParamsContainerUnion{
715 OfContainers: &anthropic.ContainerParams{
716 Skills: []anthropic.SkillParams{
741717 {
742 Type: anthropic.BetaSkillParamsTypeAnthropic,
718 Type: anthropic.SkillParamsTypeAnthropic,
743719 SkillID: "xlsx",
744720 Version: anthropic.String("latest"),
745721 },
from line 722
746722 },
747723 },
748724 },
749 Messages: []anthropic.BetaMessageParam{
750 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a quarterly sales tracking spreadsheet with sample data")),
725 Messages: []anthropic.MessageParam{
726 anthropic.NewUserMessage(anthropic.NewTextBlock("Create a quarterly sales tracking spreadsheet with sample data")),
751727 },
752 Tools: []anthropic.BetaToolUnionParam{
728 Tools: []anthropic.ToolUnionParam{
753729 {
754 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
730 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
755731 },
756732 },
757733 })
from line 737
761737 ```
762738 
763739 ```java Java
764 BetaMessage response = client.beta().messages().create(
740 Message response = client.messages().create(
765741 MessageCreateParams.builder()
766742 .model(CLAUDE_OPUS_5)
767743 .maxTokens(16000)
768 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
769744 .container(
770 BetaContainerParams.builder()
745 ContainerParams.builder()
771746 .addSkill(
772 BetaSkillParams.builder()
747 SkillParams.builder()
773748 .type(ANTHROPIC)
774749 .skillId("xlsx")
775750 .version("latest")
from line 753
778753 .build()
779754 )
780755 .addUserMessage("Create a quarterly sales tracking spreadsheet with sample data")
781 .addTool(BetaCodeExecutionTool20260521.builder().build())
756 .addTool(CodeExecutionTool20260521.builder().build())
782757 .build()
783758 );
784759 
from line 780
805780 ```
806781 
807782 ```ruby Ruby
808 response = client.beta.messages.create(
783 response = client.messages.create(
809784 model: "claude-opus-5",
810785 max_tokens: 16_000,
811 betas: ["skills-2025-10-02"],
812786 container: {
813787 skills: [{type: "anthropic", skill_id: "xlsx", version: "latest"}]
814788 },
from line 805
831805 -H "content-type: application/json" \
832806 -H "x-api-key: $ANTHROPIC_API_KEY" \
833807 -H "anthropic-version: 2023-06-01" \
834 -H "anthropic-beta: skills-2025-10-02" \
835808 -d '{
836809 "model": "claude-opus-5",
837810 "max_tokens": 16000,
from line 815
842815 {"role": "user", "content": "Write a 2-page report on the benefits of renewable energy"}
843816 ],
844817 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
845 }' | jq -r '"stop_reason=\(.stop_reason)"'
818 }'
846819 ```
847820 
848821 ```bash CLI
849 ant beta:messages create --format json \
850 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
822 ant messages create <<'YAML'
851823 model: claude-opus-5
852824 max_tokens: 16000
853825 container:
from line 837
865837 ```
866838 
867839 ```python Python
868 response = client.beta.messages.create(
840 response = client.messages.create(
869841 model="claude-opus-5",
870842 max_tokens=16000,
871 betas=["skills-2025-10-02"],
872843 container={
873844 "skills": [{"type": "anthropic", "skill_id": "docx", "version": "latest"}]
874845 },
from line 854
883854 ```
884855 
885856 ```typescript TypeScript
886 const response = await client.beta.messages.create({
857 const response = await client.messages.create({
887858 model: "claude-opus-5",
888859 max_tokens: 16000,
889 betas: ["skills-2025-10-02"],
890860 container: {
891861 skills: [{ type: "anthropic", skill_id: "docx", version: "latest" }]
892862 },
from line 871
901871 ```
902872 
903873 ```csharp C#
904 var response = await client.Beta.Messages.Create(
874 var response = await client.Messages.Create(
905875 new MessageCreateParams
906876 {
907877 Model = Model.ClaudeOpus5,
908878 MaxTokens = 16000,
909 Betas = ["skills-2025-10-02"],
910 Container = new BetaContainerParams
879 Container = new ContainerParams
911880 {
912881 Skills =
913882 [
914 new BetaSkillParams
883 new SkillParams
915884 {
916 Type = BetaSkillParamsType.Anthropic,
885 Type = SkillParamsType.Anthropic,
917886 SkillID = "docx",
918887 Version = "latest",
919888 },
from line 890
921890 },
922891 Messages =
923892 [
924 new BetaMessageParam
893 new MessageParam
925894 {
926895 Role = Role.User,
927896 Content = "Write a 2-page report on the benefits of renewable energy",
928897 },
929898 ],
930 Tools = [new BetaCodeExecutionTool20260521()],
899 Tools = [new CodeExecutionTool20260521()],
931900 }
932901 );
933902 ```
934903 
935904 ```go Go
936 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
905 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
937906 Model: anthropic.ModelClaudeOpus5,
938907 MaxTokens: 16000,
939 Betas: []anthropic.AnthropicBeta{
940 anthropic.AnthropicBetaSkills2025_10_02,
941 },
942 Container: anthropic.BetaMessageNewParamsContainerUnion{
943 OfContainers: &anthropic.BetaContainerParams{
944 Skills: []anthropic.BetaSkillParams{
908 Container: anthropic.MessageCreateParamsContainerUnion{
909 OfContainers: &anthropic.ContainerParams{
910 Skills: []anthropic.SkillParams{
945911 {
946 Type: anthropic.BetaSkillParamsTypeAnthropic,
912 Type: anthropic.SkillParamsTypeAnthropic,
947913 SkillID: "docx",
948914 Version: anthropic.String("latest"),
949915 },
from line 916
950916 },
951917 },
952918 },
953 Messages: []anthropic.BetaMessageParam{
954 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Write a 2-page report on the benefits of renewable energy")),
919 Messages: []anthropic.MessageParam{
920 anthropic.NewUserMessage(anthropic.NewTextBlock("Write a 2-page report on the benefits of renewable energy")),
955921 },
956 Tools: []anthropic.BetaToolUnionParam{
922 Tools: []anthropic.ToolUnionParam{
957923 {
958 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
924 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
959925 },
960926 },
961927 })
from line 931
965931 ```
966932 
967933 ```java Java
968 BetaMessage response = client.beta().messages().create(
934 Message response = client.messages().create(
969935 MessageCreateParams.builder()
970936 .model(CLAUDE_OPUS_5)
971937 .maxTokens(16000)
972 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
973938 .container(
974 BetaContainerParams.builder()
939 ContainerParams.builder()
975940 .addSkill(
976 BetaSkillParams.builder()
941 SkillParams.builder()
977942 .type(ANTHROPIC)
978943 .skillId("docx")
979944 .version("latest")
from line 947
982947 .build()
983948 )
984949 .addUserMessage("Write a 2-page report on the benefits of renewable energy")
985 .addTool(BetaCodeExecutionTool20260521.builder().build())
950 .addTool(CodeExecutionTool20260521.builder().build())
986951 .build()
987952 );
988953 
from line 974
1009974 ```
1010975 
1011976 ```ruby Ruby
1012 response = client.beta.messages.create(
977 response = client.messages.create(
1013978 model: "claude-opus-5",
1014979 max_tokens: 16_000,
1015 betas: ["skills-2025-10-02"],
1016980 container: {
1017981 skills: [{type: "anthropic", skill_id: "docx", version: "latest"}]
1018982 },
from line 999
1035999 -H "content-type: application/json" \
10361000 -H "x-api-key: $ANTHROPIC_API_KEY" \
10371001 -H "anthropic-version: 2023-06-01" \
1038 -H "anthropic-beta: skills-2025-10-02" \
10391002 -d '{
10401003 "model": "claude-opus-5",
10411004 "max_tokens": 16000,
from line 1009
10461009 {"role": "user", "content": "Generate a PDF invoice template"}
10471010 ],
10481011 "tools": [{"type": "code_execution_20260521", "name": "code_execution"}]
1049 }' | jq -r '"stop_reason=\(.stop_reason)"'
1012 }'
10501013 ```
10511014 
10521015 ```bash CLI
1053 ant beta:messages create --format json \
1054 --beta skills-2025-10-02 <<'YAML' | jq -r '"stop_reason=\(.stop_reason)"'
1016 ant messages create <<'YAML'
10551017 model: claude-opus-5
10561018 max_tokens: 16000
10571019 container:
from line 1031
10691031 ```
10701032 
10711033 ```python Python
1072 response = client.beta.messages.create(
1034 response = client.messages.create(
10731035 model="claude-opus-5",
10741036 max_tokens=16000,
1075 betas=["skills-2025-10-02"],
10761037 container={
10771038 "skills": [{"type": "anthropic", "skill_id": "pdf", "version": "latest"}]
10781039 },
from line 1048
10871048 ```
10881049 
10891050 ```typescript TypeScript
1090 const response = await client.beta.messages.create({
1051 const response = await client.messages.create({
10911052 model: "claude-opus-5",
10921053 max_tokens: 16000,
1093 betas: ["skills-2025-10-02"],
10941054 container: {
10951055 skills: [{ type: "anthropic", skill_id: "pdf", version: "latest" }]
10961056 },
from line 1065
11051065 ```
11061066 
11071067 ```csharp C#
1108 var response = await client.Beta.Messages.Create(
1068 var response = await client.Messages.Create(
11091069 new MessageCreateParams
11101070 {
11111071 Model = Model.ClaudeOpus5,
11121072 MaxTokens = 16000,
1113 Betas = ["skills-2025-10-02"],
1114 Container = new BetaContainerParams
1073 Container = new ContainerParams
11151074 {
11161075 Skills =
11171076 [
1118 new BetaSkillParams
1077 new SkillParams
11191078 {
1120 Type = BetaSkillParamsType.Anthropic,
1079 Type = SkillParamsType.Anthropic,
11211080 SkillID = "pdf",
11221081 Version = "latest",
11231082 },
from line 1084
11251084 },
11261085 Messages =
11271086 [
1128 new BetaMessageParam
1087 new MessageParam
11291088 {
11301089 Role = Role.User,
11311090 Content = "Generate a PDF invoice template",
11321091 },
11331092 ],
1134 Tools = [new BetaCodeExecutionTool20260521()],
1093 Tools = [new CodeExecutionTool20260521()],
11351094 }
11361095 );
11371096 ```
11381097 
11391098 ```go Go
1140 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
1099 response, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
11411100 Model: anthropic.ModelClaudeOpus5,
11421101 MaxTokens: 16000,
1143 Betas: []anthropic.AnthropicBeta{
1144 anthropic.AnthropicBetaSkills2025_10_02,
1145 },
1146 Container: anthropic.BetaMessageNewParamsContainerUnion{
1147 OfContainers: &anthropic.BetaContainerParams{
1148 Skills: []anthropic.BetaSkillParams{
1102 Container: anthropic.MessageCreateParamsContainerUnion{
1103 OfContainers: &anthropic.ContainerParams{
1104 Skills: []anthropic.SkillParams{
11491105 {
1150 Type: anthropic.BetaSkillParamsTypeAnthropic,
1106 Type: anthropic.SkillParamsTypeAnthropic,
11511107 SkillID: "pdf",
11521108 Version: anthropic.String("latest"),
11531109 },
from line 1110
11541110 },
11551111 },
11561112 },
1157 Messages: []anthropic.BetaMessageParam{
1158 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Generate a PDF invoice template")),
1113 Messages: []anthropic.MessageParam{
1114 anthropic.NewUserMessage(anthropic.NewTextBlock("Generate a PDF invoice template")),
11591115 },
1160 Tools: []anthropic.BetaToolUnionParam{
1116 Tools: []anthropic.ToolUnionParam{
11611117 {
1162 OfCodeExecutionTool20260521: &anthropic.BetaCodeExecutionTool20260521Param{},
1118 OfCodeExecutionTool20260521: &anthropic.CodeExecutionTool20260521Param{},
11631119 },
11641120 },
11651121 })
from line 1125
11691125 ```
11701126 
11711127 ```java Java
1172 BetaMessage response = client.beta().messages().create(
1128 Message response = client.messages().create(
11731129 MessageCreateParams.builder()
11741130 .model(CLAUDE_OPUS_5)
11751131 .maxTokens(16000)
1176 .addBeta(AnthropicBeta.SKILLS_2025_10_02)
11771132 .container(
1178 BetaContainerParams.builder()
1133 ContainerParams.builder()
11791134 .addSkill(
1180 BetaSkillParams.builder()
1135 SkillParams.builder()
11811136 .type(ANTHROPIC)
11821137 .skillId("pdf")
11831138 .version("latest")
from line 1141
11861141 .build()
11871142 )
11881143 .addUserMessage("Generate a PDF invoice template")
1189 .addTool(BetaCodeExecutionTool20260521.builder().build())
1144 .addTool(CodeExecutionTool20260521.builder().build())
11901145 .build()
11911146 );
11921147 
from line 1168
12131168 ```
12141169 
12151170 ```ruby Ruby
1216 response = client.beta.messages.create(
1171 response = client.messages.create(
12171172 model: "claude-opus-5",
12181173 max_tokens: 16_000,
1219 betas: ["skills-2025-10-02"],
12201174 container: {
12211175 skills: [{type: "anthropic", skill_id: "pdf", version: "latest"}]
12221176 },
from line 1196
12421196 Learn how to use Agent Skills to extend Claude's capabilities through the API.
12431197 </Card>
12441198 
1245 <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create-skill">
1199 <Card title="Create custom Skills" icon="code" href="https://platform.claude.com/docs/en/api/skills/create">
12461200 Upload your own Skills for specialized tasks.
12471201 </Card>
12481202 

agents-and-tools/mcp-connector Changed · +8 / -8 lines

from line 664
664664 <Tabs>
665665 <Tab title="Gradle">
666666 ```kotlin
667 implementation("com.anthropic:anthropic-java-mcp:2.53.0")
667 implementation("com.anthropic:anthropic-java-mcp:2.57.0")
668668 ```
669669 </Tab>
670670 
from line 673
673673 <dependency>
674674 <groupId>com.anthropic</groupId>
675675 <artifactId>anthropic-java-mcp</artifactId>
676 <version>2.53.0</version>
676 <version>2.57.0</version>
677677 </dependency>
678678 ```
679679 </Tab>
from line 1153
11531153 file_resource = await mcp_client.read_resource(
11541154 uri="file:///path/to/data.json",
11551155 )
1156 uploaded = await client.beta.files.upload(
1156 uploaded = await client.files.upload(
11571157 file=mcp_resource_to_file(file_resource),
11581158 )
11591159 print(uploaded.id)
from line 1181
11811181 
11821182 // As a file upload
11831183 const fileResource = await mcpClient.readResource({ uri: "file:///path/to/data.json" });
1184 const uploaded = await anthropic.beta.files.upload({ file: mcpResourceToFile(fileResource) });
1184 const uploaded = await anthropic.files.upload({ file: mcpResourceToFile(fileResource) });
11851185 console.log(uploaded.id);
11861186 ```
11871187 
from line 1223
12231223 file.ContentType = new(mediaType);
12241224 }
12251225 
1226 var uploaded = await anthropic.Beta.Files.Upload(new FileUploadParams { File = file });
1226 var uploaded = await anthropic.Files.Upload(new FileUploadParams { File = file });
12271227 Console.WriteLine(uploaded.ID);
12281228 ```
12291229 
from line 1269
12691269 if err != nil {
12701270 log.Fatal(err)
12711271 }
1272 uploaded, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{File: fileReader})
1272 uploaded, err := client.Files.Upload(ctx, anthropic.FileUploadParams{File: fileReader})
12731273 if err != nil {
12741274 log.Fatal(err)
12751275 }
from line 1309
13091309 fileField.contentType(resourceFile.mimeType());
13101310 }
13111311 
1312 var uploaded = anthropic.beta().files().upload(FileUploadParams.builder()
1312 var uploaded = anthropic.files().upload(FileUploadParams.builder()
13131313 .file(fileField.build())
13141314 .build());
13151315 
from line 1365
13651365 # As a file upload
13661366 file_resource = mcp_client.read_resource(uri: "file:///path/to/data.json")
13671367 file = Anthropic::Mcp.resource_to_files(file_resource).first
1368 uploaded_file = anthropic.beta.files.upload(file: file)
1368 uploaded_file = anthropic.files.upload(file: file)
13691369 puts uploaded_file.id
13701370 ```
13711371</CodeGroup>

agents-and-tools/tool-use/code-execution-tool Changed · +67 / -84 lines

from line 278
278278To analyze your own data files (such as CSV, Excel, or images), upload them through the Files API and reference them in your request:
279279 
280280<Note>
281 This workflow doesn't require a beta header: uploading and downloading files through the Files API and referencing them in `container_upload` blocks are all generally available. The examples on this page send `anthropic-beta: files-api-2025-04-14`, which the API accepts but doesn't require.
281 This workflow doesn't require a beta header: uploading and downloading files through the Files API and referencing them in `container_upload` blocks are all generally available.
282282</Note>
283283 
284284The Python environment can process various file types uploaded through the Files API, including:
from line 302
302302 FILE_ID=$(curl --fail-with-body -sS https://api.anthropic.com/v1/files \
303303 -H "x-api-key: $ANTHROPIC_API_KEY" \
304304 -H "anthropic-version: 2023-06-01" \
305 -H "anthropic-beta: files-api-2025-04-14" \
306305 -F "[email protected]" | jq -r '.id')
307306 
308307 # Then use the file_id with code execution
from line 308
309308 curl --fail-with-body -sS https://api.anthropic.com/v1/messages \
310309 -H "x-api-key: $ANTHROPIC_API_KEY" \
311310 -H "anthropic-version: 2023-06-01" \
312 -H "anthropic-beta: files-api-2025-04-14" \
313311 -H "content-type: application/json" \
314312 -d '{
315313 "model": "claude-opus-5",
from line 328
330328 
331329 ```bash CLI
332330 # First, upload a file and capture the file ID
333 FILE_ID=$(ant beta:files upload \
331 FILE_ID=$(ant files upload \
334332 --file ./data.csv \
335333 --transform id --raw-output)
336334 
337335 # Then use the file_id with code execution
338 ant beta:messages create \
339 --beta files-api-2025-04-14 <<YAML
336 ant messages create <<YAML
340337 model: claude-opus-5
341338 max_tokens: 4096
342339 messages:
from line 353
356353 client = anthropic.Anthropic()
357354 
358355 # Upload a file
359 file_object = client.beta.files.upload(file=Path("data.csv"))
356 file_object = client.files.upload(file=Path("data.csv"))
360357 
361358 # Use the file_id with code execution
362 response = client.beta.messages.create(
359 response = client.messages.create(
363360 model="claude-opus-5",
364 betas=["files-api-2025-04-14"],
365361 max_tokens=4096,
366362 messages=[
367363 {
from line 380
384380 const client = new Anthropic();
385381 
386382 // Upload a file
387 const fileObject = await client.beta.files.upload({
383 const fileObject = await client.files.upload({
388384 file: createReadStream("data.csv")
389385 });
390386 
391387 // Use the file_id with code execution
392 const response = await client.beta.messages.create({
388 const response = await client.messages.create({
393389 model: "claude-opus-5",
394 betas: ["files-api-2025-04-14"],
395390 max_tokens: 4096,
396391 messages: [
397392 {
from line 412
417412 AnthropicClient client = new();
418413 
419414 // Upload a file
420 var fileObject = await client.Beta.Files.Upload(new FileUploadParams
415 var fileObject = await client.Files.Upload(new FileUploadParams
421416 {
422417 File = File.OpenRead("data.csv")
423418 });
from line 422
427422 {
428423 Model = Model.ClaudeOpus5,
429424 MaxTokens = 4096,
430 Betas = [AnthropicBeta.FilesApi2025_04_14],
431425 Messages = [
432426 new()
433427 {
434428 Role = Role.User,
435429 Content = new([
436 new BetaTextBlockParam { Text = "Analyze this CSV data" },
437 new BetaContainerUploadBlockParam { FileID = fileObject.ID }
430 new TextBlockParam { Text = "Analyze this CSV data" },
431 new ContainerUploadBlockParam { FileID = fileObject.ID }
438432 ])
439433 }
440434 ],
441 Tools = [new BetaCodeExecutionTool20250825()]
435 Tools = [new CodeExecutionTool20250825()]
442436 };
443437 
444 var response = await client.Beta.Messages.Create(parameters);
438 var response = await client.Messages.Create(parameters);
445439 Console.WriteLine(response);
446440 ```
447441 
from line 450
456450 }
457451 defer file.Close()
458452 
459 fileObject, err := client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{
453 fileObject, err := client.Files.Upload(ctx, anthropic.FileUploadParams{
460454 File: file,
461455 })
462456 if err != nil {
from line 458
464458 }
465459 
466460 // Use the file_id with code execution
467 response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{
461 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
468462 Model: anthropic.ModelClaudeOpus5,
469463 MaxTokens: 4096,
470 Messages: []anthropic.BetaMessageParam{
471 anthropic.NewBetaUserMessage(
472 anthropic.NewBetaTextBlock("Analyze this CSV data"),
473 anthropic.NewBetaContainerUploadBlock(fileObject.ID),
464 Messages: []anthropic.MessageParam{
465 anthropic.NewUserMessage(
466 anthropic.NewTextBlock("Analyze this CSV data"),
467 anthropic.NewContainerUploadBlock(fileObject.ID),
474468 ),
475469 },
476 Tools: []anthropic.BetaToolUnionParam{
477 {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}},
470 Tools: []anthropic.ToolUnionParam{
471 {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}},
478472 },
479 Betas: []anthropic.AnthropicBeta{
480 anthropic.AnthropicBetaFilesAPI2025_04_14,
481 },
482473 })
483474 if err != nil {
484475 log.Fatal(err)
from line 482
491482 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
492483 
493484 // Upload a file
494 FileMetadata fileObject = client.beta().files().upload(
485 FileMetadata fileObject = client.files().upload(
495486 FileUploadParams.builder()
496487 .file(Path.of("data.csv"))
497488 .build()
from line 489
498489 );
499490 
500491 // Use the file_id with code execution
501 BetaMessage response = client.beta().messages().create(
492 Message response = client.messages().create(
502493 MessageCreateParams.builder()
503494 .model(Model.CLAUDE_OPUS_5)
504 .addBeta(AnthropicBeta.FILES_API_2025_04_14)
505495 .maxTokens(4096L)
506 .addUserMessageOfBetaContentBlockParams(List.of(
507 BetaContentBlockParam.ofText(BetaTextBlockParam.builder()
496 .addUserMessageOfBlockParams(List.of(
497 ContentBlockParam.ofText(TextBlockParam.builder()
508498 .text("Analyze this CSV data")
509499 .build()),
510 BetaContentBlockParam.ofContainerUpload(BetaContainerUploadBlockParam.builder()
500 ContentBlockParam.ofContainerUpload(ContainerUploadBlockParam.builder()
511501 .fileId(fileObject.id())
512502 .build())
513503 ))
514 .addTool(BetaCodeExecutionTool20250825.builder().build())
504 .addTool(CodeExecutionTool20250825.builder().build())
515505 .build()
516506 );
517507 
from line 540
550540 client = Anthropic::Client.new
551541 
552542 # Upload a file
553 file_object = client.beta.files.upload(
543 file_object = client.files.upload(
554544 file: Pathname("data.csv")
555545 )
556546 
557547 # Use the file_id with code execution
558 response = client.beta.messages.create(
548 response = client.messages.create(
559549 model: Anthropic::Model::CLAUDE_OPUS_5,
560 betas: [Anthropic::AnthropicBeta::FILES_API_2025_04_14],
561550 max_tokens: 4096,
562551 messages: [
563552 {
from line 558
569558 }
570559 ],
571560 tools: [
572 Anthropic::Beta::BetaCodeExecutionTool20250825.new
561 Anthropic::CodeExecutionTool20250825.new
573562 ]
574563 )
575564 
from line 587
598587 client = Anthropic()
599588 
600589 # Request code execution that creates files
601 response = client.beta.messages.create(
590 response = client.messages.create(
602591 model="claude-opus-5",
603 betas=["files-api-2025-04-14"],
604592 max_tokens=4096,
605593 messages=[
606594 {
from line 601
613601 
614602 
615603 # Extract file IDs from the response
616 def extract_file_ids(response: BetaMessage) -> list[str]:
604 def extract_file_ids(response: Message) -> list[str]:
617605 file_ids: list[str] = []
618606 for item in response.content:
619607 if item.type == "bash_code_execution_tool_result":
from line 614
626614 
627615 # Download the created files
628616 for file_id in extract_file_ids(response):
629 file_metadata = client.beta.files.retrieve_metadata(file_id)
630 file_content = client.beta.files.download(file_id)
617 file_metadata = client.files.retrieve_metadata(file_id)
618 file_content = client.files.download(file_id)
631619 file_content.write_to_file(file_metadata.filename)
632620 print(f"Downloaded: {file_metadata.filename}")
633621 ```
from line 626
638626 const client = new Anthropic();
639627 
640628 // Request code execution that creates files
641 const response = await client.beta.messages.create({
629 const response = await client.messages.create({
642630 model: "claude-opus-5",
643 betas: ["files-api-2025-04-14"],
644631 max_tokens: 4096,
645632 messages: [
646633 {
from line 650
663650 if (result.type === "bash_code_execution_result") {
664651 for (const outputBlock of result.content) {
665652 const [fileMetadata, fileResponse] = await Promise.all([
666 client.beta.files.retrieveMetadata(outputBlock.file_id),
667 client.beta.files.download(outputBlock.file_id)
653 client.files.retrieveMetadata(outputBlock.file_id),
654 client.files.download(outputBlock.file_id)
668655 ]);
669656 await writeFile(fileMetadata.filename, await fileResponse.bytes());
670657 console.log(`Downloaded: ${fileMetadata.filename}`);
from line 668
681668 {
682669 Model = Model.ClaudeOpus5,
683670 MaxTokens = 4096,
684 Betas = [AnthropicBeta.FilesApi2025_04_14],
685671 Messages = [new() { Role = Role.User, Content = "Create a matplotlib visualization and save it as output.png" }],
686 Tools = [new BetaCodeExecutionTool20250825()]
672 Tools = [new CodeExecutionTool20250825()]
687673 };
688674 
689 var response = await client.Beta.Messages.Create(parameters);
675 var response = await client.Messages.Create(parameters);
690676 
691677 // Collect the file IDs from the tool results
692678 List<string> fileIds = [];
from line 680
694680 {
695681 if (!block.TryPickBashCodeExecutionToolResult(out var toolResult))
696682 continue;
697 if (!toolResult.Content.TryPickBetaBashCodeExecutionResultBlock(out var result))
683 if (!toolResult.Content.TryPickBashCodeExecutionResultBlock(out var result))
698684 continue;
699685 foreach (var output in result.Content)
700686 {
from line 691
705691 // Download each created file
706692 foreach (var fileId in fileIds)
707693 {
708 var fileMetadata = await client.Beta.Files.RetrieveMetadata(fileId);
709 using var download = await client.Beta.Files.Download(fileId);
694 var fileMetadata = await client.Files.RetrieveMetadata(fileId);
695 using var download = await client.Files.Download(fileId);
710696 var downloadStream = await download.ReadAsStream();
711697 await using var target = File.Create(fileMetadata.Filename);
712698 await downloadStream.CopyToAsync(target);
from line 704
718704 client := anthropic.NewClient()
719705 ctx := context.Background()
720706 
721 response, err := client.Beta.Messages.New(ctx, anthropic.BetaMessageNewParams{
707 response, err := client.Messages.New(ctx, anthropic.MessageNewParams{
722708 Model: anthropic.ModelClaudeOpus5,
723709 MaxTokens: 4096,
724 Messages: []anthropic.BetaMessageParam{
725 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Create a matplotlib visualization and save it as output.png")),
710 Messages: []anthropic.MessageParam{
711 anthropic.NewUserMessage(anthropic.NewTextBlock("Create a matplotlib visualization and save it as output.png")),
726712 },
727 Tools: []anthropic.BetaToolUnionParam{
728 {OfCodeExecutionTool20250825: &anthropic.BetaCodeExecutionTool20250825Param{}},
713 Tools: []anthropic.ToolUnionParam{
714 {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}},
729715 },
730 Betas: []anthropic.AnthropicBeta{
731 anthropic.AnthropicBetaFilesAPI2025_04_14,
732 },
733716 })
734717 if err != nil {
735718 log.Fatal(err)
from line 721
738721 fileIDs := extractFileIDs(response)
739722 
740723 for _, fileID := range fileIDs {
741 fileMetadata, err := client.Beta.Files.GetMetadata(ctx, fileID, anthropic.BetaFileGetMetadataParams{})
724 fileMetadata, err := client.Files.GetMetadata(ctx, fileID)
742725 if err != nil {
743726 log.Fatal(err)
744727 }
745728 
746 fileContent, err := client.Beta.Files.Download(ctx, fileID, anthropic.BetaFileDownloadParams{})
729 fileContent, err := client.Files.Download(ctx, fileID)
747730 if err != nil {
748731 log.Fatal(err)
749732 }
from line 747
764747 }
765748 // ...
766749 
767 func extractFileIDs(response *anthropic.BetaMessage) []string {
750 func extractFileIDs(response *anthropic.Message) []string {
768751 var fileIDs []string
769752 for _, item := range response.Content {
770753 switch variant := item.AsAny().(type) {
771 case anthropic.BetaBashCodeExecutionToolResultBlock:
754 case anthropic.BashCodeExecutionToolResultBlock:
772755 // Collect the file IDs from the tool result
773756 for _, file := range variant.Content.Content {
774757 if file.FileID != "" {
from line 770
787770 
788771 MessageCreateParams params = MessageCreateParams.builder()
789772 .model(Model.CLAUDE_OPUS_5)
790 .addBeta(AnthropicBeta.FILES_API_2025_04_14)
791773 .maxTokens(4096L)
792774 .addUserMessage("Create a matplotlib visualization and save it as output.png")
793 .addTool(BetaCodeExecutionTool20250825.builder().build())
775 .addTool(CodeExecutionTool20250825.builder().build())
794776 .build();
795777 
796 BetaMessage response = client.beta().messages().create(params);
778 Message response = client.messages().create(params);
797779 
798780 List<String> fileIds = extractFileIds(response);
799781 
800782 for (String fileId : fileIds) {
801 FileMetadata fileMetadata = client.beta().files().retrieveMetadata(fileId);
802 try (HttpResponse fileContent = client.beta().files().download(fileId)) {
783 FileMetadata fileMetadata = client.files().retrieveMetadata(fileId);
784 try (HttpResponse fileContent = client.files().download(fileId)) {
803785 Files.copy(
804786 fileContent.body(),
805787 Path.of(fileMetadata.filename()),
from line 791
809791 }
810792 }
811793 
812 List<String> extractFileIds(BetaMessage response) {
794 List<String> extractFileIds(Message response) {
813795 List<String> fileIds = new ArrayList<>();
814796 // Collect the file IDs from the tool results
815 for (BetaContentBlock item : response.content()) {
797 for (ContentBlock item : response.content()) {
816798 item.bashCodeExecutionToolResult().ifPresent(toolResult -> {
817 if (toolResult.content().isBetaBashCodeExecutionResultBlock()) {
818 BetaBashCodeExecutionResultBlock result =
819 toolResult.content().asBetaBashCodeExecutionResultBlock();
820 for (BetaBashCodeExecutionOutputBlock output : result.content()) {
799 if (toolResult.content().isBashCodeExecutionResultBlock()) {
800 BashCodeExecutionResultBlock result =
801 toolResult.content().asBashCodeExecutionResultBlock();
802 for (BashCodeExecutionOutputBlock output : result.content()) {
821803 fileIds.add(output.fileId());
822804 }
823805 }
from line 862
880862 ```ruby Ruby
881863 client = Anthropic::Client.new
882864 
883 response = client.beta.messages.create(
865 response = client.messages.create(
884866 model: Anthropic::Model::CLAUDE_OPUS_5,
885 betas: ["files-api-2025-04-14"],
886867 max_tokens: 4096,
887868 messages: [
888869 {
from line 898
917898 end
918899 
919900 extract_file_ids(response).each do |file_id|
920 file_metadata = client.beta.files.retrieve_metadata(file_id)
921 file_content = client.beta.files.download(file_id)
901 file_metadata = client.files.retrieve_metadata(file_id)
902 file_content = client.files.download(file_id)
922903 
923904 File.open(file_metadata.filename, "wb") do |f|
924905 f.write(file_content.read)
from line 1320
13391320 
13401321 // Reuse the container from the first request so the file is still there.
13411322 response2, err := client.Messages.New(ctx, anthropic.MessageNewParams{
1342 Container: anthropic.String(response1.Container.ID),
1323 Container: anthropic.MessageCreateParamsContainerUnion{
1324 OfString: anthropic.String(response1.Container.ID),
1325 },
13431326 Model: anthropic.ModelClaudeOpus5,
13441327 MaxTokens: 4096,
13451328 Messages: []anthropic.MessageParam{
from line 1532
15491532 
15501533## Data retention
15511534 
1552Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.beta.files.download()`) persist until explicitly deleted.
1535Code execution runs in server-side sandbox containers. Container data, including execution artifacts, uploaded files, and outputs, is retained for up to 30 days. This retention applies to all data processed within the container environment. Files that code execution creates in the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) (retrievable with `client.files.download()`) persist until explicitly deleted.
15531536 
15541537For ZDR eligibility across all features, see [API and data retention](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention).
15551538 

agents-and-tools/tool-use/overview Changed · +5 / -8 lines

from line 4
44description: Connect Claude to external tools and APIs. See where tools execute, when Claude calls them, and which tool fits your task.
55---
66 
7Tool use lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools).
7Tool use (also called function calling) lets Claude call functions that you define or that Anthropic provides. Claude determines when to call a tool based on the user's request and the tool's description. It then returns a structured call that your application executes (client tools) or that Anthropic executes (server tools).
88 
99Here's a minimal example using a server tool, the [Web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool), which Anthropic executes for you:
1010 
from line 175
175175 echo "Claude called $(echo "$TOOL_USE" | jq -r '.name') with $(echo "$TOOL_USE" | jq -c '.input')"
176176 
177177 # Run the tool, then send the result back in a tool_result block.
178 # Claude uses the result to answer the original question.
178179 WEATHER="15 degrees Celsius, partly cloudy"
179 FOLLOWUP=$(curl -s https://api.anthropic.com/v1/messages \
180 curl -s https://api.anthropic.com/v1/messages \
180181 -H "x-api-key: $ANTHROPIC_API_KEY" \
181182 -H "anthropic-version: 2023-06-01" \
182183 -H "content-type: application/json" \
from line 199
198199 {type: "tool_result", tool_use_id: $tool_use_id, content: $weather}
199200 ]}
200201 ]
201 }')")
202 
203 # Claude uses the result to answer the original question.
204 echo "$FOLLOWUP" | jq -r '.content[] | select(.type == "text") | .text'
202 }')"
205203 ```
206204 
207205 ```bash CLI
from line 244
246244 {type: "tool_result", tool_use_id: $tool_use_id, content: $weather}
247245 ]}
248246 ]' <<<"$MESSAGES")
249 FOLLOWUP=$(call_api)
250247 
251248 # Claude uses the result to answer the original question.
252 jq -r '.content[] | select(.type == "text") | .text' <<<"$FOLLOWUP"
249 call_api
253250 ```
254251 
255252 ```python Python

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

from line 249
249249 if err != nil {
250250 log.Fatal(err)
251251 }
252 fmt.Println(response)
252 fmt.Println(response.RawJSON())
253253 ```
254254 
255255 ```java Java
from line 874
874874 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
875875 Model: anthropic.ModelClaudeOpus5,
876876 MaxTokens: 4096,
877 Container: anthropic.MessageNewParamsContainerUnion{
877 Container: anthropic.MessageCreateParamsContainerUnion{
878878 OfString: anthropic.String("container_xyz789"),
879879 },
880880 Messages: []anthropic.MessageParam{
from line 936
936936 if err != nil {
937937 log.Fatal(err)
938938 }
939 fmt.Println(response)
939 fmt.Println(response.RawJSON())
940940 ```
941941 
942942 ```java Java

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

from line 45
4545 }
4646 ],
4747 "tools": [{"type": "web_search_20250305", "name": "web_search", "max_uses": 10}]
48 }' | jq '{stop_reason, content}'
48 }'
4949 ```
5050 
5151 ```bash CLI
5252 # Initial request. If "stop_reason" in the output is "pause_turn", re-run with
5353 # the assistant content appended to messages (see the SDK tabs).
54 ant messages create --format json <<'YAML' | jq '{stop_reason, content}'
54 ant messages create <<'YAML'
5555 model: claude-opus-5
5656 max_tokens: 1024
5757 tools:
from line 530
530530 }
531531 }
532532 ]
533 }' | jq '{stop_reason, content}'
533 }'
534534 ```
535535 
536536 ```bash CLI
from line 537
537537 # If "stop_reason" is "tool_use" and a server_tool_use block has no matching
538538 # result block, run the client tools and re-run with a user message of only
539539 # their tool_result blocks appended (see the SDK tabs).
540 ant messages create --format json <<'YAML' | jq '{stop_reason, content}'
540 ant messages create <<'YAML'
541541 model: claude-opus-4-8
542542 max_tokens: 1024
543543 messages:
from line 1064
10641064Invalid domain formats are rejected at request time with a 400 `invalid_request_error`.
10651065 
10661066<Note>
1067 Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. Domains your organization blocks are removed from a request-level allowed list rather than returning an error.
1067 Request-level domain restrictions work together with any organization-level domain restrictions configured in Claude Console. Request-level `allowed_domains` must be a subset of the organization-level allowed list; entries outside it cause the API to return a validation error. A request-level allowed list that includes a domain your organization blocks is rejected with a `400` error that names the conflicting entries.
10681068</Note>
10691069 
10701070<Warning>

agents-and-tools/tool-use/troubleshooting-tool-use Changed · +6 / -6 lines

from line 37
3737 
3838## Errors at request time
3939 
40| Error | Cause | Fix |
41| ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
42| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). |
43| `was found without a corresponding <name>_tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no <name> tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). |
44| `Input schema is not compatible with strict mode: string patterns are not supported` | Using `pattern` with `strict: true` | Remove the pattern or drop `strict: true`. The `pattern` keyword is not in the supported JSON Schema subset yet. |
45| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. |
40| Error | Cause | Fix |
41| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
42| `tool_use ids were found without tool_result blocks immediately after` | Missing `tool_result` for some `tool_use` ids, or `tool_result` is not the first content block in the user message | Return one `tool_result` for every `tool_use` block in the assistant response. Put `tool_result` blocks before any text. See [Handle tool calls](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls) and [Parallel tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/parallel-tool-use). |
43| `was found without a corresponding <name>_tool_result block` | The previous assistant turn has a `server_tool_use` block with no result block (most often, Claude called it alongside a client tool), and either your next user message ended that turn (for example, with text after the `tool_result` blocks) or the resume request no longer defines that server tool (the message then ends with `but no <name> tool was provided`) | Send a user message containing only the `tool_result` blocks for the client `tool_use` ids and keep the same `tools` array. See [Stop reasons and fallback](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons#tool-use). |
44| `Unsupported regex feature in pattern field: ...` | A `pattern` in a strict tool's `input_schema` uses a regex feature that strict mode can't compile, such as a backreference, a lookaround, a word boundary, or a large `{n,m}` range | Simplify the pattern. Anchored patterns with basic quantifiers, character classes, and groups are supported; see [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations). |
45| `All tools have defer_loading: true` | No tools visible to the model | At least one tool must be immediately loaded. The tool search tool itself must never have `defer_loading: true`. |
4646 
4747## Error: thinking blocks cannot be modified
4848 

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

from line 183
183183 if err != nil {
184184 log.Fatal(err)
185185 }
186 fmt.Println(response)
186 fmt.Println(response.RawJSON())
187187 ```
188188 
189189 ```java Java
from line 348
348348 if err != nil {
349349 log.Fatal(err)
350350 }
351 fmt.Println(response)
351 fmt.Println(response.RawJSON())
352352 ```
353353 
354354 ```java Java
from line 800
800800 if err != nil {
801801 log.Fatal(err)
802802 }
803 fmt.Println(response)
803 fmt.Println(response.RawJSON())
804804 ```
805805 
806806 ```java Java

api/beta Changed · +7632 / -1583 lines

### Beta Browser Close Tab Config ### Beta Browser Double Click Config ### Beta Browser File Upload Config ### Beta Browser Find Config ### Beta Browser Form Input Config ### Beta Browser Get Page Text Config ### Beta Browser Hold Key Config ### Beta Browser Hover Config ### Beta Browser Javascript Exec Config ### Beta Browser Key Config ### Beta Browser Left Click Config ### Beta Browser Left Click Drag Config ### Beta Browser Left Mouse Down Config ### Beta Browser Left Mouse Up Config ### Beta Browser List Tabs Config ### Beta Browser Middle Click Config ### Beta Browser Mouse Move Config ### Beta Browser Navigate Config ### Beta Browser New Tab Config ### Beta Browser Read Console Config ### Beta Browser Read Network Config ### Beta Browser Read Page Config ### Beta Browser Right Click Config ### Beta Browser Screenshot Config ### Beta Browser Scroll Config ### Beta Browser Scroll To Config ### Beta Browser State Block Param ### Beta Browser State Change ### Beta Browser State Change Download Completed ### Beta Browser State Change Download Failed ### Beta Browser State Change Download Started ### Beta Browser State Change Tab Opened ### Beta Browser State Tab Entry ### Beta Browser Switch Tab Config ### Beta Browser Toolset 20260801 ### Beta Browser Toolset Configs ### Beta Browser Triple Click Config ### Beta Browser Type Config ### Beta Browser Wait Config ### Beta Browser Zoom Config ### Beta Computer Cursor Position Config ### Beta Computer Double Click Config ### Beta Computer Hold Key Config ### Beta Computer Key Config ### Beta Computer Left Click Config ### Beta Computer Left Click Drag Config ### Beta Computer Left Mouse Down Config ### Beta Computer Left Mouse Up Config ### Beta Computer Middle Click Config ### Beta Computer Mouse Move Config ### Beta Computer Right Click Config ### Beta Computer Screenshot Config ### Beta Computer Scroll Config ### Beta Computer Toolset 20260801 ### Beta Computer Toolset Configs ### Beta Computer Triple Click Config ### Beta Computer Type Config ### Beta Computer Wait Config ### Beta Computer Zoom Config ### Beta Image Transformations Param ### Beta Managed Agents Service Account Actor ### Beta Deleted File ### Beta File Metadata ### Beta Output Behavior ### Beta Output Behavior Create New ### Beta Output Behavior Update Existing ### Beta Mid Conversation System Block Param ### Deleted File ### File Metadata

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

Nothing in the body moved in this read. What changed is above.

api/beta-headers Changed · +10 / -10 lines

from line 24
2424 
2525Each feature's documentation states the exact beta name to send. The [API overview](https://platform.claude.com/docs/en/api/overview) lists the APIs currently in beta.
2626 
27The following examples show the same request with cURL, the `ant` CLI, and the SDKs. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you:
27The following examples show the same request with cURL, the `ant` CLI, and the SDKs, using the [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing) beta as the example. The SDKs take beta names in the `betas` parameter and send the `anthropic-beta` header for you:
2828 
2929<CodeGroup>
3030 ```bash cURL
from line 31
3131 curl https://api.anthropic.com/v1/messages \
3232 -H "x-api-key: $ANTHROPIC_API_KEY" \
3333 -H "anthropic-version: 2023-06-01" \
34 -H "anthropic-beta: files-api-2025-04-14" \
34 -H "anthropic-beta: context-management-2025-06-27" \
3535 -H "content-type: application/json" \
3636 -d '{
3737 "model": "claude-opus-5",
from line 44
4444 
4545 ```bash CLI
4646 ant beta:messages create \
47 --beta files-api-2025-04-14 \
47 --beta context-management-2025-06-27 \
4848 --model claude-opus-5 \
4949 --max-tokens 1024 \
5050 --message '{role: user, content: "Hello, Claude"}'
from line 57
5757 model="claude-opus-5",
5858 max_tokens=1024,
5959 messages=[{"role": "user", "content": "Hello, Claude"}],
60 betas=["files-api-2025-04-14"],
60 betas=["context-management-2025-06-27"],
6161 )
6262 
6363 print(response.content)
from line 70
7070 model: "claude-opus-5",
7171 max_tokens: 1024,
7272 messages: [{ role: "user", content: "Hello, Claude" }],
73 betas: ["files-api-2025-04-14"]
73 betas: ["context-management-2025-06-27"]
7474 });
7575 
7676 console.log(msg.content);
from line 85
8585 Model = "claude-opus-5",
8686 MaxTokens = 1024,
8787 Messages = [new() { Role = Role.User, Content = "Hello, Claude" }],
88 Betas = ["files-api-2025-04-14"],
88 Betas = ["context-management-2025-06-27"],
8989 }
9090 );
9191 
from line 101
101101 Messages: []anthropic.BetaMessageParam{
102102 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Hello, Claude")),
103103 },
104 Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaFilesAPI2025_04_14},
104 Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaContextManagement2025_06_27},
105105 })
106106 if err != nil {
107107 panic(err)
from line 117
117117 .model(Model.CLAUDE_OPUS_5)
118118 .maxTokens(1024)
119119 .addUserMessage("Hello, Claude")
120 .addBeta(AnthropicBeta.FILES_API_2025_04_14)
120 .addBeta(AnthropicBeta.CONTEXT_MANAGEMENT_2025_06_27)
121121 .build();
122122 
123123 BetaMessage message = client.beta().messages().create(params);
from line 131
131131 maxTokens: 1024,
132132 messages: [['role' => 'user', 'content' => 'Hello, Claude']],
133133 model: 'claude-opus-5',
134 betas: ['files-api-2025-04-14'],
134 betas: ['context-management-2025-06-27'],
135135 );
136136 
137137 echo $message;
from line 144
144144 model: "claude-opus-5",
145145 max_tokens: 1024,
146146 messages: [{role: "user", content: "Hello, Claude"}],
147 betas: ["files-api-2025-04-14"]
147 betas: ["context-management-2025-06-27"]
148148 )
149149 
150150 puts(message.content)

api/beta/agents Changed · +27 / -15 lines

from line 19
1919 
2020 - `string`
2121 
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2323 
2424 - `"message-batches-2024-09-24"`
2525 
from line 65
6565 
6666 - `"user-profiles-2026-03-24"`
6767 
68 - `"user-profiles-2026-08-18"`
69 
6870 - `"advisor-tool-2026-03-01"`
6971 
7072 - `"managed-agents-2026-04-01"`
from line 93
9193 
9294- `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
9395 
94 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control
96 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control
9597 
9698 - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
9799 
from line 904
902904 -H 'anthropic-beta: managed-agents-2026-04-01' \
903905 -H "X-Api-Key: $ANTHROPIC_API_KEY" \
904906 -d '{
905 "model": "claude-sonnet-4-6",
907 "model": "claude-opus-5",
906908 "name": "My First Agent",
907909 "description": "A general-purpose starter agent.",
908910 "metadata": {
from line 938
936938 "foo": "bar"
937939 },
938940 "model": {
939 "id": "claude-sonnet-4-6",
941 "id": "claude-opus-5",
940942 "effort": {
941943 "type": "low"
942944 },
from line 1031
10291031 
10301032 - `string`
10311033 
1032 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
1034 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
10331035 
10341036 - `"message-batches-2024-09-24"`
10351037 
from line 1077
10751077 
10761078 - `"user-profiles-2026-03-24"`
10771079 
1080 - `"user-profiles-2026-08-18"`
1081 
10781082 - `"advisor-tool-2026-03-01"`
10791083 
10801084 - `"managed-agents-2026-04-01"`
from line 1507
15031507 "foo": "bar"
15041508 },
15051509 "model": {
1506 "id": "claude-sonnet-4-6",
1510 "id": "claude-opus-5",
15071511 "effort": {
15081512 "type": "low"
15091513 },
from line 1591
15871591 
15881592 - `string`
15891593 
1590 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
1594 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
15911595 
15921596 - `"message-batches-2024-09-24"`
15931597 
from line 1637
16331637 
16341638 - `"user-profiles-2026-03-24"`
16351639 
1640 - `"user-profiles-2026-08-18"`
1641 
16361642 - `"advisor-tool-2026-03-01"`
16371643 
16381644 - `"managed-agents-2026-04-01"`
from line 2061
20552061 "foo": "bar"
20562062 },
20572063 "model": {
2058 "id": "claude-sonnet-4-6",
2064 "id": "claude-opus-5",
20592065 "effort": {
20602066 "type": "low"
20612067 },
from line 2136
21302136 
21312137 - `string`
21322138 
2133 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
2139 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
21342140 
21352141 - `"message-batches-2024-09-24"`
21362142 
from line 2182
21762182 
21772183 - `"user-profiles-2026-03-24"`
21782184 
2185 - `"user-profiles-2026-08-18"`
2186 
21792187 - `"advisor-tool-2026-03-01"`
21802188 
21812189 - `"managed-agents-2026-04-01"`
from line 2234
22262234 
22272235- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
22282236 
2229 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
2237 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
22302238 
22312239 - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
22322240 
from line 3050
30423050 "foo": "bar"
30433051 },
30443052 "model": {
3045 "id": "claude-sonnet-4-6",
3053 "id": "claude-opus-5",
30463054 "effort": {
30473055 "type": "low"
30483056 },
from line 3125
31173125 
31183126 - `string`
31193127 
3120 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
3128 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
31213129 
31223130 - `"message-batches-2024-09-24"`
31233131 
from line 3171
31633171 
31643172 - `"user-profiles-2026-03-24"`
31653173 
3174 - `"user-profiles-2026-08-18"`
3175 
31663176 - `"advisor-tool-2026-03-01"`
31673177 
31683178 - `"managed-agents-2026-04-01"`
from line 3596
35863596 "foo": "bar"
35873597 },
35883598 "model": {
3589 "id": "claude-sonnet-4-6",
3599 "id": "claude-opus-5",
35903600 "effort": {
35913601 "type": "low"
35923602 },
from line 5779
57695779 
57705780 - `string`
57715781 
5772 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
5782 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
57735783 
57745784 - `"message-batches-2024-09-24"`
57755785 
from line 5825
58155825 
58165826 - `"user-profiles-2026-03-24"`
58175827 
5828 - `"user-profiles-2026-08-18"`
5829 
58185830 - `"advisor-tool-2026-03-01"`
58195831 
58205832 - `"managed-agents-2026-04-01"`
from line 6255
62436255 "foo": "bar"
62446256 },
62456257 "model": {
6246 "id": "claude-sonnet-4-6",
6258 "id": "claude-opus-5",
62476259 "effort": {
62486260 "type": "low"
62496261 },

api/beta/agents/archive Changed · +4 / -2 lines

from line 21
2121 
2222 - `string`
2323 
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2525 
2626 - `"message-batches-2024-09-24"`
2727 
from line 67
6767 
6868 - `"user-profiles-2026-03-24"`
6969 
70 - `"user-profiles-2026-08-18"`
71 
7072 - `"advisor-tool-2026-03-01"`
7173 
7274 - `"managed-agents-2026-04-01"`
from line 492
490492 "foo": "bar"
491493 },
492494 "model": {
493 "id": "claude-sonnet-4-6",
495 "id": "claude-opus-5",
494496 "effort": {
495497 "type": "low"
496498 },

api/beta/agents/create Changed · +6 / -4 lines

from line 17
1717 
1818 - `string`
1919 
20 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
20 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2121 
2222 - `"message-batches-2024-09-24"`
2323 
from line 63
6363 
6464 - `"user-profiles-2026-03-24"`
6565 
66 - `"user-profiles-2026-08-18"`
67 
6668 - `"advisor-tool-2026-03-01"`
6769 
6870 - `"managed-agents-2026-04-01"`
from line 91
8991 
9092- `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
9193 
92 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control
94 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control
9395 
9496 - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
9597 
from line 902
900902 -H 'anthropic-beta: managed-agents-2026-04-01' \
901903 -H "X-Api-Key: $ANTHROPIC_API_KEY" \
902904 -d '{
903 "model": "claude-sonnet-4-6",
905 "model": "claude-opus-5",
904906 "name": "My First Agent",
905907 "description": "A general-purpose starter agent.",
906908 "metadata": {
from line 936
934936 "foo": "bar"
935937 },
936938 "model": {
937 "id": "claude-sonnet-4-6",
939 "id": "claude-opus-5",
938940 "effort": {
939941 "type": "low"
940942 },

api/beta/agents/list Changed · +4 / -2 lines

from line 39
3939 
4040 - `string`
4141 
42 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
42 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
4343 
4444 - `"message-batches-2024-09-24"`
4545 
from line 85
8585 
8686 - `"user-profiles-2026-03-24"`
8787 
88 - `"user-profiles-2026-08-18"`
89 
8890 - `"advisor-tool-2026-03-01"`
8991 
9092 - `"managed-agents-2026-04-01"`
from line 515
513515 "foo": "bar"
514516 },
515517 "model": {
516 "id": "claude-sonnet-4-6",
518 "id": "claude-opus-5",
517519 "effort": {
518520 "type": "low"
519521 },

api/beta/agents/retrieve Changed · +4 / -2 lines

from line 27
2727 
2828 - `string`
2929 
30 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
30 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
3131 
3232 - `"message-batches-2024-09-24"`
3333 
from line 73
7373 
7474 - `"user-profiles-2026-03-24"`
7575 
76 - `"user-profiles-2026-08-18"`
77 
7678 - `"advisor-tool-2026-03-01"`
7779 
7880 - `"managed-agents-2026-04-01"`
from line 497
495497 "foo": "bar"
496498 },
497499 "model": {
498 "id": "claude-sonnet-4-6",
500 "id": "claude-opus-5",
499501 "effort": {
500502 "type": "low"
501503 },

api/beta/agents/update Changed · +5 / -3 lines

from line 21
2121 
2222 - `string`
2323 
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2525 
2626 - `"message-batches-2024-09-24"`
2727 
from line 67
6767 
6868 - `"user-profiles-2026-03-24"`
6969 
70 - `"user-profiles-2026-08-18"`
71 
7072 - `"advisor-tool-2026-03-01"`
7173 
7274 - `"managed-agents-2026-04-01"`
from line 119
117119 
118120- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
119121 
120 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-4-6`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
122 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
121123 
122124 - `BetaManagedAgentsModel = "claude-sonnet-5" or "claude-fable-5" or "claude-opus-5" or 10 more or string`
123125 
from line 935
933935 "foo": "bar"
934936 },
935937 "model": {
936 "id": "claude-sonnet-4-6",
938 "id": "claude-opus-5",
937939 "effort": {
938940 "type": "low"
939941 },

api/beta/agents/versions Changed · +4 / -2 lines

from line 33
3333 
3434 - `string`
3535 
36 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
36 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
3737 
3838 - `"message-batches-2024-09-24"`
3939 
from line 79
7979 
8080 - `"user-profiles-2026-03-24"`
8181 
82 - `"user-profiles-2026-08-18"`
83 
8284 - `"advisor-tool-2026-03-01"`
8385 
8486 - `"managed-agents-2026-04-01"`
from line 509
507509 "foo": "bar"
508510 },
509511 "model": {
510 "id": "claude-sonnet-4-6",
512 "id": "claude-opus-5",
511513 "effort": {
512514 "type": "low"
513515 },

api/beta/agents/versions/list Changed · +4 / -2 lines

from line 31
3131 
3232 - `string`
3333 
34 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
34 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
3535 
3636 - `"message-batches-2024-09-24"`
3737 
from line 77
7777 
7878 - `"user-profiles-2026-03-24"`
7979 
80 - `"user-profiles-2026-08-18"`
81 
8082 - `"advisor-tool-2026-03-01"`
8183 
8284 - `"managed-agents-2026-04-01"`
from line 507
505507 "foo": "bar"
506508 },
507509 "model": {
508 "id": "claude-sonnet-4-6",
510 "id": "claude-opus-5",
509511 "effort": {
510512 "type": "low"
511513 },

api/beta/deployment_runs Changed · +6 / -2 lines

from line 61
6161 
6262 - `string`
6363 
64 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
64 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
6565 
6666 - `"message-batches-2024-09-24"`
6767 
from line 107
107107 
108108 - `"user-profiles-2026-03-24"`
109109 
110 - `"user-profiles-2026-08-18"`
111 
110112 - `"advisor-tool-2026-03-01"`
111113 
112114 - `"managed-agents-2026-04-01"`
from line 450
448450 
449451 - `string`
450452 
451 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
453 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
452454 
453455 - `"message-batches-2024-09-24"`
454456 
from line 495
493495 - `"output-300k-2026-03-24"`
494496 
495497 - `"user-profiles-2026-03-24"`
498 
499 - `"user-profiles-2026-08-18"`
496500 
497501 - `"advisor-tool-2026-03-01"`
498502 

api/beta/deployments Changed · +24 / -8 lines

from line 19
1919 
2020 - `string`
2121 
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2323 
2424 - `"message-batches-2024-09-24"`
2525 
from line 65
6565 
6666 - `"user-profiles-2026-03-24"`
6767 
68 - `"user-profiles-2026-08-18"`
69 
6870 - `"advisor-tool-2026-03-01"`
6971 
7072 - `"managed-agents-2026-04-01"`
from line 1192
11901192 
11911193 - `string`
11921194 
1193 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
1195 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
11941196 
11951197 - `"message-batches-2024-09-24"`
11961198 
from line 1238
12361238 
12371239 - `"user-profiles-2026-03-24"`
12381240 
1241 - `"user-profiles-2026-08-18"`
1242 
12391243 - `"advisor-tool-2026-03-01"`
12401244 
12411245 - `"managed-agents-2026-04-01"`
from line 1927
19231927 
19241928 - `string`
19251929 
1926 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
1930 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
19271931 
19281932 - `"message-batches-2024-09-24"`
19291933 
from line 1973
19691973 
19701974 - `"user-profiles-2026-03-24"`
19711975 
1976 - `"user-profiles-2026-08-18"`
1977 
19721978 - `"advisor-tool-2026-03-01"`
19731979 
19741980 - `"managed-agents-2026-04-01"`
from line 2653
26472653 
26482654 - `string`
26492655 
2650 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
2656 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
26512657 
26522658 - `"message-batches-2024-09-24"`
26532659 
from line 2699
26932699 
26942700 - `"user-profiles-2026-03-24"`
26952701 
2702 - `"user-profiles-2026-08-18"`
2703 
26962704 - `"advisor-tool-2026-03-01"`
26972705 
26982706 - `"managed-agents-2026-04-01"`
from line 3781
37733781 
37743782 - `string`
37753783 
3776 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
3784 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
37773785 
37783786 - `"message-batches-2024-09-24"`
37793787 
from line 3827
38193827 
38203828 - `"user-profiles-2026-03-24"`
38213829 
3830 - `"user-profiles-2026-08-18"`
3831 
38223832 - `"advisor-tool-2026-03-01"`
38233833 
38243834 - `"managed-agents-2026-04-01"`
from line 4508
44984508 
44994509 - `string`
45004510 
4501 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
4511 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
45024512 
45034513 - `"message-batches-2024-09-24"`
45044514 
from line 4554
45444554 
45454555 - `"user-profiles-2026-03-24"`
45464556 
4557 - `"user-profiles-2026-08-18"`
4558 
45474559 - `"advisor-tool-2026-03-01"`
45484560 
45494561 - `"managed-agents-2026-04-01"`
from line 4889
48774889 
48784890 - `string`
48794891 
4880 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
4892 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
48814893 
48824894 - `"message-batches-2024-09-24"`
48834895 
from line 4935
49234935 
49244936 - `"user-profiles-2026-03-24"`
49254937 
4938 - `"user-profiles-2026-08-18"`
4939 
49264940 - `"advisor-tool-2026-03-01"`
49274941 
49284942 - `"managed-agents-2026-04-01"`
from line 5616
56025616 
56035617 - `string`
56045618 
5605 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
5619 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
56065620 
56075621 - `"message-batches-2024-09-24"`
56085622 
from line 5661
56475661 - `"output-300k-2026-03-24"`
56485662 
56495663 - `"user-profiles-2026-03-24"`
5664 
5665 - `"user-profiles-2026-08-18"`
56505666 
56515667 - `"advisor-tool-2026-03-01"`
56525668 

api/beta/dreams Changed · +264 / -39 lines

### Beta Output Behavior ### Beta Output Behavior Create New ### Beta Output Behavior Update Existing

from line 19
1919 
2020 - `string`
2121 
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
22 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2323 
2424 - `"message-batches-2024-09-24"`
2525 
from line 65
6565 
6666 - `"user-profiles-2026-03-24"`
6767 
68 - `"user-profiles-2026-08-18"`
69 
6870 - `"advisor-tool-2026-03-01"`
6971 
7072 - `"managed-agents-2026-04-01"`
from line 95
9395 
9496 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
9597 
96 An input memory store the dream reads from. The dream never mutates this store.
98 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
9799 
98100 - `memory_store_id: string`
99101 
from line 125
123125 
124126 - `id: string`
125127 
126 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
128 Model identifier, e.g. "claude-opus-5". 1-256 characters.
127129 
128130 - `speed: optional "standard" or "fast" or null`
129131 
from line 137
135137 
136138- `instructions: optional string or null`
137139 
140- `output_behavior: optional BetaOutputBehavior`
141 
142 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
143 
144 - `BetaOutputBehaviorCreateNew object { type }`
145 
146 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
147 
148 - `type: "create_new"`
149 
150 - `"create_new"`
151 
152 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
153 
154 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
155 
156 - `memory_store_id: string`
157 
158 - `type: "update_existing"`
159 
160 - `"update_existing"`
161 
138162### Returns
139163 
140- `BetaDream object { id, archived_at, created_at, 10 more }`
164- `BetaDream object { id, archived_at, created_at, 11 more }`
141165 
142 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
166 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
143167 
144168 - `id: string`
145169 
from line 191
167191 
168192 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
169193 
170 An input memory store the dream reads from. The dream never mutates this store.
194 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
171195 
172196 - `memory_store_id: string`
173197 
from line 217
193217 
194218 - `id: string`
195219 
196 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
220 Model identifier, e.g. "claude-opus-5". 1-256 characters.
197221 
198222 - `speed: optional "standard" or "fast"`
199223 
from line 227
203227 
204228 - `"fast"`
205229 
230 - `output_behavior: BetaOutputBehavior`
231 
232 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
233 
234 - `BetaOutputBehaviorCreateNew object { type }`
235 
236 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
237 
238 - `type: "create_new"`
239 
240 - `"create_new"`
241 
242 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
243 
244 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
245 
246 - `memory_store_id: string`
247 
248 - `type: "update_existing"`
249 
250 - `"update_existing"`
251 
206252 - `outputs: array of BetaDreamOutput`
207253 
208254 - `memory_store_id: string`
from line 339
293339 "id": "x",
294340 "speed": "standard"
295341 },
342 "output_behavior": {
343 "type": "create_new"
344 },
296345 "outputs": [
297346 {
298347 "memory_store_id": "memory_store_id",
from line 410
361410 
362411 - `string`
363412 
364 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
413 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
365414 
366415 - `"message-batches-2024-09-24"`
367416 
from line 456
407456 
408457 - `"user-profiles-2026-03-24"`
409458 
459 - `"user-profiles-2026-08-18"`
460 
410461 - `"advisor-tool-2026-03-01"`
411462 
412463 - `"managed-agents-2026-04-01"`
from line 510
459510 
460511 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
461512 
462 An input memory store the dream reads from. The dream never mutates this store.
513 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
463514 
464515 - `memory_store_id: string`
465516 
from line 536
485536 
486537 - `id: string`
487538 
488 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
539 Model identifier, e.g. "claude-opus-5". 1-256 characters.
489540 
490541 - `speed: optional "standard" or "fast"`
491542 
from line 546
495546 
496547 - `"fast"`
497548 
549 - `output_behavior: BetaOutputBehavior`
550 
551 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
552 
553 - `BetaOutputBehaviorCreateNew object { type }`
554 
555 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
556 
557 - `type: "create_new"`
558 
559 - `"create_new"`
560 
561 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
562 
563 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
564 
565 - `memory_store_id: string`
566 
567 - `type: "update_existing"`
568 
569 - `"update_existing"`
570 
498571 - `outputs: array of BetaDreamOutput`
499572 
500573 - `memory_store_id: string`
from line 652
579652 "id": "x",
580653 "speed": "standard"
581654 },
655 "output_behavior": {
656 "type": "create_new"
657 },
582658 "outputs": [
583659 {
584660 "memory_store_id": "memory_store_id",
from line 694
618694 
619695 - `string`
620696 
621 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
697 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
622698 
623699 - `"message-batches-2024-09-24"`
624700 
from line 740
664740 
665741 - `"user-profiles-2026-03-24"`
666742 
743 - `"user-profiles-2026-08-18"`
744 
667745 - `"advisor-tool-2026-03-01"`
668746 
669747 - `"managed-agents-2026-04-01"`
from line 766
688766 
689767### Returns
690768 
691- `BetaDream object { id, archived_at, created_at, 10 more }`
769- `BetaDream object { id, archived_at, created_at, 11 more }`
692770 
693 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
771 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
694772 
695773 - `id: string`
696774 
from line 796
718796 
719797 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
720798 
721 An input memory store the dream reads from. The dream never mutates this store.
799 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
722800 
723801 - `memory_store_id: string`
724802 
from line 822
744822 
745823 - `id: string`
746824 
747 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
825 Model identifier, e.g. "claude-opus-5". 1-256 characters.
748826 
749827 - `speed: optional "standard" or "fast"`
750828 
from line 832
754832 
755833 - `"fast"`
756834 
835 - `output_behavior: BetaOutputBehavior`
836 
837 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
838 
839 - `BetaOutputBehaviorCreateNew object { type }`
840 
841 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
842 
843 - `type: "create_new"`
844 
845 - `"create_new"`
846 
847 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
848 
849 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
850 
851 - `memory_store_id: string`
852 
853 - `type: "update_existing"`
854 
855 - `"update_existing"`
856 
757857 - `outputs: array of BetaDreamOutput`
758858 
759859 - `memory_store_id: string`
from line 934
834934 "id": "x",
835935 "speed": "standard"
836936 },
937 "output_behavior": {
938 "type": "create_new"
939 },
837940 "outputs": [
838941 {
839942 "memory_store_id": "memory_store_id",
from line 973
870973 
871974 - `string`
872975 
873 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
976 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
874977 
875978 - `"message-batches-2024-09-24"`
876979 
from line 1019
9161019 
9171020 - `"user-profiles-2026-03-24"`
9181021 
1022 - `"user-profiles-2026-08-18"`
1023 
9191024 - `"advisor-tool-2026-03-01"`
9201025 
9211026 - `"managed-agents-2026-04-01"`
from line 1045
9401045 
9411046### Returns
9421047 
943- `BetaDream object { id, archived_at, created_at, 10 more }`
1048- `BetaDream object { id, archived_at, created_at, 11 more }`
9441049 
945 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
1050 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
9461051 
9471052 - `id: string`
9481053 
from line 1075
9701075 
9711076 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
9721077 
973 An input memory store the dream reads from. The dream never mutates this store.
1078 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
9741079 
9751080 - `memory_store_id: string`
9761081 
from line 1101
9961101 
9971102 - `id: string`
9981103 
999 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
1104 Model identifier, e.g. "claude-opus-5". 1-256 characters.
10001105 
10011106 - `speed: optional "standard" or "fast"`
10021107 
from line 1111
10061111 
10071112 - `"fast"`
10081113 
1114 - `output_behavior: BetaOutputBehavior`
1115 
1116 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1117 
1118 - `BetaOutputBehaviorCreateNew object { type }`
1119 
1120 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1121 
1122 - `type: "create_new"`
1123 
1124 - `"create_new"`
1125 
1126 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
1127 
1128 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
1129 
1130 - `memory_store_id: string`
1131 
1132 - `type: "update_existing"`
1133 
1134 - `"update_existing"`
1135 
10091136 - `outputs: array of BetaDreamOutput`
10101137 
10111138 - `memory_store_id: string`
from line 1214
10871214 "id": "x",
10881215 "speed": "standard"
10891216 },
1217 "output_behavior": {
1218 "type": "create_new"
1219 },
10901220 "outputs": [
10911221 {
10921222 "memory_store_id": "memory_store_id",
from line 1253
11231253 
11241254 - `string`
11251255 
1126 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
1256 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
11271257 
11281258 - `"message-batches-2024-09-24"`
11291259 
from line 1299
11691299 
11701300 - `"user-profiles-2026-03-24"`
11711301 
1302 - `"user-profiles-2026-08-18"`
1303 
11721304 - `"advisor-tool-2026-03-01"`
11731305 
11741306 - `"managed-agents-2026-04-01"`
from line 1325
11931325 
11941326### Returns
11951327 
1196- `BetaDream object { id, archived_at, created_at, 10 more }`
1328- `BetaDream object { id, archived_at, created_at, 11 more }`
11971329 
1198 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
1330 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
11991331 
12001332 - `id: string`
12011333 
from line 1355
12231355 
12241356 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
12251357 
1226 An input memory store the dream reads from. The dream never mutates this store.
1358 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
12271359 
12281360 - `memory_store_id: string`
12291361 
from line 1381
12491381 
12501382 - `id: string`
12511383 
1252 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
1384 Model identifier, e.g. "claude-opus-5". 1-256 characters.
12531385 
12541386 - `speed: optional "standard" or "fast"`
12551387 
from line 1391
12591391 
12601392 - `"fast"`
12611393 
1394 - `output_behavior: BetaOutputBehavior`
1395 
1396 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1397 
1398 - `BetaOutputBehaviorCreateNew object { type }`
1399 
1400 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1401 
1402 - `type: "create_new"`
1403 
1404 - `"create_new"`
1405 
1406 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
1407 
1408 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
1409 
1410 - `memory_store_id: string`
1411 
1412 - `type: "update_existing"`
1413 
1414 - `"update_existing"`
1415 
12621416 - `outputs: array of BetaDreamOutput`
12631417 
12641418 - `memory_store_id: string`
from line 1494
13401494 "id": "x",
13411495 "speed": "standard"
13421496 },
1497 "output_behavior": {
1498 "type": "create_new"
1499 },
13431500 "outputs": [
13441501 {
13451502 "memory_store_id": "memory_store_id",
from line 1519
13621519 
13631520### Beta Dream
13641521 
1365- `BetaDream object { id, archived_at, created_at, 10 more }`
1522- `BetaDream object { id, archived_at, created_at, 11 more }`
13661523 
1367 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
1524 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
13681525 
13691526 - `id: string`
13701527 
from line 1549
13921549 
13931550 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
13941551 
1395 An input memory store the dream reads from. The dream never mutates this store.
1552 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
13961553 
13971554 - `memory_store_id: string`
13981555 
from line 1575
14181575 
14191576 - `id: string`
14201577 
1421 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
1578 Model identifier, e.g. "claude-opus-5". 1-256 characters.
14221579 
14231580 - `speed: optional "standard" or "fast"`
14241581 
from line 1585
14281585 
14291586 - `"fast"`
14301587 
1588 - `output_behavior: BetaOutputBehavior`
1589 
1590 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1591 
1592 - `BetaOutputBehaviorCreateNew object { type }`
1593 
1594 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1595 
1596 - `type: "create_new"`
1597 
1598 - `"create_new"`
1599 
1600 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
1601 
1602 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
1603 
1604 - `memory_store_id: string`
1605 
1606 - `type: "update_existing"`
1607 
1608 - `"update_existing"`
1609 
14311610 - `outputs: array of BetaDreamOutput`
14321611 
14331612 - `memory_store_id: string`
from line 1669
14901669 
14911670- `BetaDreamInput = BetaDreamMemoryStoreInput or BetaDreamSessionsInput`
14921671 
1493 An input memory store the dream reads from. The dream never mutates this store.
1672 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
14941673 
14951674 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
14961675 
1497 An input memory store the dream reads from. The dream never mutates this store.
1676 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
14981677 
14991678 - `memory_store_id: string`
15001679 
from line 1695
15161695 
15171696- `BetaDreamMemoryStoreInput object { memory_store_id, type }`
15181697 
1519 An input memory store the dream reads from. The dream never mutates this store.
1698 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
15201699 
15211700 - `memory_store_id: string`
15221701 
from line 1723
15441723 
15451724 - `id: string`
15461725 
1547 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
1726 Model identifier, e.g. "claude-opus-5". 1-256 characters.
15481727 
15491728 - `speed: optional "standard" or "fast"`
15501729 
from line 1741
15621741 
15631742 - `id: string`
15641743 
1565 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
1744 Model identifier, e.g. "claude-opus-5". 1-256 characters.
15661745 
15671746 - `speed: optional "standard" or "fast" or null`
15681747 
from line 1812
16331812 - `output_tokens: number`
16341813 
16351814 Total output tokens generated across every pipeline stage.
1815 
1816### Beta Output Behavior
1817 
1818- `BetaOutputBehavior = BetaOutputBehaviorCreateNew or BetaOutputBehaviorUpdateExisting`
1819 
1820 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1821 
1822 - `BetaOutputBehaviorCreateNew object { type }`
1823 
1824 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1825 
1826 - `type: "create_new"`
1827 
1828 - `"create_new"`
1829 
1830 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
1831 
1832 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
1833 
1834 - `memory_store_id: string`
1835 
1836 - `type: "update_existing"`
1837 
1838 - `"update_existing"`
1839 
1840### Beta Output Behavior Create New
1841 
1842- `BetaOutputBehaviorCreateNew object { type }`
1843 
1844 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
1845 
1846 - `type: "create_new"`
1847 
1848 - `"create_new"`
1849 
1850### Beta Output Behavior Update Existing
1851 
1852- `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
1853 
1854 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
1855 
1856 - `memory_store_id: string`
1857 
1858 - `type: "update_existing"`
1859 
1860 - `"update_existing"`
16361861 

api/beta/dreams/archive Changed · +33 / -6 lines

from line 21
2121 
2222 - `string`
2323 
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2525 
2626 - `"message-batches-2024-09-24"`
2727 
from line 67
6767 
6868 - `"user-profiles-2026-03-24"`
6969 
70 - `"user-profiles-2026-08-18"`
71 
7072 - `"advisor-tool-2026-03-01"`
7173 
7274 - `"managed-agents-2026-04-01"`
from line 93
9193 
9294### Returns
9395 
94- `BetaDream object { id, archived_at, created_at, 10 more }`
96- `BetaDream object { id, archived_at, created_at, 11 more }`
9597 
96 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
98 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
9799 
98100 - `id: string`
99101 
from line 123
121123 
122124 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
123125 
124 An input memory store the dream reads from. The dream never mutates this store.
126 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
125127 
126128 - `memory_store_id: string`
127129 
from line 149
147149 
148150 - `id: string`
149151 
150 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
152 Model identifier, e.g. "claude-opus-5". 1-256 characters.
151153 
152154 - `speed: optional "standard" or "fast"`
153155 
from line 159
157159 
158160 - `"fast"`
159161 
162 - `output_behavior: BetaOutputBehavior`
163 
164 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
165 
166 - `BetaOutputBehaviorCreateNew object { type }`
167 
168 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
169 
170 - `type: "create_new"`
171 
172 - `"create_new"`
173 
174 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
175 
176 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
177 
178 - `memory_store_id: string`
179 
180 - `type: "update_existing"`
181 
182 - `"update_existing"`
183 
160184 - `outputs: array of BetaDreamOutput`
161185 
162186 - `memory_store_id: string`
from line 261
237261 "model": {
238262 "id": "x",
239263 "speed": "standard"
264 },
265 "output_behavior": {
266 "type": "create_new"
240267 },
241268 "outputs": [
242269 {

api/beta/dreams/cancel Changed · +33 / -6 lines

from line 21
2121 
2222 - `string`
2323 
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 30 more`
24 - `"message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 31 more`
2525 
2626 - `"message-batches-2024-09-24"`
2727 
from line 67
6767 
6868 - `"user-profiles-2026-03-24"`
6969 
70 - `"user-profiles-2026-08-18"`
71 
7072 - `"advisor-tool-2026-03-01"`
7173 
7274 - `"managed-agents-2026-04-01"`
from line 93
9193 
9294### Returns
9395 
94- `BetaDream object { id, archived_at, created_at, 10 more }`
96- `BetaDream object { id, archived_at, created_at, 11 more }`
9597 
96 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into a new output memory store. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
98 An asynchronous memory-consolidation job that reads a memory store plus a set of session transcripts and writes consolidated memories into an output memory store — a new store by default, or an existing store chosen via output_behavior. The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
9799 
98100 - `id: string`
99101 
from line 123
121123 
122124 - `BetaDreamMemoryStoreInput object { memory_store_id, type }`
123125 
124 An input memory store the dream reads from. The dream never mutates this store.
126 An input memory store the dream reads from. The dream never mutates this store unless it is also the destination: with output_behavior {type: "update_existing"} the job consolidates this store in place.
125127 
126128 - `memory_store_id: string`
127129 
from line 149
147149 
148150 - `id: string`
149151 
150 Model identifier, e.g. "claude-opus-4-7". 1-256 characters.
152 Model identifier, e.g. "claude-opus-5". 1-256 characters.
151153 
152154 - `speed: optional "standard" or "fast"`
153155 
from line 159
157159 
158160 - `"fast"`
159161 
162 - `output_behavior: BetaOutputBehavior`
163 
164 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
165 
166 - `BetaOutputBehaviorCreateNew object { type }`
167 
168 The default destination: the job creates a new output memory store as a clone of the memory_store input and writes the consolidated memories into it. The input store is never mutated.
169 
170 - `type: "create_new"`
171 
172 - `"create_new"`
173 
174 - `BetaOutputBehaviorUpdateExisting object { memory_store_id, type }`
175 
176 The job writes the consolidated memories into this existing memory store instead of creating one. In EAP the store must be the job's own memory_store input, so the job consolidates the store in place.
177 
178 - `memory_store_id: string`
179 
180 - `type: "update_existing"`
181 
182 - `"update_existing"`
183 
160184 - `outputs: array of BetaDreamOutput`
161185 
162186 - `memory_store_id: string`
from line 261
237261 "model": {
238262 "id": "x",
239263 "speed": "standard"
264 },
265 "output_behavior": {
266 "type": "create_new"
240267 },
241268 "outputs": [
242269 {
Feedback