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

One read of Claude Developer Platformapi-20261021T220722Z

82 pages moved out of 808 read.

Pages moved 82 significant first
Pages read 808 in this capture
Captured 22:07 UTC
Corpus hash dd90a8d0c9c2 index-hash

What this read moved

1-25 of 82, page 1 of 4

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

about-claude/use-case-guides/content-moderation Changed · +4 / -4 lines

from line 836
836836 
837837 # Send the request to Claude for content moderation
838838 response = CLIENT.messages.create(
839 model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs
839 model: Anthropic::Model::CLAUDE_HAIKU_4_5_20251001, # Using the Haiku model for lower costs
840840 max_tokens: 200,
841841 messages: [{role: :user, content: assessment_prompt}]
842842 )
from line 1395
13951395 
13961396 # Send the request to Claude for risk assessment
13971397 response = CLIENT.messages.create(
1398 model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs
1398 model: Anthropic::Model::CLAUDE_HAIKU_4_5_20251001, # Using the Haiku model for lower costs
13991399 max_tokens: 200,
14001400 messages: [{role: :user, content: assessment_prompt}]
14011401 )
from line 2149
21492149 
21502150 # Send the request to Claude for content moderation
21512151 response = CLIENT.messages.create(
2152 model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs
2152 model: Anthropic::Model::CLAUDE_HAIKU_4_5_20251001, # Using the Haiku model for lower costs
21532153 max_tokens: 200,
21542154 messages: [{role: :user, content: assessment_prompt}]
21552155 )
from line 2702
27022702 
27032703 # Send the request to Claude for content moderation
27042704 response = CLIENT.messages.create(
2705 model: "claude-haiku-4-5-20251001", # Using the Haiku model for lower costs
2705 model: Anthropic::Model::CLAUDE_HAIKU_4_5_20251001, # Using the Haiku model for lower costs
27062706 max_tokens: 2048, # Increased max token count to handle batches
27072707 messages: [{role: :user, content: assessment_prompt}]
27082708 )

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

