Follow Discord
Sweep 31 Oct 2026 · 01:10Z Build v2.1.316 534 read Stable v2.1.309 Latest v2.1.316 Next v2.1.316 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261030T212610Z

396 pages moved out of 826 read.

Pages moved 396 significant first
Pages read 826 in this capture
Captured 21:26 UTC
Corpus hash 68200c8a9acb corpus-hash

What this read moved

126-150 of 396, page 6 of 16

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

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

from line 2326
23262326 
23272327### Implement retry logic for pause\_turn
23282328 
2329When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), the API might return `pause_turn` if the server-side sampling loop reaches its iteration limit (default 10). Handle this by continuing the conversation:
2329When you use [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), the API might return `pause_turn` if the server-side sampling loop reaches its iteration limit (default 10). Handle this by adding the paused response to your messages unchanged and sending the request again. If the response includes a `container`, [send its ID back](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#container-reuse) as well. Without it, the next request starts a new container, and files from earlier in the turn are lost.
23302330 
2331<CodeGroup exclude="shell">
2331<CodeGroup exclude="shell:cURL, shell:CLI">
2332 <CodeGroupItem language="cURL">
2333 This workflow needs more logic than a single shell command. Use the [Claude SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) to run it.
2334 </CodeGroupItem>
2335 
2336 <CodeGroupItem language="CLI">
2337 This workflow needs more logic than a single shell command. Use the [Claude SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) to run it.
2338 </CodeGroupItem>
2339 
23322340 ```python Python
2333 def handle_server_tool_conversation(client, user_query, tools, max_continuations=5):
2334 """
2335 Handle server tool conversations that might require multiple continuations.
2341 client = anthropic.Anthropic()
23362342 
2337 The server uses a sampling loop to run server tools. If the loop
2338 reaches its iteration limit, the API returns pause_turn. Continue the
2339 conversation by sending the response back to let Claude finish.
2340 """
2343 
2344 def handle_server_tool_conversation(client, user_query, tools, max_requests=5):
23412345 messages = [{"role": "user", "content": user_query}]
2346 container_id = None
23422347 
2343 for _ in range(max_continuations):
2348 for _ in range(max_requests):
23442349 response = client.messages.create(
23452350 model="claude-opus-5-5",
23462351 max_tokens=4096,
23472352 messages=messages,
23482353 tools=tools,
2354 container=container_id,
23492355 )
23502356 
23512357 if response.stop_reason != "pause_turn":
2352 # Claude finished processing: return the final response
2358 # Not paused: return the response
23532359 return response
23542360 
2355 # pause_turn: replace the full message list to maintain alternating roles
2356 messages = [
2357 {"role": "user", "content": user_query},
2358 {"role": "assistant", "content": response.content},
2359 ]
2361 # pause_turn: add the paused response as an assistant message, then continue
2362 messages.append({"role": "assistant", "content": response.content})
23602363 
2361 # Reached max continuations: return the last response
2364 # If the tools ran in a container, send its ID back so its files are kept
2365 if response.container:
2366 container_id = response.container.id
2367 
2368 # Still paused after max_requests requests: return the last response
23622369 return response
2370 
2371 
2372 response = handle_server_tool_conversation(
2373 client,
2374 "Use the code execution tool to find the 1,000th prime number.",
2375 [{"type": "code_execution_20250825", "name": "code_execution"}],
2376 )
2377 print(response.stop_reason)
23632378 ```
23642379 
23652380 ```typescript TypeScript
2381 const client = new Anthropic();
2382 
23662383 async function handleServerToolConversation(
23672384 client: Anthropic,
23682385 userQuery: string,
23692386 tools: Anthropic.ToolUnion[],
2370 maxContinuations = 5
2387 maxRequests = 5
23712388 ): Promise<Anthropic.Message> {
2372 let messages: Anthropic.MessageParam[] = [{ role: "user", content: userQuery }];
2389 const messages: Anthropic.MessageParam[] = [{ role: "user", content: userQuery }];
2390 let containerId: string | null = null;
23732391 let response: Anthropic.Message;
2392 let requestCount = 0;
23742393 
2375 for (let i = 0; i < maxContinuations; i++) {
2394 do {
23762395 response = await client.messages.create({
23772396 model: "claude-opus-5-5",
23782397 max_tokens: 4096,
23792398 messages,
2380 tools
2399 tools,
2400 container: containerId
23812401 });
23822402 
23832403 if (response.stop_reason !== "pause_turn") {
2384 // Claude finished processing: return the final response
2404 // Not paused: return the response
23852405 return response;
23862406 }
23872407 
2388 // pause_turn: replace the full message list to maintain alternating roles
2389 messages = [
2390 { role: "user", content: userQuery },
2391 { role: "assistant", content: response.content }
2392 ];
2393 }
2408 // pause_turn: add the paused response as an assistant message, then continue
2409 messages.push({ role: "assistant", content: response.content });
23942410 
2395 // Reached max continuations: return the last response
2396 return response!;
2411 // If the tools ran in a container, send its ID back so its files are kept
2412 if (response.container) {
2413 containerId = response.container.id;
2414 }
2415 } while (++requestCount < maxRequests);
2416 
2417 // Still paused after maxRequests requests: return the last response
2418 return response;
23972419 }
2420 
2421 const response = await handleServerToolConversation(
2422 client,
2423 "Use the code execution tool to find the 1,000th prime number.",
2424 [{ type: "code_execution_20250825", name: "code_execution" }]
2425 );
2426 console.log(response.stop_reason);
23982427 ```
23992428 
24002429 ```csharp C#
2430 // A server tool turn can run for minutes, longer than the SDK's default timeout,
2431 // which it sets from MaxTokens (about 2 minutes at 4096).
2432 AnthropicClient client = new() { Timeout = TimeSpan.FromMinutes(10) };
2433 
24012434 static async Task<Message> HandleServerToolConversation(
24022435 AnthropicClient client,
24032436 string userQuery,
24042437 List<ToolUnion> tools,
2405 int maxContinuations = 5)
2438 int maxRequests = 5)
24062439 {
24072440 List<MessageParam> messages = [new UserMessageParam { Content = userQuery }];
2408 Message response = null!;
2441 MessageCreateParamsContainer? container = null;
2442 Message response;
2443 var requestCount = 0;
24092444 
2410 for (var i = 0; i < maxContinuations; i++)
2445 do
24112446 {
24122447 response = await client.Messages.Create(new MessageCreateParams
24132448 {
from line 2449
24142449 Model = Model.ClaudeOpus5_5,
24152450 MaxTokens = 4096,
24162451 Messages = messages,
2417 Tools = tools
2452 Tools = tools,
2453 Container = container
24182454 });
24192455 
2420 if (response.StopReason != "pause_turn")
2456 if (response.StopReason != StopReason.PauseTurn)
24212457 {
2422 // Claude finished processing: return the final response
2458 // Not paused: return the response
24232459 return response;
24242460 }
24252461 
2426 // pause_turn: replace the full message list to maintain alternating roles
2427 messages =
2428 [
2429 new UserMessageParam { Content = userQuery },
2430 new AssistantMessageParam
2431 {
2432 Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
2433 }
2434 ];
2435 }
2462 // pause_turn: add the paused response as an assistant message, then continue
2463 // Request and response blocks are separate types: copy each block's JSON unchanged
2464 messages.Add(new AssistantMessageParam
2465 {
2466 Content = response.Content.Select(block => new ContentBlockParam(block.Json)).ToList()
2467 });
24362468 
2437 // Reached max continuations: return the last response
2469 // If the tools ran in a container, send its ID back so its files are kept
2470 if (response.Container is not null)
2471 {
2472 container = response.Container.ID;
2473 }
2474 } while (++requestCount < maxRequests);
2475 
2476 // Still paused after maxRequests requests: return the last response
24382477 return response;
24392478 }
2479 
2480 var response = await HandleServerToolConversation(
2481 client,
2482 "Use the code execution tool to find the 1,000th prime number.",
2483 [new CodeExecutionTool20250825()]);
2484 Console.WriteLine(response.StopReason?.Raw());
24402485 ```
24412486 
24422487 ```go Go
from line 2489
24442489 client anthropic.Client,
24452490 userQuery string,
24462491 tools []anthropic.ToolUnionParam,
2447 maxContinuations int,
2492 maxRequests int,
24482493 ) (*anthropic.Message, error) {
2449 messages := []anthropic.MessageParam{anthropic.NewUserMessage(anthropic.NewTextBlock(userQuery))}
2494 messages := []anthropic.MessageParam{
2495 anthropic.NewUserMessage(anthropic.NewTextBlock(userQuery)),
2496 }
2497 var container anthropic.MessageCreateParamsContainerUnion
24502498 var response *anthropic.Message
24512499 var err error
24522500 
2453 for range maxContinuations {
2501 for range maxRequests {
24542502 response, err = client.Messages.New(context.TODO(), anthropic.MessageNewParams{
24552503 Model: anthropic.ModelClaudeOpus5_5,
24562504 MaxTokens: 4096,
24572505 Messages: messages,
24582506 Tools: tools,
2507 Container: container,
24592508 })
24602509 if err != nil {
24612510 return nil, err
24622511 }
24632512 
2464 if response.StopReason != "pause_turn" {
2465 // Claude finished processing: return the final response
2513 if response.StopReason != anthropic.StopReasonPauseTurn {
2514 // Not paused: return the response
24662515 return response, nil
24672516 }
24682517 
2469 // pause_turn: replace the full message list to maintain alternating roles
2470 var contentParams []anthropic.ContentBlockParamUnion
2471 for _, block := range response.Content {
2472 contentParams = append(contentParams, block.ToParam())
2518 // pause_turn: add the paused response as an assistant message, then continue
2519 messages = append(messages, response.ToParam())
2520 
2521 // If the tools ran in a container, send its ID back so its files are kept
2522 if response.Container.ID != "" {
2523 container.OfString = anthropic.String(response.Container.ID)
24732524 }
2474 messages = []anthropic.MessageParam{
2475 anthropic.NewUserMessage(anthropic.NewTextBlock(userQuery)),
2476 anthropic.NewAssistantMessage(contentParams...),
2477 }
24782525 }
24792526 
2480 // Reached max continuations: return the last response
2527 // Still paused after maxRequests requests: return the last response
24812528 return response, nil
24822529 }
2530 
2531 func main() {
2532 client := anthropic.NewClient()
2533 
2534 response, err := handleServerToolConversation(
2535 client,
2536 "Use the code execution tool to find the 1,000th prime number.",
2537 []anthropic.ToolUnionParam{
2538 {OfCodeExecutionTool20250825: &anthropic.CodeExecutionTool20250825Param{}},
2539 },
2540 5,
2541 )
2542 if err != nil {
2543 log.Fatal(err)
2544 }
2545 fmt.Println(response.StopReason)
2546 }
24832547 ```
24842548 
24852549 ```java Java
2486 static Message handleServerToolConversation(
2550 Message handleServerToolConversation(
24872551 AnthropicClient client,
24882552 String userQuery,
2489 List<Tool> tools,
2490 int maxContinuations
2553 List<ToolUnion> tools,
2554 int maxRequests
24912555 ) {
2556 var params = MessageCreateParams.builder()
2557 .model(Model.CLAUDE_OPUS_5_5)
2558 .maxTokens(4096L)
2559 .tools(tools)
2560 .addUserMessage(userQuery);
24922561 Message response = null;
24932562 
2494 for (int i = 0; i < maxContinuations; i++) {
2495 // Rebuild the params each iteration so messages aren't accumulated
2496 MessageCreateParams.Builder params = MessageCreateParams.builder()
2497 .model(Model.CLAUDE_OPUS_5_5)
2498 .maxTokens(4096L)
2499 .addUserMessage(userQuery);
2500 tools.forEach(params::addTool);
2501 if (response != null) {
2502 params.addMessage(response);
2503 }
2504 
2563 for (int request = 0; request < maxRequests; request++) {
25052564 response = client.messages().create(params.build());
25062565 
2507 if (!response.stopReason().map(StopReason.PAUSE_TURN::equals).orElse(false)) {
2508 // Claude finished processing: return the final response
2566 boolean paused = response.stopReason().filter(StopReason.PAUSE_TURN::equals).isPresent();
2567 if (!paused) {
2568 // Not paused: return the response
25092569 return response;
25102570 }
2511 // pause_turn: loop again and send the response back
2571 
2572 // pause_turn: add the paused response as an assistant message, then continue
2573 params.addMessage(response);
2574 
2575 // If the tools ran in a container, send its ID back so its files are kept
2576 response.container().ifPresent(container -> params.container(container.id()));
25122577 }
25132578 
2514 // Reached max continuations: return the last response
2579 // Still paused after maxRequests requests: return the last response
25152580 return response;
25162581 }
2582 
2583 void main() {
2584 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
2585 
2586 Message response = handleServerToolConversation(
2587 client,
2588 "Use the code execution tool to find the 1,000th prime number.",
2589 List.of(ToolUnion.ofCodeExecutionTool20250825(CodeExecutionTool20250825.builder().build())),
2590 5
2591 );
2592 response.stopReason().ifPresent(IO::println);
2593 }
25172594 ```
25182595 
25192596 ```php PHP
2597 $client = new Client();
2598 
25202599 function handle_server_tool_conversation(
25212600 Client $client,
25222601 string $userQuery,
25232602 array $tools,
2524 int $maxContinuations = 5
2525 ) {
2603 int $maxRequests = 5,
2604 ): Message {
25262605 $messages = [['role' => 'user', 'content' => $userQuery]];
2527 $response = null;
2606 $containerId = null;
2607 $requestCount = 0;
25282608 
2529 for ($i = 0; $i < $maxContinuations; $i++) {
2609 do {
25302610 $response = $client->messages->create(
25312611 maxTokens: 4096,
25322612 messages: $messages,
2533 model: 'claude-opus-5-5',
2613 model: Model::CLAUDE_OPUS_5_5,
25342614 tools: $tools,
2615 container: $containerId,
25352616 );
25362617 
2537 if ($response->stopReason !== 'pause_turn') {
2538 // Claude finished processing: return the final response
2618 if ($response->stopReason !== StopReason::PAUSE_TURN->value) {
2619 // Not paused: return the response
25392620 return $response;
25402621 }
25412622 
2542 // pause_turn: replace the full message list to maintain alternating roles
2543 $messages = [
2544 ['role' => 'user', 'content' => $userQuery],
2545 ['role' => 'assistant', 'content' => $response->content],
2546 ];
2547 }
2623 // pause_turn: add the paused response as an assistant message, then continue
2624 $messages[] = ['role' => 'assistant', 'content' => $response->content];
25482625 
2549 // Reached max continuations: return the last response
2626 // If the tools ran in a container, send its ID back so its files are kept
2627 $containerId = $response->container->id ?? $containerId;
2628 } while (++$requestCount < $maxRequests);
2629 
2630 // Still paused after $maxRequests requests: return the last response
25502631 return $response;
25512632 }
2633 
2634 $response = handle_server_tool_conversation(
2635 $client,
2636 'Use the code execution tool to find the 1,000th prime number.',
2637 [new CodeExecutionTool20250825()],
2638 );
2639 echo $response->stopReason, PHP_EOL;
25522640 ```
25532641 
25542642 ```ruby Ruby
2555 def handle_server_tool_conversation(client, user_query, tools, max_continuations: 5)
2643 client = Anthropic::Client.new
2644 
2645 def handle_server_tool_conversation(client, user_query, tools, max_requests: 5)
25562646 messages = [{ role: "user", content: user_query }]
2647 container_id = nil
25572648 response = nil
25582649 
2559 max_continuations.times do
2650 max_requests.times do
25602651 response = client.messages.create(
2561 model: "claude-opus-5-5",
2652 model: Anthropic::Model::CLAUDE_OPUS_5_5,
25622653 max_tokens: 4096,
2563 messages: messages,
2564 tools: tools
2654 messages:,
2655 tools:,
2656 container: container_id
25652657 )
25662658 
2567 # Claude finished processing: return the final response
2659 # Not paused: return the response
25682660 return response unless response.stop_reason == :pause_turn
25692661 
2570 # pause_turn: replace the full message list to maintain alternating roles
2571 messages = [
2572 { role: "user", content: user_query },
2573 { role: "assistant", content: response.content }
2574 ]
2662 # pause_turn: add the paused response as an assistant message, then continue
2663 messages << { role: "assistant", content: response.content }
2664 
2665 # If the tools ran in a container, send its ID back so its files are kept
2666 container_id = response.container&.id || container_id
25752667 end
25762668 
2577 # Reached max continuations: return the last response
2669 # Still paused after max_requests requests: return the last response
25782670 response
25792671 end
2672 
2673 response = handle_server_tool_conversation(
2674 client,
2675 "Use the code execution tool to find the 1,000th prime number.",
2676 [Anthropic::CodeExecutionTool20250825.new]
2677 )
2678 puts response.stop_reason
25802679 ```
25812680</CodeGroup>
2681 
2682The function returns the last response, which holds only the final part of the turn. To show the whole turn or to continue the conversation, keep the paused responses as well.
25822683 
25832684## Stop reasons versus errors
25842685 

build-with-claude/multilingual-support Changed · +19 / -19 lines

from line 41
4141 
4242The following table shows zero-shot chain-of-thought evaluation scores for Claude models across languages, expressed as a percentage relative to English performance (100%):
4343 
44| Language | Claude Sonnet 4.5 (deprecated)1 | Claude Haiku 4.51 |
45| --------------------------------- | ------------------------------- | ----------------- |
46| English (baseline, fixed to 100%) | 100% | 100% |
47| Spanish | 98.2% | 96.4% |
48| Portuguese (Brazil) | 97.8% | 96.1% |
49| Italian | 97.9% | 96.0% |
50| French | 97.5% | 95.7% |
51| Indonesian | 97.3% | 94.2% |
52| German | 97.0% | 94.3% |
53| Arabic | 97.2% | 92.5% |
54| Chinese (Simplified) | 96.9% | 94.2% |
55| Korean | 96.7% | 93.3% |
56| Japanese | 96.8% | 93.5% |
57| Hindi | 96.7% | 92.4% |
58| Bengali | 95.4% | 90.4% |
59| Swahili | 91.1% | 78.3% |
60| Yoruba | 79.7% | 52.7% |
44| Language | Claude Sonnet 4.5 (deprecated)<sup>1</sup> | Claude Haiku 4.5<sup>1</sup> |
45| --------------------------------- | ------------------------------------------ | ---------------------------- |
46| English (baseline, fixed to 100%) | 100% | 100% |
47| Spanish | 98.2% | 96.4% |
48| Portuguese (Brazil) | 97.8% | 96.1% |
49| Italian | 97.9% | 96.0% |
50| French | 97.5% | 95.7% |
51| Indonesian | 97.3% | 94.2% |
52| German | 97.0% | 94.3% |
53| Arabic | 97.2% | 92.5% |
54| Chinese (Simplified) | 96.9% | 94.2% |
55| Korean | 96.7% | 93.3% |
56| Japanese | 96.8% | 93.5% |
57| Hindi | 96.7% | 92.4% |
58| Bengali | 95.4% | 90.4% |
59| Swahili | 91.1% | 78.3% |
60| Yoruba | 79.7% | 52.7% |
6161 
621 With [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking).
62<sup>1</sup> With [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking).
6363 
6464<Note>
6565 These metrics are based on [MMLU (Massive Multitask Language Understanding)](https://en.wikipedia.org/wiki/MMLU) English test sets that were translated into 14 additional languages by professional human translators, as documented in [OpenAI’s simple-evals repository](https://github.com/openai/simple-evals/blob/main/multilingual_mmlu_benchmark_results.md). The use of human translators for this evaluation ensures high-quality translations, particularly important for languages with fewer digital resources.

build-with-claude/pdf-support Changed · +5 / -44 lines

### Amazon Bedrock PDF support #### Document processing modes #### Key limitations #### Common issues

from line 34
3434 note: Base64 sources only.
3535 Amazon Bedrock (InvokeModel):
3636 availability: ga
37 note: Base64 sources only. With the Converse API, visual PDF analysis needs citations turned on.
37 note: Base64 sources only.
3838 Claude Models on Google Cloud (Google managed):
3939 availability: ga
4040 note: Base64 sources only.
from line 72
7272 
7373### Supported platforms and models
7474 
75All [active models](https://platform.claude.com/docs/en/models/overview) support PDF processing. For PDF support through Amazon Bedrock’s Converse API, see [Amazon Bedrock PDF support](https://platform.claude.com/docs/en/build-with-claude/pdf-support#amazon-bedrock-pdf-support).
75All [active models](https://platform.claude.com/docs/en/models/overview) support PDF processing.
7676 
77### Amazon Bedrock PDF support
78 
79When using PDF support through the Converse API, part of [Claude on Amazon Bedrock (Opus 4.6 and earlier)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy), there are two distinct document processing modes:
80 
8177<Note>
82 **Important:** To access Claude’s full visual PDF understanding capabilities in the Converse API, you must enable citations. Without citations enabled, the API falls back to basic text extraction only. Learn more about [working with citations](https://platform.claude.com/docs/en/build-with-claude/citations).
83</Note>
84 
85#### Document processing modes
86 
871. **Converse Document Chat** (Original mode - Text extraction only)
88 
89 * Provides basic text extraction from PDFs
90 * Cannot analyze images, charts, or visual layouts within PDFs
91 * Uses approximately 1,000 tokens for a 3-page PDF
92 * Automatically used when citations are not enabled
93 
942. **Claude PDF Chat** (New mode - Full visual understanding)
95 
96 * Provides complete visual analysis of PDFs
97 * Can understand and analyze charts, graphs, images, and visual layouts
98 * Processes each page as both text and image for comprehensive understanding
99 * Uses approximately 7,000 tokens for a 3-page PDF
100 * **Requires citations to be enabled** in the Converse API
101 
102#### Key limitations
103 
104* **Converse API:** Visual PDF analysis requires citations to be enabled. There is currently no option to use visual analysis without citations (unlike the InvokeModel API).
105* **InvokeModel API:** Provides full control over PDF processing without forced citations.
106 
107#### Common issues
108 
109If Claude isn’t seeing images or charts in your PDFs when using the Converse API, you likely need to enable the citations flag. Without it, Converse falls back to basic text extraction only.
110 
111<Note>
112 This is a known constraint with the Converse API. For applications that require visual PDF analysis without citations, consider using the InvokeModel API instead.
113</Note>
114 
115<Note>
11678 Plain text files such as .txt, .csv, or .md can be used directly in document blocks: upload them to the Files API with MIME type `text/plain` and reference them by `file_id`. Binary formats such as .xlsx or .docx are not supported in document blocks, so convert them to text or PDF first. See [Working with other file formats](https://platform.claude.com/docs/en/build-with-claude/files#working-with-other-file-formats).
11779</Note>
11880 
from line 1031
10691031 
10701032The token count of a PDF file depends on the total text extracted from the document and the number of pages:
10711033 
1072* Text token costs: Each page typically uses 1,500–3,000 tokens per page depending on content density. Standard API pricing applies with no additional PDF fees.
1034* Text token costs: Each page typically uses 1,500–3,000 tokens depending on content density. Standard API pricing applies with no additional PDF fees.
10731035* Image token costs: Because each page is converted into an image, the same [image-based cost calculations](https://platform.claude.com/docs/en/build-with-claude/vision#evaluate-image-size) are applied.
10741036 
10751037You can use [token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) to estimate costs for your specific PDFs.
from line 1994
20321994| Available | Claude API, [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) |
20331995| Available<sup>1</sup> | [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry) |
20341996| Available<sup>2</sup> | [Amazon Bedrock (InvokeModel)](https://platform.claude.com/docs/en/build-with-claude/claude-on-amazon-bedrock-legacy) |
2035| Available<sup>3</sup> | [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) |
1997| Available<sup>2</sup> | [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) |
20361998 
203719991. `file_id` sources need a Hosted on Anthropic deployment.
20382. Base64 sources only. With the Converse API, visual PDF analysis needs citations turned on.
20393. Base64 sources only.
20002. Base64 sources only.
20402001 
20412002#### [Managed Agents](https://platform.claude.com/docs/en/managed-agents/overview)
20422003 

build-with-claude/thinking-troubleshooting Changed · +23 / -23 lines

from line 18
1818 
1919The table lists what each model supports, what it defaults to, and which `thinking.type` values it rejects with a 400 error; any value not listed as rejected is accepted. Only Claude Sonnet 5.5 accepts `"between_tools"`, and it takes that value in place of `"disabled"`.
2020 
21| Model | Thinking types | Default | Rejected with 400 |
22| --------------------- | -------------------------------- | --------- | -------------------------- |
23| Claude Fable 5.1 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
24| Claude Mythos 5.1 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
25| Claude Fable 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
26| Claude Mythos 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
27| Claude Mythos Preview | Adaptive, extended | Always on | `"disabled"` |
28| Claude Opus 5.5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
29| Claude Opus 5 | Adaptive only | On | `"enabled"`, `"disabled"`2 |
30| Claude Opus 4.8 | Adaptive only | Off | `"enabled"` |
31| Claude Opus 4.7 | Adaptive only | Off | `"enabled"` |
32| Claude Sonnet 5.5 | Adaptive, `between_tools`3 | On | `"enabled"`, `"disabled"` |
33| Claude Sonnet 5 | Adaptive only | On | `"enabled"` |
34| Claude Haiku 5.5 | Adaptive only | On | `"enabled"`, `"disabled"`2 |
35| Claude Opus 4.6 | Adaptive, extended (deprecated)1 | Off | None |
36| Claude Sonnet 4.6 | Adaptive, extended (deprecated)1 | Off | None |
37| Claude Opus 4.5 | Extended only | Off | `"adaptive"` |
38| Claude Haiku 4.5 | Extended only | Off | `"adaptive"` |
39| Claude Sonnet 4.5 | Extended only | Off | `"adaptive"` |
21| Model | Thinking types | Default | Rejected with 400 |
22| --------------------- | ------------------------------------------- | --------- | ------------------------------------- |
23| Claude Fable 5.1 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
24| Claude Mythos 5.1 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
25| Claude Fable 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
26| Claude Mythos 5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
27| Claude Mythos Preview | Adaptive, extended | Always on | `"disabled"` |
28| Claude Opus 5.5 | Adaptive only | Always on | `"enabled"`, `"disabled"` |
29| Claude Opus 5 | Adaptive only | On | `"enabled"`, `"disabled"`<sup>2</sup> |
30| Claude Opus 4.8 | Adaptive only | Off | `"enabled"` |
31| Claude Opus 4.7 | Adaptive only | Off | `"enabled"` |
32| Claude Sonnet 5.5 | Adaptive, `between_tools`<sup>3</sup> | On | `"enabled"`, `"disabled"` |
33| Claude Sonnet 5 | Adaptive only | On | `"enabled"` |
34| Claude Haiku 5.5 | Adaptive only | On | `"enabled"`, `"disabled"`<sup>2</sup> |
35| Claude Opus 4.6 | Adaptive, extended (deprecated)<sup>1</sup> | Off | None |
36| Claude Sonnet 4.6 | Adaptive, extended (deprecated)<sup>1</sup> | Off | None |
37| Claude Opus 4.5 | Extended only | Off | `"adaptive"` |
38| Claude Haiku 4.5 | Extended only | Off | `"adaptive"` |
39| Claude Sonnet 4.5 | Extended only | Off | `"adaptive"` |
4040 
41*1 `enabled` and `budget_tokens` still work on these models but are deprecated; use adaptive thinking instead.*\
42*2 Claude Opus 5 and Claude Haiku 5.5 accept `"disabled"` at [effort](https://platform.claude.com/docs/en/build-with-claude/effort) `high` or below; combining it with effort `xhigh` or `max` returns a 400 error. On Claude Opus 5, this restriction is enforced on each request. On Claude Haiku 5.5, a per-message effort that differs from the level in effect also returns a 400 error.*\
43*3 Claude Sonnet 5.5 accepts `"between_tools"` at effort `high` or below. Combining it with effort `xhigh` or `max` returns a 400 error, and so does a per-message effort that differs from the level in effect.*
41*<sup>1</sup> `enabled` and `budget_tokens` still work on these models but are deprecated; use adaptive thinking instead.*\
42*<sup>2</sup> Claude Opus 5 and Claude Haiku 5.5 accept `"disabled"` at [effort](https://platform.claude.com/docs/en/build-with-claude/effort) `high` or below; combining it with effort `xhigh` or `max` returns a 400 error. On Claude Opus 5, this restriction is enforced on each request. On Claude Haiku 5.5, a per-message effort that differs from the level in effect also returns a 400 error.*\
43*<sup>3</sup> Claude Sonnet 5.5 accepts `"between_tools"` at effort `high` or below. Combining it with effort `xhigh` or `max` returns a 400 error, and so does a per-message effort that differs from the level in effect.*
4444 
4545Models marked `Always on` cannot turn thinking off. Models marked `On` default to thinking. Claude Opus 5, Claude Sonnet 5, and Claude Haiku 5.5 accept `thinking: {type: "disabled"}`. On Claude Sonnet 5.5, send `thinking: {type: "between_tools"}` to turn off up-front thinking.
4646 

cli-sdks-libraries/libraries/openai-sdk Changed · +73 / -68 lines

from line 206
206206Here are the most substantial differences from using OpenAI:
207207 
208208* The `strict` parameter for function calling is ignored, which means the tool use JSON is not guaranteed to follow the supplied schema. For guaranteed schema conformance, use the native [Claude API with structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs).
209* Audio input is not supported; it is ignored and stripped from input.
209* `response_format` accepts only `json_schema` with `strict: true`. A request that sets `json_object` or `text` returns a 400 error.
210* Audio and file inputs are not supported. A request that includes an `input_audio` or `file` content part returns a 400 error.
210211* Prompt caching is not supported, but it is supported in the [Anthropic SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview).
211212* System/developer messages are hoisted and concatenated into the top-level `system` field, wherever they appear in the conversation. To add system instructions partway through a conversation, use [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages) in the native Claude API.
212213 
from line 223
222223 
223224### Thinking support
224225 
225You can enable [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) by adding the `thinking` parameter. On current models thinking is adaptive, with Claude determining when and how deeply to think, and on Claude 5 models it is on by default; manually configured extended thinking is a legacy mode. Although thinking improves Claude’s reasoning for complex tasks, the OpenAI SDK doesn’t return Claude’s thinking. For full thinking features, including [summarized thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#summarized-thinking), use the native Claude API.
226On Claude 5 models and Claude Mythos Preview, [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) is on by default, so you can omit the `thinking` field. To use thinking on other models through the compatibility layer, set the `thinking` field of the request body to `{"type": "enabled", "budget_tokens": N}`. `N` must be at least 1,024 and less than `max_tokens` or `max_completion_tokens`, whichever you set.
226227 
228The compatibility layer differs from the native Claude API in the following ways:
229 
230* The response doesn’t include Claude’s thinking. The native Claude API can return [summarized thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#summarized-thinking).
231* Setting `thinking` to `{"type": "adaptive"}` returns a 400 error.
232* On [models that reject `enabled`](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#rejected-configurations) in the native Claude API, the compatibility layer converts `enabled` to adaptive thinking. On those models, `budget_tokens` is required but has no effect.
233 
234The OpenAI SDK has no `thinking` parameter, so the following example sends it as an extra field in the request body.
235 
227236<CodeGroup exclude="shell, php">
228237 ```python Python
229238 response = client.chat.completions.create(
from line 314
305314 
306315#### Simple fields
307316 
308| Field | Support status |
309| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
310| `model` | Use Claude model names |
311| `max_tokens` | Fully supported |
312| `max_completion_tokens` | Fully supported |
313| `stream` | Fully supported |
314| `stream_options` | Fully supported |
315| `top_p` | Passed through to the model. Claude 4.7 and later models and Claude Mythos Preview return a 400 error for any value other than `0.99`, the default, so omit it. A request that sets both `temperature` and `top_p` also returns a 400 error. See [Working with messages](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). |
316| `parallel_tool_calls` | Fully supported |
317| `stop` | All non-whitespace stop sequences work |
318| `temperature` | Between 0 and 1 (inclusive). Values greater than 1 are capped at 1. On Claude 4.7 and later models and Claude Mythos Preview, any value below 1 returns a 400 error, so omit it. See [Working with messages](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). |
319| `n` | Must be exactly 1 |
320| `logprobs` | Ignored |
321| `metadata` | Ignored |
322| `response_format` | Ignored. For JSON output, use [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) with the native Claude API. |
323| `prediction` | Ignored |
324| `presence_penalty` | Ignored |
325| `frequency_penalty` | Ignored |
326| `seed` | Ignored |
327| `service_tier` | Ignored |
328| `audio` | Ignored |
329| `logit_bias` | Ignored |
330| `store` | Ignored |
331| `user` | Ignored |
332| `modalities` | Ignored |
333| `top_logprobs` | Ignored |
334| `reasoning_effort` | Ignored |
317| Field | Support status |
318| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
319| `model` | Use Claude model names |
320| `max_tokens` | Fully supported |
321| `max_completion_tokens` | Fully supported |
322| `stream` | Fully supported |
323| `stream_options` | Fully supported |
324| `top_p` | Passed through to the model. Claude 4.7 and later models and Claude Mythos Preview return a 400 error for any value other than `0.99`, the default, so omit it. A request that sets both `temperature` and `top_p` also returns a 400 error. See [Using the Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). |
325| `parallel_tool_calls` | Fully supported |
326| `tool_choice` | Supported with limits. `"required"` and a named function force a tool call. Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and Claude Mythos 5.1 don’t support forced tool use and return a 400 error, so use `"auto"` on those models. See [Forcing tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use). |
327| `stop` | All non-whitespace stop sequences work |
328| `temperature` | Between 0 and 1 (inclusive). Values greater than 1 are capped at 1. On Claude 4.7 and later models and Claude Mythos Preview, any value below 1 returns a 400 error, so omit it. See [Using the Messages API](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). |
329| `n` | Must be exactly 1. Any other value returns a 400 error. |
330| `response_format` | Supported with limits. Only `json_schema` with `strict: true` is accepted, and the structured outputs [JSON Schema limitations](https://platform.claude.com/docs/en/build-with-claude/structured-outputs#json-schema-limitations) apply. Any other value, including `json_object` and `text`, returns a 400 error. |
331| `logprobs` | Ignored |
332| `metadata` | Ignored |
333| `prediction` | Ignored |
334| `presence_penalty` | Ignored |
335| `frequency_penalty` | Ignored |
336| `seed` | Ignored |
337| `service_tier` | Ignored |
338| `audio` | Ignored |
339| `logit_bias` | Ignored |
340| `store` | Ignored |
341| `user` | Ignored |
342| `modalities` | Ignored |
343| `top_logprobs` | Ignored |
344| `reasoning_effort` | Ignored |
335345 
336346#### `tools` / `functions` fields
337347 
from line 408
398408 <Tab title="User role">
399409 Fields for `messages[n].role == "user"`
400410 
401 | Field | Variant | Sub-field | Support status |
402 | --------- | -------------------------------- | --------- | --------------- |
403 | `content` | `string` | | Fully supported |
404 | | `array`, `type == "text"` | | Fully supported |
405 | | `array`, `type == "image_url"` | `url` | Fully supported |
406 | | | `detail` | Ignored |
407 | | `array`, `type == "input_audio"` | | Ignored |
408 | | `array`, `type == "file"` | | Ignored |
409 | `name` | | | Ignored |
411 | Field | Variant | Sub-field | Support status |
412 | --------- | -------------------------------- | --------- | ------------------- |
413 | `content` | `string` | | Fully supported |
414 | | `array`, `type == "text"` | | Fully supported |
415 | | `array`, `type == "image_url"` | `url` | Fully supported |
416 | | | `detail` | Ignored |
417 | | `array`, `type == "input_audio"` | | Returns a 400 error |
418 | | `array`, `type == "file"` | | Returns a 400 error |
419 | `name` | | | Ignored |
410420 </Tab>
411421 
412422 <Tab title="Assistant role">
from line 436
426436 <Tab title="Tool role">
427437 Fields for `messages[n].role == "tool"`
428438 
429 | Field | Variant | Support status |
430 | -------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
431 | `content` | `string` | Fully supported |
432 | | `array`, `type == "text"` | Fully supported |
433 | `tool_call_id` | | Fully supported |
434 | `tool_choice` | | Supported. `"required"` and named-function values force a tool call; Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and Claude Mythos 5.1 don’t support forced tool use and return an error, so use `"auto"` on those models. See [Forcing tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use). |
435 | `name` | | Ignored |
439 | Field | Variant | Support status |
440 | -------------- | ------------------------- | --------------- |
441 | `content` | `string` | Fully supported |
442 | | `array`, `type == "text"` | Fully supported |
443 | `tool_call_id` | | Fully supported |
444 | `name` | | Ignored |
436445 </Tab>
437446 
438447 <Tab title="Function role">
439448 Fields for `messages[n].role == "function"`
440449 
441 | Field | Variant | Support status |
442 | ------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
443 | `content` | `string` | Fully supported |
444 | | `array`, `type == "text"` | Fully supported |
445 | `tool_choice` | | Supported. `"required"` and named-function values force a tool call; Claude Opus 5.5, Claude Sonnet 5.5, Claude Fable 5.1, and Claude Mythos 5.1 don’t support forced tool use and return an error, so use `"auto"` on those models. See [Forcing tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#forcing-tool-use). |
446 | `name` | | Ignored |
450 | Field | Variant | Support status |
451 | --------- | -------- | ---------------------------------- |
452 | `content` | `string` | Fully supported |
453 | `name` | | Required, but the value is ignored |
447454 </Tab>
448455 </Tabs>
449456</Accordion>
from line 469
462469| `object` | Fully supported |
463470| `created` | Fully supported |
464471| `model` | Fully supported |
465| `finish_reason` | Fully supported |
466| `content` | Fully supported |
467472| `usage.completion_tokens` | Fully supported |
468473| `usage.prompt_tokens` | Fully supported |
469474| `usage.total_tokens` | Fully supported |
from line 486
481486 
482487### Header compatibility
483488 
484Although the OpenAI SDK automatically manages headers, here is the complete list of headers supported by the Claude API for developers who need to work with them directly.
489If your code reads or sets headers directly, the following table shows how the Claude API handles OpenAI’s headers.
485490 
486| Header | Support status |
487| -------------------------------- | ------------------- |
488| `x-ratelimit-limit-requests` | Fully supported |
489| `x-ratelimit-limit-tokens` | Fully supported |
490| `x-ratelimit-remaining-requests` | Fully supported |
491| `x-ratelimit-remaining-tokens` | Fully supported |
492| `x-ratelimit-reset-requests` | Fully supported |
493| `x-ratelimit-reset-tokens` | Fully supported |
494| `retry-after` | Fully supported |
495| `request-id` | Fully supported |
496| `openai-version` | Always `2020-10-01` |
497| `authorization` | Fully supported |
498| `openai-processing-ms` | Always empty |
491| Header | Support status |
492| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
493| `x-ratelimit-limit-requests` | Not returned. The request limit is in `x-ratelimit-requests`. |
494| `x-ratelimit-limit-tokens` | Not returned. The token limit is in `x-ratelimit-tokens`. |
495| `x-ratelimit-remaining-requests` | Fully supported |
496| `x-ratelimit-remaining-tokens` | Fully supported |
497| `x-ratelimit-reset-requests` | Fully supported |
498| `x-ratelimit-reset-tokens` | Fully supported |
499| `retry-after` | Fully supported |
500| `x-request-id` | Fully supported. Carries the Claude API [request ID](https://platform.claude.com/docs/en/api/errors#request-id) in place of the `request-id` header. |
501| `openai-version` | Not returned |
502| `openai-processing-ms` | Not returned |
503| `authorization` | Fully supported |
499504 
500505## Availability
501506 

manage-claude/rate-limits-api Changed · +236 / -5 lines

### Set workspace rate limits

from line 1
11---
22title: Rate Limits API
33url: https://platform.claude.com/docs/en/manage-claude/rate-limits-api
4description: Programmatically query your organization's API rate limits with the Rate Limits API.
4description: Programmatically read your organization's API rate limits and set workspace rate limits with the Rate Limits 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 on the [Organization](https://platform.claude.com/settings/organization) page (`platform.claude.com/settings/organization`) in the Claude Console.
99</Tip>
1010 
11The Rate Limits API provides programmatic access to the rate limits configured for your organization and its workspaces. This is the same information shown on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console.
11The Rate Limits API provides programmatic access to the rate limits configured for your organization and its workspaces. This is the same information shown on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console. You can also use it to set and clear a workspace’s rate limits.
1212 
1313Use this API to:
1414 
from line 15
1515* **Keep gateways and proxies in sync:** Read your current limits at startup and on a schedule instead of hardcoding values that drift when Anthropic adjusts them.
1616* **Power internal alerting:** Compare usage data from the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) against your configured limits.
1717* **Audit workspace configuration:** Verify that workspace overrides match what your provisioning automation expects.
18* **Manage workspace limits from code:** Set and clear each workspace’s limits from your provisioning automation instead of editing them in the Console.
1819 
1920<Check>
2021 **Admin API credentials required.** These endpoints are part of the Admin API. You can access them using an [Admin API key](https://platform.claude.com/docs/en/manage-claude/admin-api-keys), an OAuth token with the `org:admin` scope, or a personal or service account key that isn’t scoped to a workspace; workspace API keys don’t work. See [Authentication](https://platform.claude.com/docs/en/manage-claude/admin-api#authentication) for details.
from line 483
482483 
483484## Workspace rate limits
484485 
485The `/v1/organizations/workspaces/{workspace_id}/rate_limits` endpoint returns the rate limit overrides configured for a single workspace. To also see the values the workspace inherits, pass `include_inherited=true` (see [Include inherited values](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#include-inherited-values)).
486The `/v1/organizations/workspaces/{workspace_id}/rate_limits` endpoint returns the rate limit overrides configured for a single workspace. To also see the values the workspace inherits, pass `include_inherited=true` (see [Include inherited values](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#include-inherited-values)). To change the overrides, see [Set workspace rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#set-workspace-rate-limits).
486487 
487488By default, the response only includes overrides, so anything missing from it is inherited from the organization:
488489 
from line 948
947948}
948949```
949950 
951### Set workspace rate limits
952 
953To set or clear a workspace’s rate limits for one rate limit group, send a `POST` request to `/v1/organizations/workspaces/{workspace_id}/rate_limits/{rate_limit_id}`. For `rate_limit_id`, pass the `id` of the group’s entry from the organization endpoint, or the `rate_limit_id` of the group’s entry from the workspace list endpoint. To find the ID of a group the workspace doesn’t override yet, call the workspace list endpoint with `include_inherited=true`, which returns the groups you can set limits for. These IDs differ among organizations, so look them up in each organization you manage.
954 
955The request body has a `limits` array of one or more `{type, value}` entries, each for a different limiter type:
956 
957* A `value` that is an integer, zero or greater, sets the workspace’s override for that limiter type.
958* A `value` of `null` clears the override, so the workspace inherits the organization’s value again. Clearing a limiter type that has no override changes nothing.
959* Limiter types that the request doesn’t name keep their current values.
960 
961You can set these limiter types: `requests_per_minute`, `input_tokens_per_minute`, `output_tokens_per_minute`, `input_tokens_per_minute_cache_aware`, `tokens_per_minute`, `tokens_per_day`, `tool_uses_per_second`, and, where the list endpoints show them for your organization, the [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) limits `fast_itpmca` (input tokens per minute, cache-aware) and `fast_otpm` (output tokens per minute). Which of them a group accepts depends on its `group.type`:
962 
963* `model_group`: every type except `tool_uses_per_second`
964* `web_search`: `tool_uses_per_second` only
965* `batch`: `requests_per_minute` only
966 
967Other group types don’t accept any limiter type. You can clear any of the limiter types listed earlier on any group. The list endpoints can return limiter types that you can’t set, such as `enqueued_batch_requests`; sending one returns a 400 error.
968 
969The API stores a value above the organization’s limit for the same limiter type, but it enforces the lower of the two. The response’s `org_limit` shows the organization’s value.
970 
971Changes take effect within about an hour. Until a change takes effect, the workspace’s requests are still limited by the previous values.
972 
973The API checks the whole request before it changes anything, so an invalid entry fails the request with a 400 error and changes nothing. If a request passes validation, the API then applies the entries one at a time. If applying one fails, the request returns an error and the entries before it stay applied. Each entry sets or clears an absolute value, so you can safely send the same request again. A resend replaces any change that someone else made in between to the limiter types it names.
974 
975<Note>
976 Setting workspace rate limits isn’t available on [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws) yet.
977</Note>
978 
979Raise the workspace’s requests per minute for the Claude Opus 5.5 group to 2,000 and clear its input tokens per minute override:
980 
981<CodeGroup>
982 ```bash cURL
983 curl "https://api.anthropic.com/v1/organizations/workspaces/wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ/rate_limits/rlt_01NwFawrTvAijwqn8AjKVBPS" \
984 -H "x-api-key: $ANTHROPIC_API_KEY" \
985 -H "anthropic-version: 2023-06-01" \
986 -H "content-type: application/json" \
987 -d '{
988 "limits": [
989 {"type": "requests_per_minute", "value": 2000},
990 {"type": "input_tokens_per_minute", "value": null}
991 ]
992 }'
993 ```
994 
995 ```bash CLI
996 ant organization:workspaces:rate-limits update \
997 --workspace-id wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ \
998 --rate-limit-id rlt_01NwFawrTvAijwqn8AjKVBPS <<'YAML'
999 limits:
1000 - type: requests_per_minute
1001 value: 2000
1002 - type: input_tokens_per_minute
1003 value: null
1004 YAML
1005 ```
1006 
1007 ```python Python
1008 client = anthropic.Anthropic()
1009 
1010 entry = client.organization.workspaces.rate_limits.update(
1011 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1012 workspace_id="wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1013 limits=[
1014 {"type": "requests_per_minute", "value": 2000},
1015 {"type": "input_tokens_per_minute", "value": None},
1016 ],
1017 )
1018 
1019 for limit in entry.limits:
1020 print(f"{limit.type}: {limit.value}")
1021 ```
1022 
1023 ```typescript TypeScript
1024 const client = new Anthropic();
1025 
1026 const entry = await client.organization.workspaces.rateLimits.update(
1027 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1028 {
1029 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1030 limits: [
1031 { type: "requests_per_minute", value: 2000 },
1032 { type: "input_tokens_per_minute", value: null }
1033 ]
1034 }
1035 );
1036 
1037 for (const limit of entry.limits) {
1038 console.log(`${limit.type}: ${limit.value}`);
1039 }
1040 ```
1041 
1042 ```csharp C#
1043 AnthropicClient client = new();
1044 
1045 var entry = await client.Organization.Workspaces.RateLimits.Update(
1046 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1047 new()
1048 {
1049 WorkspaceID = "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1050 Limits =
1051 [
1052 new() { Type = "requests_per_minute", Value = 2000 },
1053 new() { Type = "input_tokens_per_minute", Value = null },
1054 ],
1055 }
1056 );
1057 
1058 foreach (var limit in entry.Limits)
1059 {
1060 Console.WriteLine($"{limit.Type}: {limit.Value}");
1061 }
1062 ```
1063 
1064 ```go Go
1065 client := anthropic.NewClient()
1066 
1067 entry, err := client.Organization.Workspaces.RateLimits.Update(
1068 context.Background(),
1069 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1070 anthropic.OrganizationWorkspaceRateLimitUpdateParams{
1071 WorkspaceID: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1072 Limits: []anthropic.WorkspaceRateLimitUpdateValueParam{
1073 {Type: "requests_per_minute", Value: anthropic.Int(2000)},
1074 {Type: "input_tokens_per_minute", Value: param.Null[int64]()},
1075 },
1076 },
1077 )
1078 if err != nil {
1079 log.Fatal(err)
1080 }
1081 
1082 for _, limit := range entry.Limits {
1083 fmt.Printf("%s: %d\n", limit.Type, limit.Value)
1084 }
1085 ```
1086 
1087 ```java Java
1088 import com.anthropic.models.organization.workspaces.ratelimits.RateLimitUpdateParams;
1089 import com.anthropic.models.organization.workspaces.ratelimits.WorkspaceRateLimitType;
1090 import com.anthropic.models.organization.workspaces.ratelimits.WorkspaceRateLimitUpdateValue;
1091 import java.util.Optional;
1092 
1093 void main() {
1094 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
1095 
1096 var entry = client.organization().workspaces().rateLimits().update(
1097 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1098 RateLimitUpdateParams.builder()
1099 .workspaceId("wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ")
1100 .addLimit(WorkspaceRateLimitUpdateValue.builder()
1101 .type(WorkspaceRateLimitType.REQUESTS_PER_MINUTE)
1102 .value(2000L)
1103 .build())
1104 .addLimit(WorkspaceRateLimitUpdateValue.builder()
1105 .type(WorkspaceRateLimitType.INPUT_TOKENS_PER_MINUTE)
1106 .value(Optional.empty())
1107 .build())
1108 .build()
1109 );
1110 
1111 for (var limit : entry.limits()) {
1112 IO.println(limit.type() + ": " + limit.value());
1113 }
1114 }
1115 ```
1116 
1117 ```php PHP
1118 use Anthropic\Organization\Workspaces\RateLimits\WorkspaceRateLimitUpdateValue;
1119 
1120 $client = new Client();
1121 
1122 $entry = $client->organization->workspaces->rateLimits->update(
1123 'rlt_01NwFawrTvAijwqn8AjKVBPS',
1124 workspaceID: 'wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ',
1125 limits: [
1126 WorkspaceRateLimitUpdateValue::with(type: 'requests_per_minute', value: 2000),
1127 WorkspaceRateLimitUpdateValue::with(type: 'input_tokens_per_minute', value: null),
1128 ],
1129 );
1130 
1131 foreach ($entry->limits as $limit) {
1132 echo "{$limit->type}: {$limit->value}\n";
1133 }
1134 ```
1135 
1136 ```ruby Ruby
1137 client = Anthropic::Client.new
1138 
1139 entry = client.organization.workspaces.rate_limits.update(
1140 "rlt_01NwFawrTvAijwqn8AjKVBPS",
1141 workspace_id: "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1142 limits: [
1143 { type: :requests_per_minute, value: 2000 },
1144 { type: :input_tokens_per_minute, value: nil }
1145 ]
1146 )
1147 
1148 entry.limits.each do |limit|
1149 puts "#{limit.type}: #{limit.value}"
1150 end
1151 ```
1152</CodeGroup>
1153 
1154The response is the group’s entry, in the shape of one entry in the workspace list endpoint’s `data` list. Its `limits` lists the workspace’s overrides on that group after the change: a cleared limiter type isn’t listed, and `limits` is empty when no override remains. The response includes the request’s changes even when a list request made right afterward doesn’t show them yet.
1155 
1156```json
1157{
1158 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ",
1159 "rate_limit_id": "rlt_01NwFawrTvAijwqn8AjKVBPS",
1160 "type": "workspace_rate_limit",
1161 "group_type": "model_group",
1162 "group": {
1163 "type": "model_group",
1164 "id": "rlg_01Hq7YkP3mZ9dTwRx4cVbN2s",
1165 "display_name": "Claude Opus 5.5"
1166 },
1167 "models": ["claude-opus-5-5"],
1168 "limits": [
1169 {
1170 "type": "requests_per_minute",
1171 "value": 2000,
1172 "org_limit": 4000,
1173 "source": { "type": "workspace" }
1174 }
1175 ]
1176}
1177```
1178 
1179The endpoint returns a 400 error for an invalid request or an archived workspace. It returns a 404 error when the workspace isn’t found, or when `rate_limit_id` names a group that the workspace can’t use.
1180 
9501181## Filtering by group type
9511182 
952Both endpoints accept an optional `group_type` query parameter that restricts the response to a single category:
1183Both list endpoints accept an optional `group_type` query parameter that restricts the response to a single category:
9531184 
9541185<CodeGroup>
9551186 ```bash cURL
from line 1340
11091340 
11101341### Can I update rate limits with this API?
11111342 
1112**For a workspace:** Yes. The [Set Workspace Rate Limits](https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/update) endpoint sets or clears a workspace’s overrides for one rate limit group. Pass the top-level `id` of the matching entry in the [organization endpoint’s response](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#list-all-organization-rate-limits) as `rate_limit_id`, not the `rlg_` `id` inside its `group`. The lower of the workspace override and the organization-level limit applies, and a change takes effect within about an hour. You can also set workspace rate limits on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console: select the workspace from the **Workspace** dropdown menu, and click **Edit** next to a model.
1343**For a workspace:** Yes. The [Set Workspace Rate Limits](https://platform.claude.com/docs/en/api/organization/workspaces/rate_limits/update) endpoint sets or clears a workspace’s overrides for one rate limit group. Pass the top-level `id` of the matching entry in the [organization endpoint’s response](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#list-all-organization-rate-limits) as `rate_limit_id`, not the `rlg_` `id` inside its `group`. The lower of the workspace override and the organization-level limit applies, and a change takes effect within about an hour. For the request body and an example, see [this page’s section on setting workspace rate limits](https://platform.claude.com/docs/en/manage-claude/rate-limits-api#set-workspace-rate-limits). You can also set workspace rate limits on the [Rate limits](https://platform.claude.com/usage/limits) page in the Claude Console: select the workspace from the **Workspace** dropdown menu, and click **Edit** next to a model.
11131344 
11141345**For an organization:** No. To request higher limits, see [Requesting higher limits](https://platform.claude.com/docs/en/api/rate-limits#requesting-higher-limits).
11151346 

managed-agents/self-hosted-sandboxes-operations Changed · +11 / -11 lines

from line 174
174174 
175175Use `POST /v1/environments/{environment_id}/work/{work_id}/stop` (python, typescript, ruby: `client.beta.environments.work.stop()`; go, csharp: `client.Beta.Environments.Work.Stop()`; java: `client.beta().environments().work().stop()`; php: `$client->beta->environments->work->stop()`; cli: `ant beta:environments:work stop`) to ask the worker handling a specific session to shut it down.
176176 
177By default the work item moves to `stopping`. The worker detects this on its next lease heartbeat, cancels the session’s in-flight tool call, and confirms the shutdown. The work item then becomes `stopped`.
177By default the work item moves to `stopping`. The worker detects this on its next lease heartbeat, cancels the session’s in-flight tool call, and confirms the shutdown. The work item then becomes `stopped`. A Python SDK worker instead lets the in-flight tool call complete first, which can take up to 2.5 minutes.
178178 
179Pass `force: true` (python: `force=True`; cli: `--force`) to mark the work item `stopped` immediately instead of waiting for the worker’s confirmation.
179Pass `force: true` (python: `force=True`; cli: `--force`) to mark the work item `stopped` immediately instead of waiting for the worker’s confirmation. A forced stop doesn’t end an in-flight tool call any sooner, because the worker still detects the stop on its next heartbeat.
180180 
181181Because these calls run from your operations tooling rather than the worker host, `ANTHROPIC_WORK_ID` isn’t set automatically. Set it to the target work item’s ID before running the following examples. To find a work item’s ID, list the environment’s work items through the [Environments Work endpoints](https://platform.claude.com/docs/en/api/beta/environments/work).
182182 
from line 319
319319 
320320## Stop workers gracefully
321321 
322A worker that is canceled while a session runs stops its in-flight work before it exits. If the session has [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory) attached, the worker skips the final sync but still uploads changed files and removes the store directories.
322A worker that is canceled while a session runs shuts that session down before it exits, as it does when you [stop a session](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-operations#stop-a-session-gracefully). If the session has [memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes-memory) attached, the worker skips the final sync but still uploads changed files and removes the store directories.
323323 
324324A killed process runs no teardown. To stop a worker cleanly:
325325 
3263261. **Make sure SIGTERM and SIGINT cancel the worker.** How depends on the worker:
327327 
328 | Worker | What to do |
329 | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
330 | `ant` CLI | Nothing. The CLI handles both signals itself: it cancels any in-flight tool call, posts its error result, and releases the work item. |
331 | SDK worker that is its own process | `EnvironmentWorker` installs no signal handlers. Cancel the worker from a signal handler, as the standalone worker examples do. |
332 | SDK worker inside a webhook server | Cancel the worker from the server’s own shutdown hook, as the webhook examples do. The worker must not take over the server’s signals. |
328 | Worker | What to do |
329 | ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
330 | `ant` CLI | Nothing. The CLI handles both signals itself: it cancels any in-flight tool call, posts its error result, and marks the work item `stopped`. |
331 | SDK worker that is its own process | `EnvironmentWorker` installs no signal handlers. Cancel the worker from a signal handler, as the standalone worker examples do. |
332 | SDK worker inside a webhook server | Cancel the worker from the server’s own shutdown hook, as the webhook examples do. The worker must not take over the server’s signals. |
333333 
3342. **Stop the worker with SIGTERM, and allow at least 30 seconds before any hard kill.** The final upload can take that long. Docker sends SIGKILL 10 seconds after the stop signal by default. Raise that limit with `--stop-timeout` on `docker run`, or with your orchestrator’s termination grace period.
3342. **Stop the worker with SIGTERM, and allow at least 30 seconds (3 minutes for a Python SDK worker) before any hard kill.** Uploading changed files to a memory store can take up to 30 seconds, and a Python SDK worker first lets an in-flight tool call complete. Docker sends SIGKILL 10 seconds after the stop signal by default. Raise that limit with `--stop-timeout` on `docker run`, or with your orchestrator’s termination grace period.
335335 
336336If a worker is killed before its teardown runs, any memory edits that had not synced are lost. On a long-lived host, also remove the leftover store directory under `/mnt/memory/` before the next session that attaches that store. A sandbox that serves one session and is then discarded needs no cleanup.
337337 

managed-agents/self-hosted-sandboxes-reference Changed · +8 / -8 lines

from line 39
3939| `ant beta:worker poll` | Claims work items from the environment’s queue and runs each session in process. With `--on-work`, calls your script for each work item instead. |
4040| `ant beta:worker run` | Handles one claimed session and exits. Use it as the entrypoint of a per-session sandbox. |
4141 
42| Flag | Description |
43| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
45| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
46| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory). |
47| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables and the work item as JSON on standard input. |
48| `--max-idle` | How long to wait after the session goes idle with an `end_turn` [stop reason](https://platform.claude.com/docs/en/build-with-claude/handling-stop-reasons) before shutting down. Defaults to `60s`. |
49| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
42| Flag | Description |
43| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44| `--environment-id` | The environment to poll for work. Also reads from `ANTHROPIC_ENVIRONMENT_ID`. |
45| `--environment-key` | Authenticates the worker with this environment. Also reads from `ANTHROPIC_ENVIRONMENT_KEY`. |
46| `--workdir` | Directory where skills are downloaded and tools read and write files. Defaults to `.` (the current directory). |
47| `--on-work` | Script to call for each claimed work item instead of running tools in-process. Receives session details as environment variables and the work item as JSON on standard input. |
48| `--max-idle` | How long the worker waits while a session is idle before `ant beta:worker run` exits or `ant beta:worker poll` moves on to the next work item. Idle time with a [`requires_action` stop reason](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#respond-when-the-session-goes-idle) does not count. Defaults to `60s`. Set it to `0` to turn off the timeout. With an `--on-work` script, `ant beta:worker poll` ignores this flag. Pass it instead to the `ant beta:worker run` command that your script starts. |
49| `--log-format` | Log output format. Use `json` for structured log ingestion. Defaults to `text`. |
5050 
5151## Environment variables
5252 

models/haiku-5-5/migration-guide Changed · +8 / -7 lines

from line 48
4848 
4949Replace the Claude Haiku 4.5 model ID with the Claude Haiku 5.5 ID for your platform.
5050 
51| Platform | Claude Haiku 4.5 | Claude Haiku 5.5 |
52| ---------------------------------------------- | ------------------------------------------------- | ---------------------------- |
53| Claude API | `claude-haiku-4-5-20251001` or `claude-haiku-4-5` | `claude-haiku-5-5` |
54| Amazon Bedrock | `anthropic.claude-haiku-4-5` | `anthropic.claude-haiku-5-5` |
55| Claude Platform on AWS | `claude-haiku-4-5` | `claude-haiku-5-5` |
56| Claude Models on Google Cloud (Google managed) | `claude-haiku-4-5@20251001` | `claude-haiku-5-5` |
57| Microsoft Foundry | `claude-haiku-4-5` | `claude-haiku-5-5` |
51| Platform | Claude Haiku 4.5 | Claude Haiku 5.5 |
52| ------------------------------------------------- | ------------------------------------------------- | ---------------------------- |
53| Claude API | `claude-haiku-4-5-20251001` or `claude-haiku-4-5` | `claude-haiku-5-5` |
54| Amazon Bedrock | `anthropic.claude-haiku-4-5` | `anthropic.claude-haiku-5-5` |
55| Claude Platform on AWS | `claude-haiku-4-5` | `claude-haiku-5-5` |
56| Claude Models on Google Cloud (Anthropic managed) | `claude-haiku-4-5-20251001` | `claude-haiku-5-5` |
57| Claude Models on Google Cloud (Google managed) | `claude-haiku-4-5@20251001` | `claude-haiku-5-5` |
58| Microsoft Foundry | `claude-haiku-4-5` | `claude-haiku-5-5` |
5859 
5960`claude-haiku-5-5` is a fixed model ID with no date suffix and no separate alias.
6061 

release-notes/overview Changed · +7 / -3 lines

### October 30, 2026

from line 12
1212 For updates to Claude Code, see the [complete CHANGELOG.md](https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md) in the `claude-code` repository.
1313</Tip>
1414 
15### October 30, 2026
16 
17* We’ve deprecated [fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode) for Claude Opus 4.8, with removal on November 30, 2026. After removal, requests to `claude-opus-4-8` with `speed: "fast"` will return an error. To continue using fast mode, migrate to [Claude Opus 5.5](https://platform.claude.com/docs/en/models/opus-5-5/migration-guide#migrating-from-claude-opus-4-8). Read more in [Fast mode](https://platform.claude.com/docs/en/build-with-claude/fast-mode#supported-models).
18 
1519### October 29, 2026
1620 
1721* We’ve launched the [Usage and Cost Analytics API](https://platform.claude.com/docs/en/manage-claude/usage-cost-analytics-api) in beta with the `analytics-usage-cost-2026-08-24` beta header. Its `/v1/organizations/analytics/usage` and `/v1/organizations/analytics/cost` endpoints report token usage and cost for Claude Console and Claude Enterprise organizations. You can filter and group results by dimensions such as model, workspace, API key, and the user or service account behind each request.
from line 632
628632 
629633### August 5, 2025
630634 
631* We’ve launched [Claude Opus 4.1](https://www.anthropic.com/news/claude-opus-4-1), an incremental update to Claude Opus 4 with enhanced capabilities and performance improvements.\* Learn more in [Models overview](https://platform.claude.com/docs/en/models/overview).
635* We’ve launched [Claude Opus 4.1](https://www.anthropic.com/news/claude-opus-4-1), an incremental update to Claude Opus 4 with enhanced capabilities and performance improvements.<sup>\*</sup> Learn more in [Models overview](https://platform.claude.com/docs/en/models/overview).
632636 
633*\*Opus 4.1 does not allow both `temperature` and `top_p` parameters to be specified. Please use only one.*
637*<sup>\*Opus 4.1 does not allow both `temperature` and `top_p` parameters to be specified. Please use only one.</sup>*
634638 
635639### July 28, 2025
636640 

agents-and-tools/mcp-tunnels/quickstart Changed · +1 / -1 lines

from line 261
261261 </Step>
262262 
263263 <Step title="Call it from Claude">
264 In the Console, go to the [Sessions](https://platform.claude.com/sessions) page (`platform.claude.com/sessions`) and create a session. In the agent picker, select **Create new agent**, give the agent a name, and keep the prefilled model. Click **+ MCP Server**, select your tunnel, and set **Subdomain** to `echo` and **Path** to `mcp`. Then ask:
264 In the Console, go to the [Sessions](https://platform.claude.com/sessions) page (`platform.claude.com/sessions`) and click **Create session**. From the **Agent** dropdown menu, select **Create new agent**, give the agent a name, and keep the prefilled model. Under **MCP servers**, click **MCP server**, select your tunnel, and set **Subdomain** to `echo` and **Path** to `mcp`. The sample server requires no authentication, so ignore **Connect** or **Needs vault** on the card. Select an environment. If a warning says that the environment blocks MCP servers, see [Use the tunnel in an agent](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/console#use-the-tunnel-in-an-agent). Click **Create session**, then ask:
265265 
266266 > Use the hello tool to greet tunnel.
267267 

agents-and-tools/mcp-tunnels/troubleshooting Changed · +1 / -1 lines

from line 14
1414 
1515| Symptom | Cause | Fix |
1616| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17| Tunnel doesn’t appear in the agent **+ MCP Server** picker | The picker only lists tunnels in the session’s workspace that have at least one active certificate. | Register a CA certificate, or open the session in the workspace the tunnel was created in. |
17| Tunnel doesn’t appear in the agent MCP server picker | The picker only lists tunnels in the session’s workspace that have at least one active certificate. | Register a CA certificate, or open the session in the workspace the tunnel was created in. |
1818| Caller sees HTTP 500; [cloudflared](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/concepts#components) logs `No ingress rules were defined` | cloudflared has no local target. | Add `--url http://localhost:8080` and `network_mode: "service:mcp-proxy"` to the cloudflared service. |
1919| Proxy logs `no route for host` | `tunnel_domain` doesn’t match the assigned domain, or `config.yaml` was edited without restarting. | Set `tunnel_domain` to the exact domain shown on the tunnel detail page, then restart the proxy (`docker compose restart mcp-proxy`). |
2020| Proxy logs `IP validation failed: <ip> is not a private address` | Upstream MCP server resolves outside RFC1918. | See [Upstream IP validation](https://platform.claude.com/docs/en/agents-and-tools/mcp-tunnels/troubleshooting#upstream-ip-validation). |

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

from line 759
759759}
760760```
761761 
762The `error_code` field has four possible values:
762The API defines these `error_code` values:
763763 
764764* `invalid_tool_input`: the search input was invalid, for example a malformed regex pattern or a pattern over the 200-character limit
765765* `unavailable`: the search couldn’t run, for example because it timed out or the service was unavailable
766766* `too_many_requests`: rate limit exceeded for tool search operations
767* `execution_time_exceeded`: the search exceeded its execution time limit
767* `execution_time_exceeded`: not returned by tool search, which reports a timeout as `unavailable`
768768 
769769### Common mistakes
770770 

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

from line 137
137137 
138138 - `"analytics-usage-cost-2026-08-24"`
139139 
140 - `"experimental-claude-tag-2026-10-21"`
141 
140142- `"anthropic-workspace-id": optional string`
141143 
142144 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/agents/create Changed · +2 / -0 lines

from line 131
131131 
132132 - `"analytics-usage-cost-2026-08-24"`
133133 
134 - `"experimental-claude-tag-2026-10-21"`
135 
134136- `"anthropic-workspace-id": optional string`
135137 
136138 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

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

from line 159
159159 
160160 - `"analytics-usage-cost-2026-08-24"`
161161 
162 - `"experimental-claude-tag-2026-10-21"`
163 
162164- `"anthropic-workspace-id": optional string`
163165 
164166 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

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

from line 145
145145 
146146 - `"analytics-usage-cost-2026-08-24"`
147147 
148 - `"experimental-claude-tag-2026-10-21"`
149 
148150- `"anthropic-workspace-id": optional string`
149151 
150152 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/agents/update Changed · +2 / -0 lines

from line 137
137137 
138138 - `"analytics-usage-cost-2026-08-24"`
139139 
140 - `"experimental-claude-tag-2026-10-21"`
141 
140142- `"anthropic-workspace-id": optional string`
141143 
142144 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

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

from line 151
151151 
152152 - `"analytics-usage-cost-2026-08-24"`
153153 
154 - `"experimental-claude-tag-2026-10-21"`
155 
154156- `"anthropic-workspace-id": optional string`
155157 
156158 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

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

from line 149
149149 
150150 - `"analytics-usage-cost-2026-08-24"`
151151 
152 - `"experimental-claude-tag-2026-10-21"`
153 
152154- `"anthropic-workspace-id": optional string`
153155 
154156 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/deployment_runs Changed · +4 / -0 lines

from line 189
189189 
190190 - `"analytics-usage-cost-2026-08-24"`
191191 
192 - `"experimental-claude-tag-2026-10-21"`
193 
192194- `"anthropic-workspace-id": optional string`
193195 
194196 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
from line 597
595597 - `"message-threads-2026-08-12"`
596598 
597599 - `"analytics-usage-cost-2026-08-24"`
600 
601 - `"experimental-claude-tag-2026-10-21"`
598602 
599603- `"anthropic-workspace-id": optional string`
600604 

api/beta/deployment_runs/list Changed · +2 / -0 lines

from line 187
187187 
188188 - `"analytics-usage-cost-2026-08-24"`
189189 
190 - `"experimental-claude-tag-2026-10-21"`
191 
190192- `"anthropic-workspace-id": optional string`
191193 
192194 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/deployment_runs/retrieve Changed · +2 / -0 lines

from line 137
137137 
138138 - `"analytics-usage-cost-2026-08-24"`
139139 
140 - `"experimental-claude-tag-2026-10-21"`
141 
140142- `"anthropic-workspace-id": optional string`
141143 
142144 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/deployments/archive Changed · +2 / -0 lines

from line 137
137137 
138138 - `"analytics-usage-cost-2026-08-24"`
139139 
140 - `"experimental-claude-tag-2026-10-21"`
141 
140142- `"anthropic-workspace-id": optional string`
141143 
142144 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).

api/beta/deployments/create Changed · +2 / -0 lines

from line 131
131131 
132132 - `"analytics-usage-cost-2026-08-24"`
133133 
134 - `"experimental-claude-tag-2026-10-21"`
135 
134136- `"anthropic-workspace-id": optional string`
135137 
136138 Optional header to select the Workspace for this request. The value is a Workspace ID (for example, `wrkspc_011CZkZaBF1tNoB5wlCeusgy`).
Feedback