One read of Claude Developer Platformapi-20261013T230720Z
19 pages moved out of 760 read.
Pages moved
19
significant first
Pages read
760
in this capture
Captured
23:07 UTC
Corpus hash
47d8bf5ab817
corpus-hash
What this read moved
1-19 of 19about-claude/pricing Changed · +15 / -15 lines
from line 443
443443
444444### Worked example
445445
446A one-hour coding session using Claude Opus 5 that consumes 50,000 input tokens and 15,000 output tokens:
446A one-hour coding session using Claude Opus 5.5 that consumes 50,000 input tokens and 15,000 output tokens:
447447
448| Line item | Calculation | Cost |
449| --------------- | ------------------------ | ---------- |
450| Input tokens | 50,000 × $5 / 1,000,000 | $0.25 |
451| Output tokens | 15,000 × $25 / 1,000,000 | $0.375 |
452| Session runtime | 1.0 hour × $0.08 | $0.08 |
453| **Total** | | **$0.705** |
448| Line item | Calculation | Cost |
449| --------------- | ------------------------ | --------- |
450| Input tokens | 50,000 × $4 / 1,000,000 | $0.20 |
451| Output tokens | 15,000 × $20 / 1,000,000 | $0.30 |
452| Session runtime | 1.0 hour × $0.08 | $0.08 |
453| **Total** | | **$0.58** |
454454
455455If prompt caching is active and 40,000 of the input tokens are cache reads:
456456
457| Line item | Calculation | Cost |
458| --------------------- | ----------------------------- | ---------- |
459| Uncached input tokens | 10,000 × $5 / 1,000,000 | $0.05 |
460| Cache read tokens | 40,000 × $5 × 0.1 / 1,000,000 | $0.02 |
461| Output tokens | 15,000 × $25 / 1,000,000 | $0.375 |
462| Session runtime | 1.0 hour × $0.08 | $0.08 |
463| **Total** | | **$0.525** |
457| Line item | Calculation | Cost |
458| --------------------- | ------------------------------ | ---------- |
459| Uncached input tokens | 10,000 × $4 / 1,000,000 | $0.04 |
460| Cache read tokens | 40,000 × $4 × 0.05 / 1,000,000 | $0.008 |
461| Output tokens | 15,000 × $20 / 1,000,000 | $0.30 |
462| Session runtime | 1.0 hour × $0.08 | $0.08 |
463| **Total** | | **$0.428** |
464464
465465## Additional pricing considerations
466466
about-claude/use-case-guides/legal-summarization Changed · +10 / -16 lines
from line 89
8989
9090### Select the right Claude model
9191
92Model accuracy is extremely important when summarizing legal documents. Claude Opus 5 is an excellent choice for use cases such as this where high accuracy is required. If the size and quantity of your documents is large such that costs start to become a concern, you can also try using a smaller model such as Claude Haiku 5.5.
92Model accuracy is extremely important when summarizing legal documents. Claude Opus 5.5 is an excellent choice for use cases such as this where high accuracy is required. If the size and quantity of your documents is large such that costs start to become a concern, you can also try using a smaller model such as Claude Haiku 5.5.
9393
9494To help estimate these costs, the following is a comparison of the cost to summarize 1,000 sublease agreements using Opus and Haiku models:
9595
from line 101
101101
102102* **Estimated tokens**
103103
104 * Input tokens: 108M, about 108,000 per agreement (about 1 token per 2.8 characters, the rate all three models showed on this guide's sample agreement)
105 * Output tokens per summary, including any thinking tokens, which are billed as output: about 4,800 on Claude Opus 5, 2,000 on Claude Opus 4.8, and 3,100 on Claude Haiku 5.5
106 * Total output tokens: 4.8M on Claude Opus 5, 2.0M on Claude Opus 4.8, and 3.1M on Claude Haiku 5.5
104 * Input tokens: 108M, about 108,000 per agreement (about 1 token per 2.8 characters, the rate both models showed on this guide's sample agreement)
105 * Output tokens per summary, including any thinking tokens, which are billed as output: about 6,200 on Claude Opus 5.5 and 3,100 on Claude Haiku 5.5
106 * Total output tokens: 6.2M on Claude Opus 5.5 and 3.1M on Claude Haiku 5.5
107107
108* **Claude Opus 5 estimated cost**
108* **Claude Opus 5.5 estimated cost**
109109
110 * Input token cost: 108 MTok \* $5.00/MTok = $540.00 USD
111 * Output token cost: 4.8 MTok \* $25.00/MTok = $120.00 USD
112 * Total cost: $540.00 + $120.00 = $660.00 USD
113
114* **Claude Opus 4.8 estimated cost**
115
116 * Input token cost: 108 MTok \* $5.00/MTok = $540.00 USD
117 * Output token cost: 2.0 MTok \* $25.00/MTok = $50.00 USD
118 * Total cost: $540.00 + $50.00 = $590.00 USD
110 * Input token cost: 108 MTok \* $4.00/MTok = $432.00 USD
111 * Output token cost: 6.2 MTok \* $20.00/MTok = $124.00 USD
112 * Total cost: $432.00 + $124.00 = $556.00 USD
119113
120114* **Claude Haiku 5.5 estimated cost**, at its prices for prompts over 100,000 tokens
121115
agents-and-tools/tool-use/advisor-tool Changed · +57 / -51 lines
from line 60
6060 {
6161 "type": "advisor_20260301",
6262 "name": "advisor",
63 "model": "claude-opus-5"
63 "model": "claude-opus-5-5"
6464 }
6565 ],
6666 "messages": [{
from line 77
7777 tools:
7878 - type: advisor_20260301
7979 name: advisor
80 model: claude-opus-5
80 model: claude-opus-5-5
8181 messages:
8282 - role: user
8383 content: Build a concurrent worker pool in Go with graceful shutdown.
from line 95
9595 {
9696 "type": "advisor_20260301",
9797 "name": "advisor",
98 "model": "claude-opus-5",
98 "model": "claude-opus-5-5",
9999 }
100100 ],
101101 messages=[
from line 120
120120 {
121121 type: "advisor_20260301",
122122 name: "advisor",
123 model: "claude-opus-5"
123 model: "claude-opus-5-5"
124124 }
125125 ],
126126 messages: [
from line 148
148148 {
149149 new BetaAdvisorTool20260301
150150 {
151 Model = Messages::Model.ClaudeOpus5
151 Model = Messages::Model.ClaudeOpus5_5
152152 }
153153 },
154154 Messages =
from line 174
174174 MaxTokens: 4096,
175175 Tools: []anthropic.BetaToolUnionParam{
176176 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
177 Model: anthropic.ModelClaudeOpus5,
177 Model: anthropic.ModelClaudeOpus5_5,
178178 }},
179179 },
180180 Messages: []anthropic.BetaMessageParam{
from line 203
203203 .model(Model.CLAUDE_SONNET_5)
204204 .maxTokens(4096L)
205205 .addTool(BetaAdvisorTool20260301.builder()
206 .model(Model.CLAUDE_OPUS_5)
206 .model(Model.CLAUDE_OPUS_5_5)
207207 .build())
208208 .addUserMessage("Build a concurrent worker pool in Go with graceful shutdown.")
209209 .addBeta("advisor-tool-2026-03-01")
from line 230
230230 [
231231 'type' => 'advisor_20260301',
232232 'name' => 'advisor',
233 'model' => 'claude-opus-5',
233 'model' => 'claude-opus-5-5',
234234 ],
235235 ],
236236 betas: ['advisor-tool-2026-03-01'],
from line 249
249249 {
250250 type: "advisor_20260301",
251251 name: "advisor",
252 model: "claude-opus-5"
252 model: "claude-opus-5-5"
253253 }
254254 ],
255255 messages: [
from line 265
265265 ```
266266</CodeGroup>
267267
268The response `content` includes an `advisor_tool_result` block carrying the advisor's guidance. With `claude-opus-5` as the advisor, as in this quick start, the block's `content` field is an `advisor_redacted_result` variant (encrypted; the executor reads it server-side, but your client does not). To see the advice text directly in your response, use `claude-opus-4-8` as the advisor model instead, which returns the plaintext `advisor_result` variant. See [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side and which advisor models return which, and [Model compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#model-compatibility) for the full list of valid pairs.
268The response `content` includes an `advisor_tool_result` block carrying the advisor's guidance. With `claude-opus-5-5` as the advisor, as in this quick start, the block's `content` field is an `advisor_redacted_result` variant (encrypted; the executor reads it server-side, but your client does not). To see the advice text directly in your response, use `claude-opus-4-8` as the advisor model instead, which returns the plaintext `advisor_result` variant. See [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side and which advisor models return which, and [Model compatibility](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#model-compatibility) for the full list of valid pairs.
269269
270270## How it works
271271
from line 286
286286| ------------ | -------------- | -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
287287| `type` | string | *required* | Must be `"advisor_20260301"`. |
288288| `name` | string | *required* | Must be `"advisor"`. |
289| `model` | string | *required* | The advisor model ID, such as claude-opus-5. Billed at this model's rates for the sub-inference. |
289| `model` | string | *required* | The advisor model ID, such as claude-opus-5-5. Billed at this model's rates for the sub-inference. |
290290| `max_uses` | integer | unlimited | Maximum number of advisor calls allowed in a single request. Once the executor reaches this cap, further advisor calls return an `advisor_tool_result_error` with `error_code: "max_uses_exceeded"` and the executor continues without further advice. This is a per-request cap, not a per-conversation cap. See [Cost control](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#cost-control) for conversation-level limits. |
291291| `max_tokens` | integer | advisor model's output cap | Caps the advisor's total output (thinking plus text) per call. Minimum 1024. See [Capping advisor output](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#capping-advisor-output). |
292292| `caching` | object \| null | `null` (off) | Enables [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for the advisor's own transcript across calls within a conversation. See [Advisor prompt caching](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#advisor-prompt-caching). |
from line 299
299299
300300### Successful advisor call
301301
302When the advisor is called, a `server_tool_use` block is followed by an `advisor_tool_result` block in the assistant's content. The following example shows the plaintext `advisor_result` variant returned by a Claude Opus 4.8 advisor. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#quick-start) uses Claude Opus 5, which returns the encrypted `advisor_redacted_result` variant instead; see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side.
302When the advisor is called, a `server_tool_use` block is followed by an `advisor_tool_result` block in the assistant's content. The following example shows the plaintext `advisor_result` variant returned by a Claude Opus 4.8 advisor. The [Quick start](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#quick-start) uses Claude Opus 5.5, which returns the encrypted `advisor_redacted_result` variant instead; see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) for both shapes side by side.
303303
304304```json
305305{
from line 361
361361}
362362```
363363
364With `"model": "claude-opus-5"`, the advice is encrypted:
364With `"model": "claude-opus-5-5"`, the advice is encrypted:
365365
366366```json
367367{
from line 411
411411
412412## Multi-turn conversations
413413
414Pass the full assistant content, including `advisor_tool_result` blocks, back to the API on subsequent turns. Round-trip the result blocks verbatim: with a Claude Opus 5 advisor the result block's `content` is the encrypted `advisor_redacted_result` variant, and the server decrypts it and renders the advice into the executor's prompt on the next turn (see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants)). The mechanics are identical for any advisor model.
414Pass the full assistant content, including `advisor_tool_result` blocks, back to the API on subsequent turns. Round-trip the result blocks verbatim: with a Claude Opus 5.5 advisor the result block's `content` is the encrypted `advisor_redacted_result` variant, and the server decrypts it and renders the advice into the executor's prompt on the next turn (see [Result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants)). The mechanics are identical for any advisor model.
415415
416416<CodeGroup exclude="shell">
417417 ```python Python
from line 421
421421 {
422422 "type": "advisor_20260301",
423423 "name": "advisor",
424 "model": "claude-opus-5",
424 "model": "claude-opus-5-5",
425425 }
426426 ]
427427
from line 462
462462 {
463463 type: "advisor_20260301",
464464 name: "advisor",
465 model: "claude-opus-5"
465 model: "claude-opus-5-5"
466466 }
467467 ];
468468
from line 500
500500 using Anthropic.Models.Beta.Messages;
501501 using Messages = Anthropic.Models.Messages;
502502
503 var client = new AnthropicClient();
503 // Advisor calls run a second model inside the request, so allow more than the
504 // C# SDK's default non-streaming timeout, which it sizes from max_tokens.
505 var client = new AnthropicClient { Timeout = TimeSpan.FromMinutes(5) };
504506
505507 var tools = new BetaToolUnion[]
506508 {
507 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5 }
509 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5_5 }
508510 };
509511
510512 var messages = new List<BetaMessageParam>
from line 548
546548
547549 tools := []anthropic.BetaToolUnionParam{
548550 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
549 Model: anthropic.ModelClaudeOpus5,
551 Model: anthropic.ModelClaudeOpus5_5,
550552 }},
551553 }
552554
from line 603
601603
602604 List<BetaToolUnion> tools = List.of(
603605 BetaToolUnion.ofAdvisorTool20260301(
604 BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5).build()));
606 BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5_5).build()));
605607
606608 List<BetaMessageParam> messages = new ArrayList<>();
607609 messages.add(BetaMessageParam.builder()
from line 649
647649 [
648650 'type' => 'advisor_20260301',
649651 'name' => 'advisor',
650 'model' => 'claude-opus-5',
652 'model' => 'claude-opus-5-5',
651653 ],
652654 ];
653655
from line 690
688690 {
689691 type: "advisor_20260301",
690692 name: "advisor",
691 model: "claude-opus-5"
693 model: "claude-opus-5-5"
692694 }
693695 ]
694696
from line 768
766768
767769
768770 tools = [
769 {"type": "advisor_20260301", "name": "advisor", "model": "claude-opus-5"},
771 {
772 "type": "advisor_20260301",
773 "name": "advisor",
774 "model": "claude-opus-5-5",
775 },
770776 # ... your other tools
771777 ]
772778 task = "Build a concurrent worker pool in Go with graceful shutdown."
from line 829
823829 }
824830
825831 const tools: Anthropic.Beta.Messages.BetaToolUnion[] = [
826 { type: "advisor_20260301", name: "advisor", model: "claude-opus-5" }
832 { type: "advisor_20260301", name: "advisor", model: "claude-opus-5-5" }
827833 // ... your other tools
828834 ];
829835 const task = "Build a concurrent worker pool in Go with graceful shutdown.";
from line 901
895901
896902 var tools = new BetaToolUnion[]
897903 {
898 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5 }
904 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5_5 }
899905 // ... your other tools
900906 };
901907 var task = "Build a concurrent worker pool in Go with graceful shutdown.";
from line 976
970976
971977 tools := []anthropic.BetaToolUnionParam{
972978 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
973 Model: anthropic.ModelClaudeOpus5,
979 Model: anthropic.ModelClaudeOpus5_5,
974980 }},
975981 // ... your other tools
976982 }
from line 1069
10631069
10641070 List<BetaToolUnion> tools = List.of(
10651071 BetaToolUnion.ofAdvisorTool20260301(
1066 BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5).build())
1072 BetaAdvisorTool20260301.builder().model(Model.CLAUDE_OPUS_5_5).build())
10671073 // ... your other tools
10681074 );
10691075 String task = "Build a concurrent worker pool in Go with graceful shutdown.";
from line 1149
11431149 }
11441150
11451151 $tools = [
1146 ['type' => 'advisor_20260301', 'name' => 'advisor', 'model' => 'claude-opus-5'],
1152 ['type' => 'advisor_20260301', 'name' => 'advisor', 'model' => 'claude-opus-5-5'],
11471153 // ... your other tools
11481154 ];
11491155 $task = 'Build a concurrent worker pool in Go with graceful shutdown.';
from line 1207
12011207 end
12021208
12031209 tools = [
1204 { type: "advisor_20260301", name: "advisor", model: "claude-opus-5" }
1210 { type: "advisor_20260301", name: "advisor", model: "claude-opus-5-5" }
12051211 # ... your other tools
12061212 ]
12071213 task = "Build a concurrent worker pool in Go with graceful shutdown."
from line 1278
12721278 },
12731279 {
12741280 "type": "advisor_message",
1275 "model": "claude-opus-5",
1281 "model": "claude-opus-5-5",
12761282 "input_tokens": 823,
12771283 "cache_read_input_tokens": 0,
12781284 "cache_creation_input_tokens": 0,
from line 1324
13181324 {
13191325 "type": "advisor_20260301",
13201326 "name": "advisor",
1321 "model": "claude-opus-5",
1327 "model": "claude-opus-5-5",
13221328 "caching": {"type": "ephemeral", "ttl": "5m"},
13231329 }
13241330 ]
from line 1335
13291335 {
13301336 type: "advisor_20260301",
13311337 name: "advisor",
1332 model: "claude-opus-5",
1338 model: "claude-opus-5-5",
13331339 caching: { type: "ephemeral", ttl: "5m" }
13341340 }
13351341 ];
from line 1349
13431349 {
13441350 new BetaAdvisorTool20260301
13451351 {
1346 Model = Messages::Model.ClaudeOpus5,
1352 Model = Messages::Model.ClaudeOpus5_5,
13471353 Caching = new BetaCacheControlEphemeral { Ttl = Ttl.Ttl5m }
13481354 }
13491355 };
from line 1358
13521358 ```go Go
13531359 tools := []anthropic.BetaToolUnionParam{
13541360 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
1355 Model: anthropic.ModelClaudeOpus5,
1361 Model: anthropic.ModelClaudeOpus5_5,
13561362 Caching: anthropic.BetaCacheControlEphemeralParam{TTL: anthropic.BetaCacheControlEphemeralTTLTTL5m},
13571363 }},
13581364 }
from line 1372
13661372
13671373 List<BetaToolUnion> tools = List.of(
13681374 BetaToolUnion.ofAdvisorTool20260301(BetaAdvisorTool20260301.builder()
1369 .model(Model.CLAUDE_OPUS_5)
1375 .model(Model.CLAUDE_OPUS_5_5)
13701376 .caching(BetaCacheControlEphemeral.builder()
13711377 .ttl(BetaCacheControlEphemeral.Ttl.TTL_5M)
13721378 .build())
from line 1384
13781384 [
13791385 'type' => 'advisor_20260301',
13801386 'name' => 'advisor',
1381 'model' => 'claude-opus-5',
1387 'model' => 'claude-opus-5-5',
13821388 'caching' => ['type' => 'ephemeral', 'ttl' => '5m'],
13831389 ],
13841390 ];
from line 1395
13891395 {
13901396 type: "advisor_20260301",
13911397 name: "advisor",
1392 model: "claude-opus-5",
1398 model: "claude-opus-5-5",
13931399 caching: { type: "ephemeral", ttl: "5m" }
13941400 }
13951401 ]
from line 1427
14211427 {
14221428 "type": "advisor_20260301",
14231429 "name": "advisor",
1424 "model": "claude-opus-5",
1430 "model": "claude-opus-5-5",
14251431 },
14261432 {
14271433 "name": "run_bash",
from line 1450
14441450 {
14451451 type: "advisor_20260301",
14461452 name: "advisor",
1447 model: "claude-opus-5"
1453 model: "claude-opus-5-5"
14481454 },
14491455 {
14501456 name: "run_bash",
from line 1471
14651471 var tools = new BetaToolUnion[]
14661472 {
14671473 new BetaWebSearchTool20250305 { MaxUses = 5 },
1468 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5 },
1474 new BetaAdvisorTool20260301 { Model = Messages::Model.ClaudeOpus5_5 },
14691475 new BetaTool
14701476 {
14711477 Name = "run_bash",
from line 1493
14871493 MaxUses: anthropic.Int(5),
14881494 }},
14891495 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
1490 Model: anthropic.ModelClaudeOpus5,
1496 Model: anthropic.ModelClaudeOpus5_5,
14911497 }},
14921498 {OfTool: &anthropic.BetaToolParam{
14931499 Name: "run_bash",
from line 1520
15141520 .maxUses(5L)
15151521 .build()),
15161522 BetaToolUnion.ofAdvisorTool20260301(BetaAdvisorTool20260301.builder()
1517 .model(Model.CLAUDE_OPUS_5)
1523 .model(Model.CLAUDE_OPUS_5_5)
15181524 .build()),
15191525 BetaToolUnion.ofBetaTool(BetaTool.builder()
15201526 .name("run_bash")
from line 1542
15361542 [
15371543 'type' => 'advisor_20260301',
15381544 'name' => 'advisor',
1539 'model' => 'claude-opus-5',
1545 'model' => 'claude-opus-5-5',
15401546 ],
15411547 [
15421548 'name' => 'run_bash',
from line 1565
15591565 {
15601566 type: "advisor_20260301",
15611567 name: "advisor",
1562 model: "claude-opus-5"
1568 model: "claude-opus-5-5"
15631569 },
15641570 {
15651571 name: "run_bash",
from line 1697
16911697 {
16921698 "type": "advisor_20260301",
16931699 "name": "advisor",
1694 "model": "claude-opus-5",
1700 "model": "claude-opus-5-5",
16951701 "max_tokens": 2048,
16961702 }
16971703 ]
from line 1708
17021708 {
17031709 type: "advisor_20260301",
17041710 name: "advisor",
1705 model: "claude-opus-5",
1711 model: "claude-opus-5-5",
17061712 max_tokens: 2048
17071713 }
17081714 ];
from line 1722
17161722 {
17171723 new BetaAdvisorTool20260301
17181724 {
1719 Model = Messages::Model.ClaudeOpus5,
1725 Model = Messages::Model.ClaudeOpus5_5,
17201726 MaxTokens = 2048
17211727 }
17221728 };
from line 1731
17251731 ```go Go
17261732 tools := []anthropic.BetaToolUnionParam{
17271733 {OfAdvisorTool20260301: &anthropic.BetaAdvisorTool20260301Param{
1728 Model: anthropic.ModelClaudeOpus5,
1734 Model: anthropic.ModelClaudeOpus5_5,
17291735 MaxTokens: anthropic.Int(2048),
17301736 }},
17311737 }
from line 1744
17381744
17391745 List<BetaToolUnion> tools = List.of(
17401746 BetaToolUnion.ofAdvisorTool20260301(BetaAdvisorTool20260301.builder()
1741 .model(Model.CLAUDE_OPUS_5)
1747 .model(Model.CLAUDE_OPUS_5_5)
17421748 .maxTokens(2048L)
17431749 .build()));
17441750 ```
from line 1754
17481754 [
17491755 'type' => 'advisor_20260301',
17501756 'name' => 'advisor',
1751 'model' => 'claude-opus-5',
1757 'model' => 'claude-opus-5-5',
17521758 'max_tokens' => 2048,
17531759 ],
17541760 ];
from line 1765
17591765 {
17601766 type: "advisor_20260301",
17611767 name: "advisor",
1762 model: "claude-opus-5",
1768 model: "claude-opus-5-5",
17631769 max_tokens: 2048
17641770 }
17651771 ]
agents-and-tools/tool-use/server-tools Changed · +16 / -16 lines
from line 510
510510 -H "anthropic-version: 2023-06-01" \
511511 -H "content-type: application/json" \
512512 -d '{
513 "model": "claude-opus-4-8",
513 "model": "claude-opus-5-5",
514514 "max_tokens": 1024,
515515 "messages": [
516516 {
from line 538
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).
540540 ant messages create <<'YAML'
541 model: claude-opus-4-8
541 model: claude-opus-5-5
542542 max_tokens: 1024
543543 messages:
544544 - role: user
from line 580
580580 ]
581581
582582 response = client.messages.create(
583 model="claude-opus-4-8", max_tokens=1024, tools=tools, messages=messages
583 model="claude-opus-5-5", max_tokens=1024, tools=tools, messages=messages
584584 )
585585
586586 tool_results = [
from line 598
598598 # A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
599599 # Send back only the client tool_result blocks, with the same tools.
600600 continuation = client.messages.create(
601 model="claude-opus-4-8",
601 model="claude-opus-5-5",
602602 max_tokens=1024,
603603 tools=tools,
604604 messages=[
from line 642
642642 ];
643643
644644 const response = await client.messages.create({
645 model: "claude-opus-4-8",
645 model: "claude-opus-5-5",
646646 max_tokens: 1024,
647647 tools: [webFetchTool, runCommandTool],
648648 messages
from line 664
664664 // A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
665665 // Send back only the client tool_result blocks, with the same tools.
666666 const continuation = await client.messages.create({
667 model: "claude-opus-4-8",
667 model: "claude-opus-5-5",
668668 max_tokens: 1024,
669669 tools: [webFetchTool, runCommandTool],
670670 messages: [
from line 711
711711
712712 var response = await client.Messages.Create(new MessageCreateParams
713713 {
714 Model = Model.ClaudeOpus4_8,
714 Model = Model.ClaudeOpus5_5,
715715 MaxTokens = 1024,
716716 Tools = tools,
717717 Messages = [userMessage]
from line 737
737737 // Send back only the client tool_result blocks, with the same tools.
738738 var continuation = await client.Messages.Create(new MessageCreateParams
739739 {
740 Model = Model.ClaudeOpus4_8,
740 Model = Model.ClaudeOpus5_5,
741741 MaxTokens = 1024,
742742 Tools = tools,
743743 Messages =
from line 785
785785 userMessage := anthropic.NewUserMessage(anthropic.NewTextBlock("Summarize https://example.com/article and run uname -a to tell me what system this is on."))
786786
787787 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
788 Model: anthropic.ModelClaudeOpus4_8,
788 Model: anthropic.ModelClaudeOpus5_5,
789789 MaxTokens: 1024,
790790 Tools: tools,
791791 Messages: []anthropic.MessageParam{userMessage},
from line 807
807807 // A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
808808 // Send back only the client tool_result blocks, with the same tools.
809809 continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
810 Model: anthropic.ModelClaudeOpus4_8,
810 Model: anthropic.ModelClaudeOpus5_5,
811811 MaxTokens: 1024,
812812 Tools: tools,
813813 Messages: []anthropic.MessageParam{
from line 844
844844 String prompt = "Summarize https://example.com/article and run uname -a to tell me what system this is on.";
845845
846846 Message response = client.messages().create(MessageCreateParams.builder()
847 .model(Model.CLAUDE_OPUS_4_8)
847 .model(Model.CLAUDE_OPUS_5_5)
848848 .maxTokens(1024L)
849849 .addTool(WebFetchTool20250910.builder().maxUses(5L).build())
850850 .addTool(runCommandTool)
from line 869
869869 // A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
870870 // Send back only the client tool_result blocks, with the same tools.
871871 Message continuation = client.messages().create(MessageCreateParams.builder()
872 .model(Model.CLAUDE_OPUS_4_8)
872 .model(Model.CLAUDE_OPUS_5_5)
873873 .maxTokens(1024L)
874874 .addTool(WebFetchTool20250910.builder().maxUses(5L).build())
875875 .addTool(runCommandTool)
from line 908
908908 $response = $client->messages->create(
909909 maxTokens: 1024,
910910 messages: [$userMessage],
911 model: 'claude-opus-4-8',
911 model: 'claude-opus-5-5',
912912 tools: $tools,
913913 );
914914
from line 934
934934 ['role' => 'assistant', 'content' => $response->content],
935935 ['role' => 'user', 'content' => $toolResults],
936936 ],
937 model: 'claude-opus-4-8',
937 model: 'claude-opus-5-5',
938938 tools: $tools,
939939 );
940940 // If a web_fetch was deferred, it runs on this request and its
from line 968
968968 }
969969
970970 response = client.messages.create(
971 model: "claude-opus-4-8",
971 model: "claude-opus-5-5",
972972 max_tokens: 1024,
973973 tools: tools,
974974 messages: [user_message]
from line 990
990990 # A server_tool_use block with no result block in this response is not finished; its result arrives in a later response.
991991 # Send back only the client tool_result blocks, with the same tools.
992992 continuation = client.messages.create(
993 model: "claude-opus-4-8",
993 model: "claude-opus-5-5",
994994 max_tokens: 1024,
995995 tools: tools,
996996 messages: [
build-with-claude/prompt-engineering/claude-prompting-best-practices Changed · +9 / -9 lines
from line 589
589589 -H "x-api-key: $ANTHROPIC_API_KEY" \
590590 -H "anthropic-version: 2023-06-01" \
591591 -d '{
592 "model": "claude-opus-4-8",
592 "model": "claude-opus-5-5",
593593 "max_tokens": 16000,
594594 "thinking": {"type": "adaptive"},
595595 "output_config": {"effort": "high"},
from line 614
614614
615615 # After: adaptive thinking with effort
616616 ant messages create <<'YAML'
617 model: claude-opus-4-8
617 model: claude-opus-5-5
618618 max_tokens: 16000
619619 thinking:
620620 type: adaptive
from line 637
637637
638638 # After: adaptive thinking with effort
639639 client.messages.create(
640 model="claude-opus-4-8",
640 model="claude-opus-5-5",
641641 max_tokens=16000,
642642 thinking={"type": "adaptive"},
643643 output_config={"effort": "high"},
from line 656
656656
657657 // After: adaptive thinking with effort
658658 await client.messages.create({
659 model: "claude-opus-4-8",
659 model: "claude-opus-5-5",
660660 max_tokens: 16000,
661661 thinking: { type: "adaptive" },
662662 output_config: { effort: "high" },
from line 677
677677 // After: adaptive thinking with effort
678678 await client.Messages.Create(new MessageCreateParams
679679 {
680 Model = Model.ClaudeOpus4_8,
680 Model = Model.ClaudeOpus5_5,
681681 MaxTokens = 16000,
682682 Thinking = new ThinkingConfigAdaptive(),
683683 OutputConfig = new OutputConfig { Effort = Effort.High },
from line 700
700700
701701 // After: adaptive thinking with effort
702702 client.Messages.New(ctx, anthropic.MessageNewParams{
703 Model: anthropic.ModelClaudeOpus4_8,
703 Model: anthropic.ModelClaudeOpus5_5,
704704 MaxTokens: 16000,
705705 Thinking: anthropic.ThinkingConfigParamUnion{
706706 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 725
725725
726726 // After: adaptive thinking with effort
727727 client.messages().create(MessageCreateParams.builder()
728 .model(Model.CLAUDE_OPUS_4_8)
728 .model(Model.CLAUDE_OPUS_5_5)
729729 .maxTokens(16000L)
730730 .thinking(ThinkingConfigAdaptive.builder().build())
731731 .outputConfig(OutputConfig.builder()
from line 746
746746
747747 // After: adaptive thinking with effort
748748 $client->messages->create(
749 model: 'claude-opus-4-8',
749 model: 'claude-opus-5-5',
750750 maxTokens: 16000,
751751 thinking: ['type' => 'adaptive'],
752752 outputConfig: ['effort' => 'high'],
from line 765
765765
766766 # After: adaptive thinking with effort
767767 client.messages.create(
768 model: "claude-opus-4-8",
768 model: Anthropic::Model::CLAUDE_OPUS_5_5,
769769 max_tokens: 16000,
770770 thinking: { type: "adaptive" },
771771 output_config: { effort: "high" },
build-with-claude/thinking Changed · +22 / -22 lines
from line 70
7070
7171In the table, "at `high` effort or below" means the request works at `low`, `medium`, and `high` effort and returns a 400 error at `xhigh` or `max`.
7272
73On Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, and Claude Haiku 5.5, thinking is already on and needs no configuration. `display` defaults to `"omitted"` on these models, so the thinking text is hidden until you opt in. Opt in with `thinking: {"type": "adaptive", "display": "summarized"}`, which is exactly the following request with the [model string](https://platform.claude.com/docs/en/models/overview) swapped.
73On Claude Opus 5.5, Claude Opus 5, Claude Sonnet 5.5, Claude Sonnet 5, Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, and Claude Haiku 5.5, thinking is already on and needs no configuration. `display` defaults to `"omitted"` on these models, so the thinking text is hidden until you opt in. Opt in with `thinking: {"type": "adaptive", "display": "summarized"}`, as the following examples do.
7474
75On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6, thinking is off until you set `thinking: {type: "adaptive"}`, which lets Claude determine when and how deeply to think based on the request. The following examples do that, set `display: "summarized"` so the thinking text is visible, and use a roomy `max_tokens`:
75On Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, and Claude Sonnet 4.6, thinking is off until you set `thinking: {type: "adaptive"}`, which lets Claude determine when and how deeply to think based on the request. The same request, with the [model string](https://platform.claude.com/docs/en/models/overview) swapped, turns it on there. The following examples set `display: "summarized"` so the thinking text is visible, and use a roomy `max_tokens`:
7676
7777<CodeGroup>
7878 ```bash cURL
from line 81
8181 -H "anthropic-version: 2023-06-01" \
8282 -H "content-type: application/json" \
8383 -d '{
84 "model": "claude-opus-4-8",
84 "model": "claude-opus-5-5",
8585 "max_tokens": 16000,
8686 "thinking": {
8787 "type": "adaptive",
from line 98
9898
9999 ```bash CLI
100100 ant messages create \
101 --model claude-opus-4-8 \
101 --model claude-opus-5-5 \
102102 --max-tokens 16000 \
103103 --thinking '{type: adaptive, display: summarized}' \
104104 --message '{role: user, content: "What is the greatest common divisor of 1071 and 462?"}' \
from line 110
110110 client = anthropic.Anthropic()
111111
112112 response = client.messages.create(
113 model="claude-opus-4-8",
113 model="claude-opus-5-5",
114114 max_tokens=16000,
115115 thinking={"type": "adaptive", "display": "summarized"},
116116 messages=[
from line 133
133133 const client = new Anthropic();
134134
135135 const response = await client.messages.create({
136 model: "claude-opus-4-8",
136 model: "claude-opus-5-5",
137137 max_tokens: 16000,
138138 thinking: {
139139 type: "adaptive",
from line 164
164164
165165 var parameters = new MessageCreateParams
166166 {
167 Model = Model.ClaudeOpus4_8,
167 Model = Model.ClaudeOpus5_5,
168168 MaxTokens = 16000,
169169 Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized },
170170 Messages = [
from line 194
194194 client := anthropic.NewClient()
195195
196196 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
197 Model: anthropic.ModelClaudeOpus4_8,
197 Model: anthropic.ModelClaudeOpus5_5,
198198 MaxTokens: 16000,
199199 Thinking: anthropic.ThinkingConfigParamUnion{
200200 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{
from line 226
226226 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
227227
228228 MessageCreateParams params = MessageCreateParams.builder()
229 .model(Model.CLAUDE_OPUS_4_8)
229 .model(Model.CLAUDE_OPUS_5_5)
230230 .maxTokens(16000L)
231231 .thinking(ThinkingConfigAdaptive.builder()
232232 .display(ThinkingConfigAdaptive.Display.SUMMARIZED)
from line 261
261261 'content' => 'What is the greatest common divisor of 1071 and 462?'
262262 ]
263263 ],
264 model: 'claude-opus-4-8',
264 model: 'claude-opus-5-5',
265265 thinking: ['type' => 'adaptive', 'display' => 'summarized'],
266266 );
267267
from line 281
281281 client = Anthropic::Client.new
282282
283283 message = client.messages.create(
284 model: "claude-opus-4-8",
284 model: "claude-opus-5-5",
285285 max_tokens: 16000,
286286 thinking: {
287287 type: "adaptive",
from line 554
554554 -H "anthropic-version: 2023-06-01" \
555555 -H "content-type: application/json" \
556556 -d '{
557 "model": "claude-opus-4-8",
557 "model": "claude-opus-5-5",
558558 "max_tokens": 16000,
559559 "stream": true,
560560 "thinking": {
from line 572
572572
573573 ```bash CLI
574574 ant messages create \
575 --model claude-opus-4-8 \
575 --model claude-opus-5-5 \
576576 --max-tokens 16000 \
577577 --thinking '{type: adaptive, display: summarized}' \
578578 --message '{role: user, content: "What is the greatest common divisor of 1071 and 462?"}' \
from line 584
584584 client = anthropic.Anthropic()
585585
586586 with client.messages.stream(
587 model="claude-opus-4-8",
587 model="claude-opus-5-5",
588588 max_tokens=16000,
589589 thinking={"type": "adaptive", "display": "summarized"},
590590 messages=[
from line 611
611611 const client = new Anthropic();
612612
613613 const stream = client.messages.stream({
614 model: "claude-opus-4-8",
614 model: "claude-opus-5-5",
615615 max_tokens: 16000,
616616 thinking: { type: "adaptive", display: "summarized" },
617617 messages: [{ role: "user", content: "What is the greatest common divisor of 1071 and 462?" }]
from line 641
641641
642642 var parameters = new MessageCreateParams
643643 {
644 Model = Model.ClaudeOpus4_8,
644 Model = Model.ClaudeOpus5_5,
645645 MaxTokens = 16000,
646646 Thinking = new ThinkingConfigAdaptive { Display = Display.Summarized },
647647 Messages = [new() { Role = Role.User, Content = "What is the greatest common divisor of 1071 and 462?" }]
from line 671
671671 client := anthropic.NewClient()
672672
673673 stream := client.Messages.NewStreaming(context.TODO(), anthropic.MessageNewParams{
674 Model: anthropic.ModelClaudeOpus4_8,
674 Model: anthropic.ModelClaudeOpus5_5,
675675 MaxTokens: 16000,
676676 Thinking: anthropic.ThinkingConfigParamUnion{
677677 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{
from line 709
709709 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
710710
711711 MessageCreateParams params = MessageCreateParams.builder()
712 .model(Model.CLAUDE_OPUS_4_8)
712 .model(Model.CLAUDE_OPUS_5_5)
713713 .maxTokens(16000L)
714714 .thinking(ThinkingConfigAdaptive.builder()
715715 .display(ThinkingConfigAdaptive.Display.SUMMARIZED)
from line 756
756756 messages: [
757757 ['role' => 'user', 'content' => 'What is the greatest common divisor of 1071 and 462?']
758758 ],
759 model: 'claude-opus-4-8',
759 model: 'claude-opus-5-5',
760760 thinking: ['type' => 'adaptive', 'display' => 'summarized'],
761761 );
762762
from line 783
783783 client = Anthropic::Client.new
784784
785785 stream = client.messages.stream(
786 model: "claude-opus-4-8",
786 model: "claude-opus-5-5",
787787 max_tokens: 16000,
788788 # A plain hash like this one takes display:. The typed ThinkingConfigAdaptive class
789789 # spells it display_ (trailing underscore) to avoid shadowing Ruby's Kernel#display.
from line 810
810810<Accordion title="Full streaming event trace">
811811 ```sse Output
812812 event: message_start
813 data: {"type": "message_start", "message": {"id": "msg_01...", "type": "message", "role": "assistant", "content": [], "model": "claude-opus-4-8", "stop_reason": null, "stop_sequence": null}}
813 data: {"type": "message_start", "message": {"id": "msg_01...", "type": "message", "role": "assistant", "content": [], "model": "claude-opus-5-5", "stop_reason": null, "stop_sequence": null}}
814814
815815 event: content_block_start
816816 data: {"type": "content_block_start", "index": 0, "content_block": {"type": "thinking", "thinking": "", "signature": ""}}
build-with-claude/thinking-tool-workflows Changed · +27 / -31 lines
from line 37
3737 -H "x-api-key: $ANTHROPIC_API_KEY" \
3838 -d @- <<'EOF'
3939 {
40 "model": "claude-opus-4-8",
40 "model": "claude-opus-5-5",
4141 "max_tokens": 16000,
4242 "thinking": {"type": "adaptive"},
4343 "tools": [{
from line 58
5858
5959 ```bash CLI
6060 ant messages create --transform content <<'YAML'
61 model: claude-opus-4-8
61 model: claude-opus-5-5
6262 max_tokens: 16000
6363 thinking:
6464 type: adaptive
from line 95
9595
9696 # First request - Claude responds with thinking and tool request
9797 response = client.messages.create(
98 model="claude-opus-4-8",
98 model="claude-opus-5-5",
9999 max_tokens=16000,
100100 thinking={"type": "adaptive"},
101101 tools=[weather_tool],
from line 121
121121
122122 // First request - Claude responds with thinking and tool request
123123 const response = await client.messages.create({
124 model: "claude-opus-4-8",
124 model: "claude-opus-5-5",
125125 max_tokens: 16000,
126126 thinking: {
127127 type: "adaptive"
from line 151
151151
152152 var parameters = new MessageCreateParams
153153 {
154 Model = Model.ClaudeOpus4_8,
154 Model = Model.ClaudeOpus5_5,
155155 MaxTokens = 16000,
156156 Thinking = new ThinkingConfigAdaptive(),
157157 Tools = [weatherTool],
from line 182
182182 }
183183
184184 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
185 Model: anthropic.ModelClaudeOpus4_8,
185 Model: anthropic.ModelClaudeOpus5_5,
186186 MaxTokens: 16000,
187187 Thinking: anthropic.ThinkingConfigParamUnion{
188188 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 204
204204 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
205205
206206 MessageCreateParams params = MessageCreateParams.builder()
207 .model(Model.CLAUDE_OPUS_4_8)
207 .model(Model.CLAUDE_OPUS_5_5)
208208 .maxTokens(16000L)
209209 .thinking(ThinkingConfigAdaptive.builder().build())
210210 .addTool(Tool.builder()
from line 244
244244 messages: [
245245 ['role' => 'user', 'content' => "What's the weather in Paris?"]
246246 ],
247 model: 'claude-opus-4-8',
247 model: 'claude-opus-5-5',
248248 thinking: ['type' => 'adaptive'],
249249 tools: [$weatherTool],
250250 );
from line 267
267267 }
268268
269269 message = client.messages.create(
270 model: "claude-opus-4-8",
270 model: "claude-opus-5-5",
271271 max_tokens: 16000,
272272 thinking: {
273273 type: "adaptive"
from line 283
283283 </Step>
284284
285285 <Step title="Capture the content array to echo back">
286 You should see `thinking`, `text`, and `tool_use` blocks in the response content on a run where Claude chose to think (on simpler requests, adaptive mode may skip the thinking block). Keep this content array intact: the next step sends it back verbatim.
286 You should see `thinking` and `tool_use` blocks in the response content on a run where Claude chose to think (on simpler requests, adaptive mode may skip the thinking block). A note Claude writes before the tool call comes back as a `text` block or, on models that write [progress updates](https://platform.claude.com/docs/en/build-with-claude/thinking#progress-updates), as another `thinking` block. Keep this content array intact: the next step sends it back verbatim.
287287
288288 <Note>
289 To see thinking text like this output, add `display: "summarized"` to the request. On models where display defaults to omitted, including claude-opus-4-8, the `thinking` field otherwise comes back as an empty string with only the `signature` populated. Either way, echo the content array back unchanged; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
289 To see thinking text like this output, add `display: "summarized"` to the request. On models where display defaults to omitted, including Claude Opus 5.5, the `thinking` field otherwise comes back as an empty string with only the `signature` populated. Either way, echo the content array back unchanged; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
290290 </Note>
291291
292292 ```json Output
from line 298
298298 "signature": "BDaL4VrbR2Oj0hO4XpJxT28J5T...."
299299 },
300300 {
301 "type": "text",
302 "text": "I can help you get the current weather information for Paris. Let me check that for you"
303 },
304 {
305301 "type": "tool_use",
306302 "id": "toolu_01CswdEQBMshySk6Y9DFKrfq",
307303 "name": "get_weather",
from line 327
331327 # through a file keeps it out of shell-expansion position later.
332328 ant messages create --transform content --format jsonl \
333329 > assistant_content.json <<'YAML'
334 model: claude-opus-4-8
330 model: claude-opus-5-5
335331 max_tokens: 16000
336332 thinking:
337333 type: adaptive
from line 356
360356 ($blocks[0][] | select(.type == "tool_use") | .id)
361357 ' <<'JSON' | ant messages create
362358 {
363 "model": "claude-opus-4-8",
359 "model": "claude-opus-5-5",
364360 "max_tokens": 16000,
365361 "thinking": {"type": "adaptive"},
366362 "tools": [{
from line 396
400396 },
401397 }
402398 response = client.messages.create(
403 model="claude-opus-4-8",
399 model="claude-opus-5-5",
404400 max_tokens=16000,
405401 thinking={"type": "adaptive"},
406402 tools=[weather_tool],
from line 411
415411
416412 # Second request - Include the assistant turn and the tool result
417413 continuation = client.messages.create(
418 model="claude-opus-4-8",
414 model="claude-opus-5-5",
419415 max_tokens=16000,
420416 thinking={"type": "adaptive"},
421417 tools=[weather_tool],
from line 451
455451 };
456452
457453 const response = await client.messages.create({
458 model: "claude-opus-4-8",
454 model: "claude-opus-5-5",
459455 max_tokens: 16000,
460456 thinking: {
461457 type: "adaptive"
from line 472
476472 if (toolUseBlock) {
477473 // Second request - Include the assistant turn and the tool result
478474 const continuation = await client.messages.create({
479 model: "claude-opus-4-8",
475 model: "claude-opus-5-5",
480476 max_tokens: 16000,
481477 thinking: {
482478 type: "adaptive"
from line 518
522518
523519 var parameters = new MessageCreateParams
524520 {
525 Model = Model.ClaudeOpus4_8,
521 Model = Model.ClaudeOpus5_5,
526522 MaxTokens = 16000,
527523 Thinking = new ThinkingConfigAdaptive(),
528524 Tools = [weatherTool],
from line 545
549545 // Build continuation with tool result
550546 var continuationParams = new MessageCreateParams
551547 {
552 Model = Model.ClaudeOpus4_8,
548 Model = Model.ClaudeOpus5_5,
553549 MaxTokens = 16000,
554550 Thinking = new ThinkingConfigAdaptive(),
555551 Tools = [weatherTool],
from line 588
592588 }
593589
594590 response, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
595 Model: anthropic.ModelClaudeOpus4_8,
591 Model: anthropic.ModelClaudeOpus5_5,
596592 MaxTokens: 16000,
597593 Thinking: anthropic.ThinkingConfigParamUnion{
598594 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 613
617613 weatherData := map[string]int{"temperature": 88}
618614
619615 continuation, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{
620 Model: anthropic.ModelClaudeOpus4_8,
616 Model: anthropic.ModelClaudeOpus5_5,
621617 MaxTokens: 16000,
622618 Thinking: anthropic.ThinkingConfigParamUnion{
623619 OfAdaptive: &anthropic.ThinkingConfigAdaptiveParam{},
from line 653
657653 .build();
658654
659655 MessageCreateParams initialParams = MessageCreateParams.builder()
660 .model(Model.CLAUDE_OPUS_4_8)
656 .model(Model.CLAUDE_OPUS_5_5)
661657 .maxTokens(16000L)
662658 .thinking(ThinkingConfigAdaptive.builder().build())
663659 .addTool(weatherTool)
from line 674
678674
679675 // Second request: echo the assistant turn as received, then the tool result
680676 MessageCreateParams continuationParams = MessageCreateParams.builder()
681 .model(Model.CLAUDE_OPUS_4_8)
677 .model(Model.CLAUDE_OPUS_5_5)
682678 .maxTokens(16000L)
683679 .thinking(ThinkingConfigAdaptive.builder().build())
684680 .addTool(weatherTool)
from line 718
722718 messages: [
723719 ['role' => 'user', 'content' => "What's the weather in Paris?"]
724720 ],
725 model: 'claude-opus-4-8',
721 model: 'claude-opus-5-5',
726722 thinking: ['type' => 'adaptive'],
727723 tools: [$weatherTool],
728724 );
from line 746
750746 ]
751747 ]]
752748 ],
753 model: 'claude-opus-4-8',
749 model: 'claude-opus-5-5',
754750 thinking: ['type' => 'adaptive'],
755751 tools: [$weatherTool],
756752 );
from line 770
774770 }
775771
776772 response = client.messages.create(
777 model: "claude-opus-4-8",
773 model: "claude-opus-5-5",
778774 max_tokens: 16000,
779775 thinking: {
780776 type: "adaptive"
from line 788
792788 weather_data = { temperature: 88 }
793789
794790 continuation = client.messages.create(
795 model: "claude-opus-4-8",
791 model: "claude-opus-5-5",
796792 max_tokens: 16000,
797793 thinking: {
798794 type: "adaptive"
manage-claude/analytics-api Changed · +5 / -1 lines
from line 21
2121The key types are not interchangeable: an Admin API key cannot call the Claude Enterprise Analytics API, and an Analytics API key cannot call the Admin API. Both APIs appear under the [Admin API reference](https://platform.claude.com/docs/en/api/beta/organization), but they are separate APIs with separate key types. If your organization uses both the Claude Platform and Claude Enterprise, you can provision both keys and use each API for its own data.
2222
2323<Note>
24 Looking for API usage and cost data rather than product analytics? See the [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api), which explains the right path for both Claude Console and Claude Enterprise organizations.
24 Looking for API usage and cost data rather than product analytics? See the
25
26 [Usage and Cost API](https://platform.claude.com/docs/en/manage-claude/usage-cost-api)
27
28 , which explains the right path for both Claude Console and Claude Enterprise organizations.
2529</Note>
2630
2731<Note>
manage-claude/rate-limits-api Changed · +11 / -9 lines
from line 339
339339
340340<CodeGroup>
341341 ```bash cURL
342 curl "https://api.anthropic.com/v1/organizations/rate_limits?model=claude-opus-5" \
342 curl "https://api.anthropic.com/v1/organizations/rate_limits?model=claude-opus-5-5" \
343343 -H "x-api-key: $ANTHROPIC_API_KEY" \
344344 -H "anthropic-version: 2023-06-01"
345345 ```
346346
347347 ```bash CLI
348 ant organization:rate-limits list --model claude-opus-5
348 ant organization:rate-limits list --model claude-opus-5-5
349349 ```
350350
351351 ```python Python
352352 client = anthropic.Anthropic()
353353
354 rate_limits = client.organization.rate_limits.list(model="claude-opus-5")
354 rate_limits = client.organization.rate_limits.list(model="claude-opus-5-5")
355355
356356 for entry in rate_limits:
357357 models = f" ({', '.join(entry.models)})" if entry.models else ""
from line 363
363363 ```typescript TypeScript
364364 const client = new Anthropic();
365365
366 const rateLimits = await client.organization.rateLimits.list({ model: "claude-opus-5" });
366 const rateLimits = await client.organization.rateLimits.list({
367 model: "claude-opus-5-5"
368 });
367369
368370 for await (const entry of rateLimits) {
369371 const models = entry.models ? ` (${entry.models.join(", ")})` : "";
from line 381
379381
380382 var rateLimits = await client.Organization.RateLimits.List(new()
381383 {
382 Model = "claude-opus-5"
384 Model = "claude-opus-5-5"
383385 });
384386
385387 await foreach (var entry in rateLimits.Paginate())
from line 399
397399 client := anthropic.NewClient()
398400
399401 rateLimits := client.Organization.RateLimits.ListAutoPaging(context.Background(), anthropic.OrganizationRateLimitListParams{
400 Model: anthropic.String(anthropic.ModelClaudeOpus5),
402 Model: anthropic.String(anthropic.ModelClaudeOpus5_5),
401403 })
402404
403405 for rateLimits.Next() {
from line 426
424426 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
425427
426428 var params = RateLimitListParams.builder()
427 .model(Model.CLAUDE_OPUS_5.asString())
429 .model(Model.CLAUDE_OPUS_5_5.asString())
428430 .build();
429431 var rateLimits = client.organization().rateLimits().list(params);
430432
from line 448
446448 $client = new Client();
447449
448450 $rateLimits = $client->organization->rateLimits->list(
449 model: Model::CLAUDE_OPUS_5->value,
451 model: Model::CLAUDE_OPUS_5_5->value,
450452 );
451453
452454 foreach ($rateLimits->data as $entry) {
from line 463
461463 ```ruby Ruby
462464 client = Anthropic::Client.new
463465
464 rate_limits = client.organization.rate_limits.list(model: Anthropic::Model::CLAUDE_OPUS_5)
466 rate_limits = client.organization.rate_limits.list(model: Anthropic::Model::CLAUDE_OPUS_5_5)
465467
466468 rate_limits.data.each do |entry|
467469 models = entry.models ? " (#{entry.models.join(", ")})" : ""
managed-agents/agent-setup Changed · +15 / -15 lines
from line 16
1616
1717## Agent configuration fields
1818
19| Field | Description |
20| ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21| `name` (java, php; csharp, go: `Name`) | Required. A human-readable name for the agent. |
22| `model` (java, php; csharp, go: `Model`) | Required. The Claude [model](https://platform.claude.com/docs/en/models/overview) that powers the agent. Accepts a model ID string or an object, for example `{"id": "claude-opus-5"}`. Claude 4.5 and later models are supported. The object form also accepts `speed`, `effort`, and `inference_geo` fields; see the tips under [Create an agent](https://platform.claude.com/docs/en/managed-agents/agent-setup#create-an-agent), [Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels), and [Pin the inference geo](https://platform.claude.com/docs/en/managed-agents/agent-setup#pin-the-inference-geo). |
23| `system` (java, php; csharp, go: `System`; ruby: `system_`) | A [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role) that defines the agent's behavior and persona. The system prompt is distinct from [user messages](https://platform.claude.com/docs/en/managed-agents/reference#event-types), which should describe the work to be done. |
24| `tools` (java, php; csharp, go: `Tools`) | The tools available to the agent. Combines [pre-built agent tools](https://platform.claude.com/docs/en/managed-agents/tools), [MCP tools](https://platform.claude.com/docs/en/managed-agents/mcp-connector), and [custom tools](https://platform.claude.com/docs/en/managed-agents/tools#custom-tools). |
25| `mcp_servers` (java, php: `mcpServers`; csharp: `McpServers`; go: `MCPServers`) | [MCP servers](https://platform.claude.com/docs/en/managed-agents/mcp-connector) that provide standardized third-party capabilities. |
26| `skills` (java, php; csharp, go: `Skills`) | [Skills](https://platform.claude.com/docs/en/managed-agents/skills) that supply domain-specific context with progressive disclosure. |
27| `multiagent` (java, php; csharp, go: `Multiagent`) | Lets the agent hand work to other agents, as subagents or in [dynamic workflows](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#dynamic-workflows), and optionally consult an [advisor](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#give-the-session-an-advisor) model. With the `multiagent_20261001` type, dynamic workflows are on unless you disable them. See [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration). |
28| `description` (java, php; csharp, go: `Description`) | A description of what the agent does. |
29| `metadata` (java, php; csharp, go: `Metadata`) | Arbitrary key-value pairs for your own tracking. |
19| Field | Description |
20| ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
21| `name` (java, php; csharp, go: `Name`) | Required. A human-readable name for the agent. |
22| `model` (java, php; csharp, go: `Model`) | Required. The Claude [model](https://platform.claude.com/docs/en/models/overview) that powers the agent. Accepts a model ID string or an object, for example `{"id": "claude-opus-5-5"}`. Claude 4.5 and later models are supported. The object form also accepts `speed`, `effort`, and `inference_geo` fields; see the tips under [Create an agent](https://platform.claude.com/docs/en/managed-agents/agent-setup#create-an-agent), [Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels), and [Pin the inference geo](https://platform.claude.com/docs/en/managed-agents/agent-setup#pin-the-inference-geo). |
23| `system` (java, php; csharp, go: `System`; ruby: `system_`) | A [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role) that defines the agent's behavior and persona. The system prompt is distinct from [user messages](https://platform.claude.com/docs/en/managed-agents/reference#event-types), which should describe the work to be done. |
24| `tools` (java, php; csharp, go: `Tools`) | The tools available to the agent. Combines [pre-built agent tools](https://platform.claude.com/docs/en/managed-agents/tools), [MCP tools](https://platform.claude.com/docs/en/managed-agents/mcp-connector), and [custom tools](https://platform.claude.com/docs/en/managed-agents/tools#custom-tools). |
25| `mcp_servers` (java, php: `mcpServers`; csharp: `McpServers`; go: `MCPServers`) | [MCP servers](https://platform.claude.com/docs/en/managed-agents/mcp-connector) that provide standardized third-party capabilities. |
26| `skills` (java, php; csharp, go: `Skills`) | [Skills](https://platform.claude.com/docs/en/managed-agents/skills) that supply domain-specific context with progressive disclosure. |
27| `multiagent` (java, php; csharp, go: `Multiagent`) | Lets the agent hand work to other agents, as subagents or in [dynamic workflows](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#dynamic-workflows), and optionally consult an [advisor](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration#give-the-session-an-advisor) model. With the `multiagent_20261001` type, dynamic workflows are on unless you disable them. See [Multiagent orchestration](https://platform.claude.com/docs/en/managed-agents/multiagent-orchestration). |
28| `description` (java, php; csharp, go: `Description`) | A description of what the agent does. |
29| `metadata` (java, php; csharp, go: `Metadata`) | Arbitrary key-value pairs for your own tracking. |
3030
3131You can also override `model` (java, php; csharp, go: `Model`), `system` (java, php; csharp, go: `System`; ruby: `system_`), `tools` (java, php; csharp, go: `Tools`), `mcp_servers` (java, php: `mcpServers`; csharp: `McpServers`; go: `MCPServers`), and `skills` (java, php; csharp, go: `Skills`) for a single session without changing the agent. A `model` (java, php; csharp, go: `Model`) override replaces the agent's `model` (java, php; csharp, go: `Model`) object in full, so the agent's own `effort` (java, php; csharp, go: `Effort`) isn't carried over. To run the session at a specific effort level, set `effort` (java, php; csharp, go: `Effort`) inside the override's `model` (java, php; csharp, go: `Model`) object. See [Override agent configuration for a session](https://platform.claude.com/docs/en/managed-agents/sessions#override-agent-configuration-for-a-session).
3232
3333## Create an agent
3434
35The following example defines a coding agent that uses Claude Opus 5 with access to the pre-built agent toolset. The toolset lets the agent write code, read files, search the web, and more. See the [agent tools reference](https://platform.claude.com/docs/en/managed-agents/tools) for the full list of supported tools.
35The following example defines a coding agent that uses the newest Claude Opus model with access to the pre-built agent toolset. The toolset lets the agent write code, read files, search the web, and more. See the [agent tools reference](https://platform.claude.com/docs/en/managed-agents/tools) for the full list of supported tools.
3636
3737The examples use curl, the `ant` CLI, or one of the SDKs. If you haven't set one up, the [quickstart](https://platform.claude.com/docs/en/managed-agents/quickstart#install-the-cli) covers installation and client setup.
3838
from line 176
176176 "name": "Coding Assistant",
177177 "model": {
178178 "id": "claude-opus-5-5",
179 "effort": { "type": "high" },
179 "effort": { "type": "medium" },
180180 "speed": "standard"
181181 },
182182 "system": "You are a helpful coding agent.",
from line 203
203203The `default_config` on the toolset shows its default [permission policy](https://platform.claude.com/docs/en/managed-agents/permission-policies), `always_allow`, which applies unless you configure one.
204204
205205<Tip>
206 To use Claude Opus 5.5, Claude Opus 5, or Claude Opus 4.8 with [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode), pass `model` as an object, for example: `{"id": "claude-opus-5", "speed": "fast"}`. See the fast mode page's [supported models](https://platform.claude.com/docs/en/build-with-claude/fast-mode#supported-models).
206 To use Claude Opus 5.5, Claude Opus 5, or Claude Opus 4.8 with [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode), pass `model` as an object, for example: `{"id": "claude-opus-5-5", "speed": "fast"}`. See the fast mode page's [supported models](https://platform.claude.com/docs/en/build-with-claude/fast-mode#supported-models).
207207</Tip>
208208
209209<Tip>
210 To set the model's effort level, pass `model` as an object, for example: `{"id": "claude-opus-5", "effort": "high"}`. The `effort` field accepts a level string (`low`, `medium`, `high`, `xhigh`, or `max`) or an object such as `{"type": "high"}`. See [Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels) for what each level does.
210 To set the model's effort level, pass `model` as an object, for example: `{"id": "claude-opus-5-5", "effort": "high"}`. The `effort` field accepts a level string (`low`, `medium`, `high`, `xhigh`, or `max`) or an object such as `{"type": "high"}`. See [Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort#effort-levels) for what each level does.
211211</Tip>
212212
213213### Pin the inference geo
managed-agents/dreams Changed · +10 / -10 lines
from line 42
4242 { "type": "memory_store", "memory_store_id": "$store_id" },
4343 { "type": "sessions", "session_ids": ["$session_a", "$session_b"] }
4444 ],
45 "model": "claude-opus-4-8",
45 "model": "claude-opus-5-5",
4646 "instructions": "Focus on coding-style preferences; ignore one-off debugging notes."
4747 }
4848 EOF
from line 55
5555 memory_store_id: $store_id
5656 - type: sessions
5757 session_ids: [$session_a, $session_b]
58 model: claude-opus-4-8
58 model: claude-opus-5-5
5959 instructions: Focus on coding-style preferences; ignore one-off debugging notes.
6060 YAML
6161 ```
from line 66
6666 {"type": "memory_store", "memory_store_id": store_id},
6767 {"type": "sessions", "session_ids": [session_a, session_b]},
6868 ],
69 model="claude-opus-4-8",
69 model="claude-opus-5-5",
7070 instructions="Focus on coding-style preferences; ignore one-off debugging notes.",
7171 )
7272 print(dream.id) # drm_01...
from line 78
7878 { type: "memory_store", memory_store_id: storeId },
7979 { type: "sessions", session_ids: [sessionA, sessionB] },
8080 ],
81 model: "claude-opus-4-8",
81 model: "claude-opus-5-5",
8282 instructions: "Focus on coding-style preferences; ignore one-off debugging notes.",
8383 });
8484 console.log(dream.id); // drm_01...
from line 100
100100 SessionIds = [sessionA, sessionB],
101101 },
102102 ],
103 Model = "claude-opus-4-8",
103 Model = "claude-opus-5-5",
104104 Instructions = "Focus on coding-style preferences; ignore one-off debugging notes.",
105105 });
106106 Console.WriteLine(dream.ID); // drm_01...
from line 113
113113 anthropic.BetaDreamInputParamOfSessions([]string{sessionA, sessionB}),
114114 },
115115 Model: anthropic.BetaDreamModelParamsUnion{
116 OfString: anthropic.String("claude-opus-4-8"),
116 OfString: anthropic.String("claude-opus-5-5"),
117117 },
118118 Instructions: anthropic.String("Focus on coding-style preferences; ignore one-off debugging notes."),
119119 })
from line 128
128128 DreamCreateParams.builder()
129129 .addMemoryStoreInput(storeId)
130130 .addSessionsInput(List.of(sessionA, sessionB))
131 .model("claude-opus-4-8")
131 .model("claude-opus-5-5")
132132 .instructions("Focus on coding-style preferences; ignore one-off debugging notes.")
133133 .build()
134134 );
from line 141
141141 ['type' => 'memory_store', 'memory_store_id' => $storeId],
142142 ['type' => 'sessions', 'session_ids' => [$sessionA, $sessionB]],
143143 ],
144 model: 'claude-opus-4-8',
144 model: 'claude-opus-5-5',
145145 instructions: 'Focus on coding-style preferences; ignore one-off debugging notes.',
146146 );
147147 echo "{$dream->id}\n"; // drm_01...
from line 153
153153 {type: "memory_store", memory_store_id: store_id},
154154 {type: "sessions", session_ids: [session_a, session_b]}
155155 ],
156 model: "claude-opus-4-8",
156 model: "claude-opus-5-5",
157157 instructions: "Focus on coding-style preferences; ignore one-off debugging notes."
158158 )
159159 puts dream.id # drm_01...
from line 174
174174 { "type": "sessions", "session_ids": ["sesn_01...", "sesn_02..."] }
175175 ],
176176 "outputs": [],
177 "model": { "id": "claude-opus-4-8" },
177 "model": { "id": "claude-opus-5-5" },
178178 "instructions": "Focus on coding-style preferences; ignore one-off debugging notes.",
179179 "session_id": null,
180180 "created_at": "2026-04-29T17:04:10Z",
about-claude/use-case-guides/customer-support-chat Changed · +1 / -1 lines
from line 187
187187
188188The choice of model depends on the trade-offs between cost, accuracy, and response time.
189189
190For customer support chat, Claude Opus 5 is well suited to balance intelligence, latency, and cost, including the most complex support scenarios that require deep reasoning across long, multi-step conversations. However, for instances where you have conversation flow with multiple prompts including RAG, tool use, or long-context prompts, Claude Haiku 5.5 may be more suitable to optimize for latency. [Effort](https://platform.claude.com/docs/en/build-with-claude/effort) is its main control for speed: `low` is the fastest level, suited to chat and short tool tasks.
190For customer support chat, Claude Opus 5.5 is well suited to balance intelligence, latency, and cost, including the most complex support scenarios that require deep reasoning across long, multi-step conversations. However, for instances where you have conversation flow with multiple prompts including RAG, tool use, or long-context prompts, Claude Haiku 5.5 may be more suitable to optimize for latency. [Effort](https://platform.claude.com/docs/en/build-with-claude/effort) is its main control for speed: `low` is the fastest level, suited to chat and short tool tasks.
191191
192192### Build a strong prompt
193193
api/errors Changed · +2 / -2 lines
from line 224
224224 client = AnthropicAWS(aws_region="us-west-2")
225225
226226 response = client.messages.with_raw_response.create(
227 model="claude-opus-4-8",
227 model="claude-opus-5-5",
228228 max_tokens=1024,
229229 messages=[{"role": "user", "content": "Hello, Claude"}],
230230 )
from line 240
240240
241241 const { response: raw, request_id } = await client.messages
242242 .create({
243 model: "claude-opus-4-8",
243 model: "claude-opus-5-5",
244244 max_tokens: 1024,
245245 messages: [{ role: "user", content: "Hello, Claude" }]
246246 })
build-with-claude/claude-in-microsoft-foundry Changed · +2 / -2 lines
from line 149
149149
1501501. Sign in to the Foundry portal. From the portal homepage, select **Discover** in the upper-right navigation, then **Models** in the left pane to open the model catalog.
151151
1522. Search for and select a Claude model (for example, claude-opus-5). Each model appears once in the catalog regardless of how many hosting options it supports.
1522. Search for and select a Claude model (for example, claude-opus-5-5). Each model appears once in the catalog regardless of how many hosting options it supports.
153153
1541543. On the model card, select **Deploy**, then **Custom settings** to open the deployment settings pane. If you choose **Default settings** instead, the deployment is automatically configured as Hosted on Azure for models available in both hosting options.
155155
from line 766
766766
767767**Error:** `Model not found` or `Deployment not found`
768768
769* **Solution:** Verify you're using the correct deployment name. If you haven't created a custom deployment, use the default model ID (for example, claude-opus-5).
769* **Solution:** Verify you're using the correct deployment name. If you haven't created a custom deployment, use the default model ID (for example, claude-opus-5-5).
770770* **Solution:** Ensure the model/deployment is available in your Azure region.
771771
772772**Error:** `Invalid model parameter`
build-with-claude/thinking-troubleshooting Changed · +1 / -3 lines
from line 122
122122
123123The message says thinking is disabled because `between_tools` has no up-front thinking. With `between_tools`, effort can't change mid-conversation: a per-message `output_config.effort` that differs from the level in effect returns a 400 error. `messages.N` is the position of the message that set the new level.
124124
125Claude Haiku 5.5 returns the same message for a per-message effort change while `thinking: {type: "disabled"}` is set.
126
127Remove that per-message effort, or set it to the level in effect. To vary effort per turn, use adaptive thinking, which is what the message means by "enable thinking".
125Remove that per-message effort, or set it to the level in effect. To vary effort per turn, use adaptive thinking: omit the `thinking` field or send `thinking: {"type": "adaptive"}`. That's what the message means by "enable thinking".
128126
129127Claude Haiku 5.5 returns the same message when a request with `thinking: {type: "disabled"}` sets a per-message effort that differs from the level in effect. Remove that per-message effort, or set `thinking` to `{"type": "adaptive"}` to vary effort per turn.
130128
build-with-claude/vision Changed · +1 / -1 lines
from line 1279
12791279
12801280When an image is downsized, Claude scales it to the largest size that fits the tier's limits while preserving its aspect ratio. This caps the token cost. For the precise rule and a reference implementation, see [How Claude resizes and pads images](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images).
12811281
1282To estimate cost, multiply the token count by the [per-token price of the model](https://claude.com/pricing) you're using. For example, at Claude Haiku 4.5's $1 USD per million input tokens (standard tier), the 1000×1000 image costs about $1.30 USD per thousand images. At Claude Opus 5's $5 USD per million (high-resolution tier), the same image costs about $6.48 USD per thousand and the 4K image about $23.92 USD per thousand.
1282To estimate cost, multiply the token count by the [per-token price of the model](https://claude.com/pricing) you're using. For example, at Claude Haiku 4.5's $1 USD per million input tokens (standard tier), the 1000×1000 image costs about $1.30 USD per thousand images. At Claude Opus 5.5's $4 USD per million (high-resolution tier), the same image costs about $5.18 USD per thousand and the 4K image about $19.14 USD per thousand.
12831283
12841284High-resolution images can use up to roughly three times more visual tokens than the same image on a standard-tier model. If you don't need the additional fidelity that high resolution provides for computer use, screenshot understanding, and dense documents, downsample images before sending to control token costs. To minimize latency and to simplify [coordinate-based workflows](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates), prefer resizing images before uploading them.
12851285
manage-claude/usage-cost-api Changed · +2 / -2 lines
from line 1
11---
22title: Usage and Cost API
33url: https://platform.claude.com/docs/en/manage-claude/usage-cost-api
4description: Programmatically access your organization's API usage and cost data with the Usage & Cost Admin API.
4description: Programmatically access your organization's API usage and cost data with the Usage and Cost Admin API.
55---
66
77<Tip>
from line 8
88 **The Admin API is unavailable for individual accounts.** To collaborate with teammates and add members, set up your organization in **Console → Settings → Organization**.
99</Tip>
1010
11The Usage & Cost Admin API provides programmatic and granular access to historical API usage and cost data for your organization. This data is similar to the information available in the [Usage](https://platform.claude.com/usage) and [Cost](https://platform.claude.com/cost) pages of the Claude Console.
11The Usage and Cost Admin API provides programmatic and granular access to historical API usage and cost data for your organization. This data is similar to the information available in the [Usage](https://platform.claude.com/usage) and [Cost](https://platform.claude.com/cost) pages of the Claude Console.
1212
1313This API enables you to better monitor, analyze, and optimize your Claude implementations:
1414
managed-agents/budgets Changed · +1 / -1 lines
from line 162
162162
163163## When a session reaches its budget
164164
165The cap is enforced between model requests, not mid-request. Before each model request, the platform checks the session's consumed list cost, and once that total reaches the cap every thread pauses before its next request. The request that carried the total past the cap was admitted while the session was still under it and runs to completion, so a paused session's recorded `list_cost` (java, php: `listCost`; csharp, go: `ListCost`) reads at or a fraction past `max_list_cost` (java, php: `maxListCost`; csharp, go: `MaxListCost`): a session capped at `"50"` (50 cents) can pause with a `list_cost` (java, php: `listCost`; csharp, go: `ListCost`) of `"53"`. This is expected, not a billing error, and the overshoot is bounded by one model request per thread. Treat the budget as a bound on new work rather than an exact stopping point, and size the cap with that one-request margin in mind.
165The cap is enforced between model requests, not mid-request. Before each model request, the platform checks the session's consumed list cost, and once that total reaches the cap every thread pauses before its next request. The request that carried the total past the cap was admitted while the session was still under it and runs to completion, so a paused session's recorded `list_cost` (java, php: `listCost`; csharp, go: `ListCost`) reads at or a fraction past `max_list_cost` (java, php: `maxListCost`; csharp, go: `MaxListCost`): a session capped at `"50"` (50 cents) can pause with a `list_cost` (java, php: `listCost`; csharp, go: `ListCost`) of `"53"`. This is expected, not a billing error. Model spend past the cap is at most the cost of one model request for each thread. The tool calls in that request's response still run, and their web searches and running time also count toward list cost. Treat the budget as a bound on new work rather than an exact stopping point, and size the cap with that margin in mind.
166166
167167A session that reaches its budget goes idle with a `stop_reason` (java, php: `stopReason`; csharp, go: `StopReason`) of `budget_reached`; it is not terminated, and its history and sandbox are preserved like any other idle session's. On the [event stream](https://platform.claude.com/docs/en/managed-agents/events-and-streaming) you'll see, in order:
168168
managed-agents/multiagent-orchestration Changed · +1 / -1 lines
from line 1295
12951295
12961296No `agent.tool_use` events are emitted for a consultation, and no `agent.thread_message_sent` event appears on the session's event stream, because the consultation input is composed by the platform rather than sent by the agent. If you list the advisor thread's own events, the advice also appears there as an `agent.thread_message_sent` event. The advice delivery (event 3) is not guaranteed to arrive before the advisor thread's idle and terminated events, so don't treat those as a signal that the advice has already been delivered.
12971297
1298Whether your client can read the advice is the advisor model's policy. It mirrors the [result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) split on the Messages API advisor tool. An advisor model that returns plaintext results there delivers readable text here. One that returns redacted results delivers a `[{"type": "redacted"}]` placeholder on every client surface, while the agent still reads the full advice server-side. The preceding example uses the newest Opus model available to you as the advisor. Claude Opus 5 and Claude Opus 5.5 return redacted results, so with either one your client sees only the placeholder. To read the advice on the event stream, use an advisor that returns plaintext, such as Claude Opus 4.8. A model's policy can change with no change to the API, so handle both `text` and `redacted` blocks. Some agent models pair only with redacted-result advisors; see the advisor tool's [compatibility table](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#model-compatibility). Advisor thinking is never surfaced. Clients cannot send `redacted` blocks themselves; an event containing one is rejected with a 400 validation error.
1298Whether your client can read the advice is the advisor model's policy. It mirrors the [result variants](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#result-variants) split on the Messages API advisor tool. An advisor model that returns plaintext results there delivers readable text here. One that returns redacted results delivers a `[{"type": "redacted"}]` placeholder on every client surface, while the agent still reads the full advice server-side. The preceding example uses the newest Opus model available to you as the advisor. Claude Opus 5.5 returns redacted results, so your client sees only the placeholder. To read the advice on the event stream, use an advisor that returns plaintext, such as Claude Opus 4.8. A model's policy can change with no change to the API, so handle both `text` and `redacted` blocks. Some agent models pair only with redacted-result advisors; see the advisor tool's [compatibility table](https://platform.claude.com/docs/en/agents-and-tools/tool-use/advisor-tool#model-compatibility). Advisor thinking is never surfaced. Clients cannot send `redacted` blocks themselves; an event containing one is rejected with a 400 validation error.
12991299
13001300A failed or interrupted consultation never fails the agent's turn: the agent continues after a generic notice that the consultation failed. A session-level `user.interrupt` during a consultation terminates the advisor thread with no advice delivered; a `user.interrupt` with the advisor thread's `session_thread_id` (java: `sessionThreadId`; php: `sessionThreadID`; csharp, go: `SessionThreadID`) abandons only that consultation.
13011301