from line 1276
12761276 <Tabs>
12771277 <Tab title="Gradle">
12781278 ```kotlin
1279 implementation("com.anthropic:anthropic-java:3.0.0")
1280 implementation("com.anthropic:anthropic-java-mcp:3.0.0")
1279 implementation("com.anthropic:anthropic-java:3.1.0")
1280 implementation("com.anthropic:anthropic-java-mcp:3.1.0")
12811281 ```
12821282 </Tab>
12831283 
from line 1286
12861286 <dependency>
12871287 <groupId>com.anthropic</groupId>
12881288 <artifactId>anthropic-java</artifactId>
1289 <version>3.0.0</version>
1289 <version>3.1.0</version>
12901290 </dependency>
12911291 <dependency>
12921292 <groupId>com.anthropic</groupId>
12931293 <artifactId>anthropic-java-mcp</artifactId>
1294 <version>3.0.0</version>
1294 <version>3.1.0</version>
12951295 </dependency>
12961296 ```
12971297 </Tab>

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

from line 125
125125 client = Anthropic::Client.new
126126 
127127 message = client.messages.create(
128 model: "claude-opus-5-5",
128 model: Anthropic::Model::CLAUDE_OPUS_5_5,
129129 max_tokens: 1024,
130130 tools: [{ type: "web_search_20260209", name: "web_search" }],
131131 messages: [{ role: "user", content: "What's the latest on the Mars rover?" }]
from line 587
587587 
588588 # Claude replies with a tool_use block naming the tool and its arguments.
589589 response = client.messages.create(
590 model: "claude-opus-5-5",
590 model: Anthropic::Model::CLAUDE_OPUS_5_5,
591591 max_tokens: 1024,
592592 tools: tools,
593593 # Ask for at most one tool call per turn.
from line 609
609609 }
610610 ]
611611 followup = client.messages.create(
612 model: "claude-opus-5-5",
612 model: Anthropic::Model::CLAUDE_OPUS_5_5,
613613 max_tokens: 1024,
614614 tools: tools,
615615 tool_choice: {type: "auto", disable_parallel_tool_use: true},

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

from line 77
7777 tools=[{"type": "web_search_20250305", "name": "web_search", "max_uses": 10}],
7878 )
7979 
80 # Check if the response has pause_turn stop reason
80 # Check if the response has a pause_turn stop reason
8181 if response.stop_reason == "pause_turn":
8282 # Continue the conversation with the paused content
8383 messages = [
from line 124
124124 ]
125125 });
126126 
127 // Check if the response has pause_turn stop reason
127 // Check if the response has a pause_turn stop reason
128128 if (response.stop_reason === "pause_turn") {
129129 // Continue the conversation with the paused content
130130 const messages: Anthropic.MessageParam[] = [
from line 335
335335 client = Anthropic::Client.new
336336 
337337 response = client.messages.create(
338 model: "claude-opus-5-5",
338 model: Anthropic::Model::CLAUDE_OPUS_5_5,
339339 max_tokens: 1024,
340340 messages: [
341341 {
from line 366
366366 ]
367367 
368368 continuation = client.messages.create(
369 model: "claude-opus-5-5",
369 model: Anthropic::Model::CLAUDE_OPUS_5_5,
370370 max_tokens: 1024,
371371 messages: messages,
372372 tools: [

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

from line 315
315315 client = Anthropic::Client.new
316316 
317317 message = client.messages.create(
318 model: "claude-opus-5-5",
318 model: Anthropic::Model::CLAUDE_OPUS_5_5,
319319 max_tokens: 1024,
320320 messages: [
321321 { role: "user", content: "What's the weather like in San Francisco?" }
from line 656
656656 client = Anthropic::Client.new
657657 
658658 message = client.messages.create(
659 model: "claude-opus-5-5",
659 model: Anthropic::Model::CLAUDE_OPUS_5_5,
660660 max_tokens: 1024,
661661 messages: [
662662 { role: "user", content: "Search for flights to Tokyo departing June 1, 2026" }
from line 1072
10721072 client = Anthropic::Client.new
10731073 
10741074 message = client.messages.create(
1075 model: "claude-opus-5-5",
1075 model: Anthropic::Model::CLAUDE_OPUS_5_5,
10761076 max_tokens: 1024,
10771077 messages: [
10781078 { role: "user", content: "Help me plan a trip from New York to Paris for 2 people, departing June 1, 2026" }

agents-and-tools/tool-use/text-editor-tool Changed · +4 / -4 lines

from line 200
200200 client = Anthropic::Client.new
201201 
202202 response = client.messages.create(
203 model: "claude-opus-5-5",
203 model: Anthropic::Model::CLAUDE_OPUS_5_5,
204204 max_tokens: 1024,
205205 tools: [
206206 {
from line 543
543543 client = Anthropic::Client.new
544544 
545545 response = client.messages.create(
546 model: "claude-opus-5-5",
546 model: Anthropic::Model::CLAUDE_OPUS_5_5,
547547 max_tokens: 1024,
548548 tools: [{type: "text_editor_20250728", name: "str_replace_based_edit_tool"}],
549549 messages: [
from line 973
973973 client = Anthropic::Client.new
974974 
975975 response = client.messages.create(
976 model: "claude-opus-5-5",
976 model: Anthropic::Model::CLAUDE_OPUS_5_5,
977977 max_tokens: 1024,
978978 tools: [{type: "text_editor_20250728", name: "str_replace_based_edit_tool"}],
979979 messages: [
from line 1417
14171417 client = Anthropic::Client.new
14181418 
14191419 response = client.messages.create(
1420 model: "claude-opus-5-5",
1420 model: Anthropic::Model::CLAUDE_OPUS_5_5,
14211421 max_tokens: 1024,
14221422 tools: [{type: "text_editor_20250728", name: "str_replace_based_edit_tool"}],
14231423 messages: [

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

from line 564
564564 
565565 # Use the tool runner
566566 runner = client.beta.messages.tool_runner(
567 model: "claude-opus-5-5",
567 model: Anthropic::Model::CLAUDE_OPUS_5_5,
568568 max_tokens: 1024,
569569 tools: [GetWeather.new, CalculateSum.new],
570570 messages: [
from line 757
757757 client = Anthropic::Client.new
758758 # ...
759759 runner = client.beta.messages.tool_runner(
760 model: "claude-opus-5-5",
760 model: Anthropic::Model::CLAUDE_OPUS_5_5,
761761 max_tokens: 1024,
762762 tools: [GetWeather.new, CalculateSum.new],
763763 messages: [
from line 1068
10681068 
10691069 ```ruby
10701070 runner = client.beta.messages.tool_runner(
1071 model: "claude-opus-5-5",
1071 model: Anthropic::Model::CLAUDE_OPUS_5_5,
10721072 max_tokens: 1024,
10731073 max_iterations: 10,
10741074 tools: [GetWeather.new],
from line 1266
12661266 client = Anthropic::Client.new
12671267 # ...
12681268 runner = client.beta.messages.tool_runner(
1269 model: "claude-opus-5-5",
1269 model: Anthropic::Model::CLAUDE_OPUS_5_5,
12701270 max_tokens: 1024,
12711271 tools: [MyTool.new],
12721272 messages: [{role: "user", content: "Run my_tool with the query 'hello'."}]
from line 1526
15261526 client = Anthropic::Client.new
15271527 # ...
15281528 runner = client.beta.messages.tool_runner(
1529 model: "claude-opus-5-5",
1529 model: Anthropic::Model::CLAUDE_OPUS_5_5,
15301530 max_tokens: 1024,
15311531 tools: [SearchDocuments.new],
15321532 messages: [{role: "user", content: "Search for information about the climate of San Francisco"}]
from line 1741
17411741 client = Anthropic::Client.new
17421742 # ...
17431743 runner = client.beta.messages.tool_runner(
1744 model: "claude-opus-5-5",
1744 model: Anthropic::Model::CLAUDE_OPUS_5_5,
17451745 max_tokens: 1024,
17461746 tools: [CalculateSum.new],
17471747 messages: [{role: "user", content: "What is 15 + 27?"}]

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

from line 84
8484<CodeGroup>
8585 ```bash cURL
8686 curl https://api.anthropic.com/v1/messages \
87 -H "x-api-key: $ANTHROPIC_API_KEY" \
88 -H "anthropic-version: 2023-06-01" \
89 -H "content-type: application/json" \
90 -d '{
91 "model": "claude-opus-5-5",
92 "max_tokens": 2048,
93 "messages": [
94 {
95 "role": "user",
96 "content": "What is the weather in San Francisco?"
87 -H "x-api-key: $ANTHROPIC_API_KEY" \
88 -H "anthropic-version: 2023-06-01" \
89 -H "content-type: application/json" \
90 -d '{
91 "model": "claude-opus-5-5",
92 "max_tokens": 2048,
93 "messages": [
94 {
95 "role": "user",
96 "content": "What is the weather in San Francisco?"
97 }
98 ],
99 "tools": [
100 {
101 "type": "tool_search_tool_regex_20251119",
102 "name": "tool_search_tool_regex"
103 },
104 {
105 "name": "get_weather",
106 "description": "Get the weather at a specific location",
107 "input_schema": {
108 "type": "object",
109 "properties": {
110 "location": {"type": "string"},
111 "unit": {
112 "type": "string",
113 "enum": ["celsius", "fahrenheit"]
97114 }
98 ],
99 "tools": [
100 {
101 "type": "tool_search_tool_regex_20251119",
102 "name": "tool_search_tool_regex"
103 },
104 {
105 "name": "get_weather",
106 "description": "Get the weather at a specific location",
107 "input_schema": {
108 "type": "object",
109 "properties": {
110 "location": {"type": "string"},
111 "unit": {
112 "type": "string",
113 "enum": ["celsius", "fahrenheit"]
114 }
115 },
116 "required": ["location"]
117 },
118 "defer_loading": true
119 },
120 {
121 "name": "search_files",
122 "description": "Search through files in the workspace",
123 "input_schema": {
124 "type": "object",
125 "properties": {
126 "query": {"type": "string"},
127 "file_types": {
128 "type": "array",
129 "items": {"type": "string"}
130 }
131 },
132 "required": ["query"]
133 },
134 "defer_loading": true
115 },
116 "required": ["location"]
117 },
118 "defer_loading": true
119 },
120 {
121 "name": "search_files",
122 "description": "Search through files in the workspace",
123 "input_schema": {
124 "type": "object",
125 "properties": {
126 "query": {"type": "string"},
127 "file_types": {
128 "type": "array",
129 "items": {"type": "string"}
135130 }
136 ]
137 }'
131 },
132 "required": ["query"]
133 },
134 "defer_loading": true
135 }
136 ]
137 }'
138138 ```
139139 
140140 ```bash CLI
from line 479
479479 client = Anthropic::Client.new
480480 
481481 message = client.messages.create(
482 model: "claude-opus-5-5",
482 model: Anthropic::Model::CLAUDE_OPUS_5_5,
483483 max_tokens: 2048,
484484 messages: [
485485 { role: "user", content: "What is the weather in San Francisco?" }
from line 801
801801event: content_block_delta
802802data: {"type": "content_block_delta", "index": 1, "delta": {"type": "input_json_delta", "partial_json": "{\"pattern\":\"weather\"}"}}
803803 
804// Pause while search executes
804// Pause while search runs
805805 
806806// Search results streamed
807807event: content_block_start

build-with-claude/batch-processing Changed · +5 / -5 lines

from line 387
387387 {
388388 custom_id: "my-first-request",
389389 params: {
390 model: "claude-opus-5-5",
390 model: Anthropic::Model::CLAUDE_OPUS_5_5,
391391 max_tokens: 1024,
392392 messages: [
393393 { role: "user", content: "Hello, world" }
from line 397
397397 {
398398 custom_id: "my-second-request",
399399 params: {
400 model: "claude-opus-5-5",
400 model: Anthropic::Model::CLAUDE_OPUS_5_5,
401401 max_tokens: 1024,
402402 messages: [
403403 { role: "user", content: "Hi again, friend" }
from line 1492
14921492 {
14931493 custom_id: "my-first-request",
14941494 params: {
1495 model: "claude-opus-5-5",
1495 model: Anthropic::Model::CLAUDE_OPUS_5_5,
14961496 max_tokens: 1024,
14971497 system: [
14981498 {
from line 1513
15131513 {
15141514 custom_id: "my-second-request",
15151515 params: {
1516 model: "claude-opus-5-5",
1516 model: Anthropic::Model::CLAUDE_OPUS_5_5,
15171517 max_tokens: 1024,
15181518 system: [
15191519 {
from line 1770
17701770 {
17711771 custom_id: "long-form-request",
17721772 params: {
1773 model: "claude-opus-5-5",
1773 model: Anthropic::Model::CLAUDE_OPUS_5_5,
17741774 max_tokens: 300_000,
17751775 messages: [
17761776 { role: "user", content: "Write a comprehensive technical guide to building distributed systems, covering architecture patterns, consistency models, fault tolerance, and operational best practices." }

build-with-claude/citations Changed · +6 / -6 lines

from line 276
276276 client = Anthropic::Client.new
277277 
278278 response = client.messages.create(
279 model: "claude-opus-5-5",
279 model: Anthropic::Model::CLAUDE_OPUS_5_5,
280280 max_tokens: 1024,
281281 messages: [
282282 {
from line 666
666666 " ... " * 1000 # Minimum cacheable length
667667 
668668 response = client.messages.create(
669 model: "claude-opus-5-5",
669 model: Anthropic::Model::CLAUDE_OPUS_5_5,
670670 max_tokens: 1024,
671671 messages: [
672672 {
from line 945
945945 
946946 ```ruby Ruby
947947 cited_response = client.messages.create(
948 model: "claude-opus-5-5",
948 model: Anthropic::Model::CLAUDE_OPUS_5_5,
949949 max_tokens: 1024,
950950 messages: [
951951 {
from line 1255
12551255 pdf_base64 = Base64.strict_encode64(File.binread("/path/to/document.pdf"))
12561256 
12571257 response = client.messages.create(
1258 model: "claude-opus-5-5",
1258 model: Anthropic::Model::CLAUDE_OPUS_5_5,
12591259 max_tokens: 1024,
12601260 messages: [
12611261 {
from line 1761
17611761 
17621762 ```ruby Ruby
17631763 cited_response = client.messages.create(
1764 model: "claude-opus-5-5",
1764 model: Anthropic::Model::CLAUDE_OPUS_5_5,
17651765 max_tokens: 1024,
17661766 messages: [
17671767 {
from line 2076
20762076 client = Anthropic::Client.new
20772077 
20782078 response = client.messages.create(
2079 model: "claude-opus-5-5",
2079 model: Anthropic::Model::CLAUDE_OPUS_5_5,
20802080 max_tokens: 1024,
20812081 messages: [
20822082 {

build-with-claude/claude-in-amazon-bedrock Changed · +4 / -4 lines

from line 102
102102 <Tabs>
103103 <Tab title="Gradle">
104104 ```kotlin
105 implementation("com.anthropic:anthropic-java:3.0.0")
106 implementation("com.anthropic:anthropic-java-bedrock:3.0.0")
105 implementation("com.anthropic:anthropic-java:3.1.0")
106 implementation("com.anthropic:anthropic-java-bedrock:3.1.0")
107107 ```
108108 </Tab>
109109 
from line 112
112112 <dependency>
113113 <groupId>com.anthropic</groupId>
114114 <artifactId>anthropic-java</artifactId>
115 <version>3.0.0</version>
115 <version>3.1.0</version>
116116 </dependency>
117117 <dependency>
118118 <groupId>com.anthropic</groupId>
119119 <artifactId>anthropic-java-bedrock</artifactId>
120 <version>3.0.0</version>
120 <version>3.1.0</version>
121121 </dependency>
122122 ```
123123 </Tab>

build-with-claude/claude-in-microsoft-foundry Changed · +4 / -4 lines

from line 80
8080 <Tabs>
8181 <Tab title="Gradle">
8282 ```kotlin
83 implementation("com.anthropic:anthropic-java:3.0.0")
84 implementation("com.anthropic:anthropic-java-foundry:3.0.0")
83 implementation("com.anthropic:anthropic-java:3.1.0")
84 implementation("com.anthropic:anthropic-java-foundry:3.1.0")
8585 
8686 // For Entra ID authentication, also add the Azure Identity library
8787 implementation("com.azure:azure-identity:1.18.3")
from line 93
9393 <dependency>
9494 <groupId>com.anthropic</groupId>
9595 <artifactId>anthropic-java</artifactId>
96 <version>3.0.0</version>
96 <version>3.1.0</version>
9797 </dependency>
9898 <dependency>
9999 <groupId>com.anthropic</groupId>
100100 <artifactId>anthropic-java-foundry</artifactId>
101 <version>3.0.0</version>
101 <version>3.1.0</version>
102102 </dependency>
103103 <!-- For Entra ID authentication, also add the Azure Identity library -->
104104 <dependency>

build-with-claude/claude-on-amazon-bedrock-legacy Changed · +8 / -8 lines

from line 58
5858 <Tab title="Java">
5959 <CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby">
6060 ```groovy Gradle
61 implementation("com.anthropic:anthropic-java:3.0.0")
62 implementation("com.anthropic:anthropic-java-bedrock:3.0.0")
61 implementation("com.anthropic:anthropic-java:3.1.0")
62 implementation("com.anthropic:anthropic-java-bedrock:3.1.0")
6363 ```
6464 
6565 ```xml Maven
from line 66
6666 <dependency>
6767 <groupId>com.anthropic</groupId>
6868 <artifactId>anthropic-java</artifactId>
69 <version>3.0.0</version>
69 <version>3.1.0</version>
7070 </dependency>
7171 <dependency>
7272 <groupId>com.anthropic</groupId>
7373 <artifactId>anthropic-java-bedrock</artifactId>
74 <version>3.0.0</version>
74 <version>3.1.0</version>
7575 </dependency>
7676 ```
7777 
from line 326
326326 from anthropic import AnthropicBedrock
327327 
328328 client = AnthropicBedrock(
329 # Authenticate by either providing the keys below or use the default AWS credential providers, such as
329 # Authenticate by either providing the following keys or using the default AWS credential providers, such as
330330 # using ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and "AWS_ACCESS_KEY_ID" environment variables.
331331 aws_access_key="<access key>",
332332 aws_secret_key="<secret key>",
from line 333
333333 # Temporary credentials can be used with aws_session_token.
334334 # Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
335335 aws_session_token="<session_token>",
336 # aws_region changes the aws region to which the request is made. If it is not provided, the SDK reads
336 # aws_region changes the AWS region to which the request is made. If it is not provided, the SDK reads
337337 # AWS_REGION / AWS_DEFAULT_REGION, then the region configured for your boto3 session or AWS profile
338338 # (including ~/.aws/config), and raises ValueError if no region can be resolved.
339339 aws_region="us-west-2",
from line 353
353353 import AnthropicBedrock from "@anthropic-ai/bedrock-sdk";
354354 
355355 const client = new AnthropicBedrock({
356 // Authenticate by either providing the keys below or use
356 // Authenticate by either providing the following keys or using
357357 // the default AWS credential providers, such as
358358 // ~/.aws/credentials or the "AWS_SECRET_ACCESS_KEY" and
359359 // "AWS_ACCESS_KEY_ID" environment variables.
from line 364
364364 // Read more at https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html.
365365 awsSessionToken: "<session_token>",
366366 
367 // awsRegion changes the aws region to which the request
367 // awsRegion changes the AWS region to which the request
368368 // is made. By default, the SDK reads AWS_REGION, and if
369369 // that's not present, defaults to us-east-1. Note that
370370 // the SDK does not read ~/.aws/config for the region.

build-with-claude/claude-on-vertex-ai Changed · +6 / -6 lines

from line 45
4545 <Tab title="Java">
4646 <CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby">
4747 ```groovy Gradle
48 implementation("com.anthropic:anthropic-java:3.0.0")
49 implementation("com.anthropic:anthropic-java-vertex:3.0.0")
48 implementation("com.anthropic:anthropic-java:3.1.0")
49 implementation("com.anthropic:anthropic-java-vertex:3.1.0")
5050 ```
5151 
5252 ```xml Maven
from line 53
5353 <dependency>
5454 <groupId>com.anthropic</groupId>
5555 <artifactId>anthropic-java</artifactId>
56 <version>3.0.0</version>
56 <version>3.1.0</version>
5757 </dependency>
5858 <dependency>
5959 <groupId>com.anthropic</groupId>
6060 <artifactId>anthropic-java-vertex</artifactId>
61 <version>3.0.0</version>
61 <version>3.1.0</version>
6262 </dependency>
6363 ```
6464 
from line 623
623623 
624624<CodeGroup exclude="shell:CLI">
625625 ```bash cURL
626 # The multi-region identifier, "us" or "eu", appears in the host name and in the path
626 # The multi-region identifier, "us" or "eu", appears in the hostname and in the path
627627 curl https://aiplatform.us.rep.googleapis.com/v1/projects/MY_PROJECT_ID/locations/us/publishers/anthropic/models/claude-opus-5-5:rawPredict \
628628 -H "Authorization: Bearer $(gcloud auth print-access-token)" \
629629 -H "Content-Type: application/json" \
from line 810
810810<CodeGroup exclude="shell:CLI">
811811 ```bash cURL
812812 # Specific regional endpoints support Claude Sonnet 4.6 and earlier; newer models use the global or multi-region endpoints
813 # The region, here us-east5, appears in the host name and in the path
813 # The region, here us-east5, appears in the hostname and in the path
814814 curl https://us-east5-aiplatform.googleapis.com/v1/projects/MY_PROJECT_ID/locations/us-east5/publishers/anthropic/models/claude-sonnet-4-6:rawPredict \
815815 -H "Authorization: Bearer $(gcloud auth print-access-token)" \
816816 -H "Content-Type: application/json" \

build-with-claude/claude-platform-on-aws Changed · +4 / -4 lines

from line 305
305305 
306306 <Tab title="Java">
307307 ```kotlin Gradle
308 implementation("com.anthropic:anthropic-java:3.0.0")
309 implementation("com.anthropic:anthropic-java-aws:3.0.0")
308 implementation("com.anthropic:anthropic-java:3.1.0")
309 implementation("com.anthropic:anthropic-java-aws:3.1.0")
310310 ```
311311 
312312 ```xml Maven
from line 313
313313 <dependency>
314314 <groupId>com.anthropic</groupId>
315315 <artifactId>anthropic-java</artifactId>
316 <version>3.0.0</version>
316 <version>3.1.0</version>
317317 </dependency>
318318 <dependency>
319319 <groupId>com.anthropic</groupId>
320320 <artifactId>anthropic-java-aws</artifactId>
321 <version>3.0.0</version>
321 <version>3.1.0</version>
322322 </dependency>
323323 ```
324324 </Tab>

build-with-claude/context-editing Changed · +8 / -9 lines

from line 270
270270 client = Anthropic::Client.new
271271 
272272 response = client.beta.messages.create(
273 model: "claude-opus-5-5",
273 model: Anthropic::Model::CLAUDE_OPUS_5_5,
274274 max_tokens: 4096,
275275 messages: [
276276 { role: "user", content: "Search for recent developments in AI" }
from line 893
893893 client = Anthropic::Client.new
894894 
895895 response = client.beta.messages.create(
896 model: "claude-opus-5-5",
896 model: Anthropic::Model::CLAUDE_OPUS_5_5,
897897 max_tokens: 16000,
898898 messages: [{ role: "user", content: "Hello" }],
899899 betas: ["context-management-2025-06-27"],
from line 1115
11151115 client = Anthropic::Client.new
11161116 
11171117 response = client.beta.messages.create(
1118 model: "claude-opus-5-5",
1118 model: Anthropic::Model::CLAUDE_OPUS_5_5,
11191119 max_tokens: 16000,
11201120 messages: [{ role: "user", content: "Hello" }],
11211121 betas: ["context-management-2025-06-27"],
from line 1312
13121312 client = Anthropic::Client.new
13131313 
13141314 response = client.beta.messages.create(
1315 model: "claude-opus-5-5",
1315 model: Anthropic::Model::CLAUDE_OPUS_5_5,
13161316 max_tokens: 16000,
13171317 messages: [{ role: "user", content: "Hello" }],
13181318 betas: ["context-management-2025-06-27"],
from line 1678
16781678 client = Anthropic::Client.new
16791679 
16801680 response = client.beta.messages.create(
1681 model: "claude-opus-5-5",
1681 model: Anthropic::Model::CLAUDE_OPUS_5_5,
16821682 max_tokens: 16000,
16831683 messages: [
16841684 {
from line 1823
18231823 ```
18241824 
18251825 ```bash CLI
1826 ant beta:messages count-tokens \
1827 --beta context-management-2025-06-27 <<'YAML'
1826 ant beta:messages count-tokens --beta context-management-2025-06-27 <<'YAML'
18281827 model: claude-opus-5-5
18291828 messages:
18301829 - role: user
from line 2041
20422041 client = Anthropic::Client.new
20432042 
20442043 response = client.beta.messages.count_tokens(
2045 model: "claude-opus-5-5",
2044 model: Anthropic::Model::CLAUDE_OPUS_5_5,
20462045 messages: [
20472046 { role: "user", content: "Continue our conversation..." }
20482047 ],
from line 2280
22812280 client = Anthropic::Client.new
22822281 
22832282 response = client.beta.messages.create(
2284 model: "claude-opus-5-5",
2283 model: Anthropic::Model::CLAUDE_OPUS_5_5,
22852284 max_tokens: 4096,
22862285 messages: [{ role: "user", content: "Hello" }],
22872286 tools: [

build-with-claude/extended-thinking Changed · +2 / -3 lines

from line 53
5353 ```
5454 
5555 ```bash CLI
56 ant messages create \
57 --format yaml <<'YAML'
56 ant messages create --format yaml <<'YAML'
5857 model: claude-sonnet-4-6
5958 max_tokens: 16000
6059 thinking:
from line 235
236235 client = Anthropic::Client.new
237236 
238237 response = client.messages.create(
239 model: "claude-sonnet-4-6",
238 model: Anthropic::Model::CLAUDE_SONNET_4_6,
240239 max_tokens: 16_000,
241240 thinking: {
242241 type: :enabled,

build-with-claude/files Changed · +3 / -5 lines

from line 348
348348 
349349 ```ruby Ruby
350350 response = client.messages.create(
351 model: "claude-opus-5-5",
351 model: Anthropic::Model::CLAUDE_OPUS_5_5,
352352 max_tokens: 1024,
353353 messages: [
354354 {
from line 461
461461 
462462 ```bash CLI
463463 # The "@./path" reference inlines the file contents directly into the field.
464 ant messages create \
465 --model claude-opus-5-5 \
466 --max-tokens 1024 <<'YAML'
464 ant messages create --model claude-opus-5-5 --max-tokens 1024 <<'YAML'
467465 messages:
468466 - role: user
469467 content:
from line 639
641639 text_content = File.read("document.txt")
642640 
643641 message = client.messages.create(
644 model: "claude-opus-5-5",
642 model: Anthropic::Model::CLAUDE_OPUS_5_5,
645643 max_tokens: 1024,
646644 messages: [
647645 {

build-with-claude/handling-stop-reasons Changed · +8 / -8 lines

from line 191
191191 client = Anthropic::Client.new
192192 
193193 response = client.messages.create(
194 model: "claude-opus-5-5",
194 model: Anthropic::Model::CLAUDE_OPUS_5_5,
195195 max_tokens: 1024,
196196 messages: [{ role: "user", content: "Hello!" }]
197197 )
from line 862
862862 
863863 # Request with limited tokens
864864 response = client.messages.create(
865 model: "claude-opus-5-5",
865 model: Anthropic::Model::CLAUDE_OPUS_5_5,
866866 max_tokens: 10,
867867 messages: [{ role: "user", content: "Explain quantum physics" }]
868868 )
from line 1015
10151015 
10161016 ```ruby Ruby
10171017 response = client.messages.create(
1018 model: "claude-opus-5-5",
1018 model: Anthropic::Model::CLAUDE_OPUS_5_5,
10191019 max_tokens: 1024,
10201020 messages: messages,
10211021 tools: tools
from line 1025
10251025 last_block = response.content.last
10261026 if last_block.type == :tool_use
10271027 response = client.messages.create(
1028 model: "claude-opus-5-5",
1028 model: Anthropic::Model::CLAUDE_OPUS_5_5,
10291029 max_tokens: 4096,
10301030 messages: messages,
10311031 tools: tools
from line 1164
11641164 client = Anthropic::Client.new
11651165 
11661166 response = client.messages.create(
1167 model: "claude-opus-5-5",
1167 model: Anthropic::Model::CLAUDE_OPUS_5_5,
11681168 max_tokens: 1024,
11691169 stop_sequences: ["END", "STOP"],
11701170 messages: [{ role: "user", content: "Generate text until you say END" }]
from line 1872
18721872 client = Anthropic::Client.new
18731873 
18741874 response = client.messages.create(
1875 model: "claude-opus-5-5",
1875 model: Anthropic::Model::CLAUDE_OPUS_5_5,
18761876 max_tokens: 1024,
18771877 messages: [{ role: "user", content: "[Unsafe request]" }]
18781878 )
from line 2777
27772777 
27782778 begin
27792779 response = client.messages.create(
2780 model: "claude-opus-5-5",
2780 model: Anthropic::Model::CLAUDE_OPUS_5_5,
27812781 max_tokens: 1024,
27822782 messages: [{ role: "user", content: "Hello!" }]
27832783 )
from line 2946
29462946 client = Anthropic::Client.new
29472947 
29482948 stream = client.messages.stream(
2949 model: "claude-opus-5-5",
2949 model: Anthropic::Model::CLAUDE_OPUS_5_5,
29502950 max_tokens: 1024,
29512951 messages: [{ role: "user", content: "Hello!" }]
29522952 )

build-with-claude/mid-conversation-effort-example Changed · +3 / -3 lines

from line 1337
13371337 stdin.close
13381338 reader = Thread.new { stdout_and_stderr.read.scrub }
13391339 # Enforce the time limit with a monotonic-clock deadline so a timed-out command is
1340 # terminated rather than left running in the background.
1340 # stopped rather than left running in the background.
13411341 deadline = Process.clock_gettime(Process::CLOCK_MONOTONIC) + BASH_TIMEOUT_SECONDS
13421342 until wait_thr.join(0.1)
13431343 next if Process.clock_gettime(Process::CLOCK_MONOTONIC) < deadline
from line 2012
20122012 return cached;
20132013 }
20142014 const result = await compute();
2015 // Chain writes so concurrent subagents do not clobber each other's entries.
2016 // The chain is kept settled so one failed write does not poison later ones.
2015 // Chain writes so concurrent subagents do not overwrite each other's entries.
2016 // The chain is kept settled so one failed write does not cause later ones to fail.
20172017 await (journalWriteChain = journalWriteChain
20182018 .then(async () => {
20192019 const journal = await loadJournal();

build-with-claude/pdf-support Changed · +8 / -11 lines

from line 411
411411 ```
412412 
413413 ```bash CLI
414 ant messages create \
415 --model claude-opus-5-5 \
416 --max-tokens 1024 <<'YAML'
414 ant messages create --model claude-opus-5-5 --max-tokens 1024 <<'YAML'
417415 messages:
418416 - role: user
419417 content:
from line 475
477475 
478476 // Method 2: Load from a local file
479477 // import { readFile } from "node:fs/promises";
480 // const pdfBase64 = (await readFile('document.pdf')).toString('base64');
478 // const pdfBase64 = (await readFile("document.pdf")).toString("base64");
481479 
482480 // Send the API request with base64-encoded PDF
483481 const anthropic = new Anthropic();
from line 679
681679 # Send to Claude using base64 encoding
682680 anthropic = Anthropic::Client.new
683681 message = anthropic.messages.create(
684 model: "claude-opus-5-5",
682 model: Anthropic::Model::CLAUDE_OPUS_5_5,
685683 max_tokens: 1024,
686684 messages: [
687685 {
from line 742
744742 
745743 ```bash CLI
746744 # First, upload your PDF to the Files API
747 ant files upload \
748 --file ./document.pdf
745 ant files upload --file ./document.pdf
749746 
750747 # Then use the file_id from the upload response in your message
751748 ant messages create <<YAML
from line 982
985982 
986983 # Use the uploaded file in a message
987984 message = anthropic.messages.create(
988 model: "claude-opus-5-5",
985 model: Anthropic::Model::CLAUDE_OPUS_5_5,
989986 max_tokens: 1024,
990987 messages: [
991988 {
from line 1341
13441341 anthropic = Anthropic::Client.new
13451342 
13461343 message = anthropic.messages.create(
1347 model: "claude-opus-5-5",
1344 model: Anthropic::Model::CLAUDE_OPUS_5_5,
13481345 max_tokens: 1024,
13491346 messages: [
13501347 {
from line 1888
18911888 {
18921889 custom_id: "my-first-request",
18931890 params: {
1894 model: "claude-opus-5-5",
1891 model: Anthropic::Model::CLAUDE_OPUS_5_5,
18951892 max_tokens: 1024,
18961893 messages: [
18971894 {
from line 1914
19171914 {
19181915 custom_id: "my-second-request",
19191916 params: {
1920 model: "claude-opus-5-5",
1917 model: Anthropic::Model::CLAUDE_OPUS_5_5,
19211918 max_tokens: 1024,
19221919 messages: [
19231920 {

build-with-claude/skills-guide Changed · +8 / -9 lines

from line 279
279279 client = Anthropic::Client.new
280280 
281281 message = client.messages.create(
282 model: "claude-opus-5-5",
282 model: Anthropic::Model::CLAUDE_OPUS_5_5,
283283 max_tokens: 4096,
284284 container: {
285285 skills: [
from line 712
712712 
713713 ```bash CLI
714714 # Get file metadata
715 ant files retrieve-metadata \
716 --file-id "$FILE_ID"
715 ant files retrieve-metadata --file-id "$FILE_ID"
717716 
718717 # List all files
719718 ant files list
from line 2601
26022601 -F "files[]=@financial_skill/SKILL.md;filename=financial_skill/SKILL.md" \
26032602 -F "files[]=@financial_skill/analyze.py;filename=financial_skill/analyze.py"
26042603 
2605 # Use a specific version: the id from the create response
2604 # Use a specific version: the ID from the create response
26062605 curl https://api.anthropic.com/v1/messages \
26072606 -H "x-api-key: $ANTHROPIC_API_KEY" \
26082607 -H "anthropic-version: 2023-06-01" \
from line 2646
26472646 --skill-id skill_01AbCdEfGhIjKlMnOpQrStUv \
26482647 --file financial_skill.zip
26492648 
2650 # Use a specific version: the id from the create response
2649 # Use a specific version: the ID from the create response
26512650 ant messages create <<YAML
26522651 model: claude-opus-5-5
26532652 max_tokens: 4096
from line 3075
30763075 
30773076 # Use specific version
30783077 response = client.messages.create(
3079 model: "claude-opus-5-5",
3078 model: Anthropic::Model::CLAUDE_OPUS_5_5,
30803079 max_tokens: 4096,
30813080 container: {
30823081 skills: [{
from line 3091
30923091 
30933092 # Use latest version
30943093 latest_response = client.messages.create(
3095 model: "claude-opus-5-5",
3094 model: Anthropic::Model::CLAUDE_OPUS_5_5,
30963095 max_tokens: 4096,
30973096 container: {
30983097 skills: [{
from line 4230
42314230 
42324231 # Skills render into the system prompt in a fixed, cache-friendly order
42334232 response1 = client.messages.create(
4234 model: "claude-opus-5-5",
4233 model: Anthropic::Model::CLAUDE_OPUS_5_5,
42354234 max_tokens: 4096,
42364235 container: {
42374236 skills: [{ type: "anthropic", skill_id: "xlsx", version: "latest" }]
from line 4242
42434242 
42444243 # Changing the Skills list ([xlsx] vs [xlsx, pptx]) changes the prefix: a cache miss, while an identical list is a cache hit
42454244 response2 = client.messages.create(
4246 model: "claude-opus-5-5",
4245 model: Anthropic::Model::CLAUDE_OPUS_5_5,
42474246 max_tokens: 4096,
42484247 container: {
42494248 skills: [

build-with-claude/streaming Changed · +6 / -6 lines

from line 126
126126 client = Anthropic::Client.new
127127 
128128 stream = client.messages.stream(
129 model: "claude-opus-5-5",
129 model: Anthropic::Model::CLAUDE_OPUS_5_5,
130130 max_tokens: 1024,
131131 messages: [{ role: "user", content: "Hello" }]
132132 )
from line 141
141141 
142142<CodeGroup exclude="shell:cURL">
143143 ```bash CLI
144 # The ant CLI's --stream flag emits one event per line and does not
144 # The ant CLI's --stream flag emits one event on each line and does not
145145 # accumulate into a final Message. For long generations, stream the
146146 # raw events:
147147 ant messages create --stream --format jsonl <<'YAML'
from line 273
273273 client = Anthropic::Client.new
274274 
275275 message = client.messages.stream(
276 model: "claude-opus-5-5",
276 model: Anthropic::Model::CLAUDE_OPUS_5_5,
277277 max_tokens: 128000,
278278 messages: [{ role: "user", content: "Write a detailed analysis..." }]
279279 ).accumulated_message
from line 521
521521 client = Anthropic::Client.new
522522 
523523 stream = client.messages.stream(
524 model: "claude-opus-5-5",
524 model: Anthropic::Model::CLAUDE_OPUS_5_5,
525525 messages: [{ role: "user", content: "Hello" }],
526526 max_tokens: 256
527527 )
from line 859
859859 ]
860860 
861861 stream = client.messages.stream(
862 model: "claude-opus-5",
862 model: Anthropic::Model::CLAUDE_OPUS_5,
863863 max_tokens: 1024,
864864 tools: tools,
865865 tool_choice: { type: "any" },
from line 1375
13751375 client = Anthropic::Client.new
13761376 
13771377 stream = client.messages.stream(
1378 model: :"claude-opus-5-5",
1378 model: Anthropic::Model::CLAUDE_OPUS_5_5,
13791379 max_tokens: 1024,
13801380 tools: [
13811381 {

build-with-claude/structured-outputs Changed · +7 / -7 lines

from line 678
678678 end
679679 
680680 message = client.messages.create(
681 model: "claude-opus-5-5",
681 model: Anthropic::Model::CLAUDE_OPUS_5_5,
682682 max_tokens: 1024,
683683 messages: [{
684684 role: "user",
from line 720
720720 end
721721 
722722 message = client.messages.create(
723 model: "claude-opus-5-5",
723 model: Anthropic::Model::CLAUDE_OPUS_5_5,
724724 max_tokens: 1024,
725725 messages: [{role: "user", content: "give me some famous numbers"}],
726726 output_config: {format: Output}
from line 1151
11511151 client = Anthropic::Client.new
11521152 
11531153 response = client.messages.create(
1154 model: "claude-opus-5-5",
1154 model: Anthropic::Model::CLAUDE_OPUS_5_5,
11551155 max_tokens: 1024,
11561156 messages: [
11571157 {
from line 1513
15131513 invoice_text = "Invoice #12345, Date: 2024-01-15, Total: $500.00"
15141514 
15151515 message = client.messages.create(
1516 model: "claude-opus-5-5",
1516 model: Anthropic::Model::CLAUDE_OPUS_5_5,
15171517 max_tokens: 4096,
15181518 output_config: {format: Invoice},
15191519 messages: [
from line 1800
18001800 feedback_text = "Great product, fast shipping!"
18011801 
18021802 message = client.messages.create(
1803 model: "claude-opus-5-5",
1803 model: Anthropic::Model::CLAUDE_OPUS_5_5,
18041804 max_tokens: 1024,
18051805 output_config: {format: Classification},
18061806 messages: [
from line 2139
21392139 end
21402140 
21412141 message = client.messages.create(
2142 model: "claude-opus-5-5",
2142 model: Anthropic::Model::CLAUDE_OPUS_5_5,
21432143 max_tokens: 1024,
21442144 output_config: {format: APIResponse},
21452145 messages: [
from line 2546
25462546 client = Anthropic::Client.new
25472547 
25482548 message = client.messages.create(
2549 model: "claude-opus-5-5",
2549 model: Anthropic::Model::CLAUDE_OPUS_5_5,
25502550 max_tokens: 1024,
25512551 messages: [
25522552 {role: "user", content: "Help me plan a trip to Paris departing May 15, 2026"}

build-with-claude/task-budgets Changed · +3 / -4 lines

from line 58
5858 ```
5959 
6060 ```bash CLI
61 ant beta:messages create --beta task-budgets-2026-03-13 \
62 --stream <<'YAML'
61 ant beta:messages create --beta task-budgets-2026-03-13 --stream <<'YAML'
6362 model: claude-opus-5-5
6463 max_tokens: 128000
6564 messages:
from line 223
224223 client = Anthropic::Client.new
225224 
226225 stream = client.beta.messages.stream(
227 model: "claude-opus-5-5",
226 model: Anthropic::Model::CLAUDE_OPUS_5_5,
228227 max_tokens: 128_000,
229228 messages: [
230229 { role: "user", content: "Review the codebase and propose a refactor plan." }
from line 633
634633 client = Anthropic::Client.new
635634 
636635 response = client.messages.create(
637 model: "claude-opus-5-5",
636 model: Anthropic::Model::CLAUDE_OPUS_5_5,
638637 max_tokens: 4096,
639638 messages: [
640639 { role: "user", content: "Review the codebase and propose a refactor plan." }
Feedback