One read of Claude Developer Platformapi-20260821T200735Z
123 pages moved out of 584 read.
Pages moved
123
significant first
Pages read
584
in this capture
Captured
20:07 UTC
Corpus hash
10824cc06631
index-hash
What this read moved
51-75 of 123, page 3 of 5This capture is too large to show at once. Changes 51-75 of 123 are below, significant first; the rest are on the following screens.
build-with-claude/vision-coordinates Changed · +31 / -1 lines
## Turn resizing into an error with `transformations`
from line 444
444444 The [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) endpoint estimates an image's token cost from its dimensions without fully processing it, so a successful count doesn't mean the image is within the Messages API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits). An image can count successfully and still be rejected when you send it.
445445</Note>
446446
447## Turn resizing into an error with `transformations`
448
449Pre-resizing only protects your coordinates while your pipeline keeps producing the right sizes. A new image source or a switch to a model on a different resolution tier can quietly reintroduce server-side resizing. To turn that silent drift into a visible error, set the optional `transformations` field on an image content block in a [Messages](https://platform.claude.com/docs/en/api/messages) request:
450
451```json
452{
453 "type": "image",
454 "source": { "type": "base64", "media_type": "image/png", "data": "..." },
455 "transformations": { "oversized_image": "error" }
456}
457```
458
459A request whose marked image (any block that sets `"oversized_image": "error"`) would be resized is rejected with a 400 `invalid_request_error` naming the image's dimensions and the largest dimensions that fit. Whether an image triggers the rejection depends on the [limits of every model the request names](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images): the 1920×1080 example below is rejected by a standard-tier model but fits within the high-resolution tier:
460
461```text wrap
462messages.0.content.0: image dimensions 1920x1080 exceed the maximum image size of a model named on this request and would be downsized to 1456x819; scale the image to at most 1456x819 or set the image's oversized_image setting to "downsize"
463```
464
465Rescale to the reported target and resend: the target is the largest size, at your image's aspect ratio, that every model named on the request accepts. How marked images interact with the [server-side fallback beta](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback) is described with that feature; in every mode, a marked image is never served resized.
466
467The setting is per image. `"oversized_image": "downsize"` (the default when the field is omitted) keeps automatic resizing as described on this page. Each image block is checked only against its own setting, so one request can mix images whose dimensions are load-bearing (a screenshot you'll click on) with images where resizing is harmless (a logo). What the setting does and does not change:
468
469* Padding ([which never discards content](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#how-claude-resizes-and-pads-images)), format conversion, and orientation correction proceed as usual.
470* The hard limits (8000 px on the longest side, and the stricter per-image limit on [many-image requests](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits)) are separate rejections; this setting never lets an image past them.
471* Images supplied by URL or file ID are checked once their bytes have been fetched; those rejections carry the same message without the leading position, so they don't identify which image failed; only embedded base64 images are named by position in the error.
472* [PDF pages](https://platform.claude.com/docs/en/build-with-claude/pdf-support) are rasterized server-side at dimensions you don't control; the `document` block does not accept the field (an image block nested inside a document's content accepts it like any other).
473* A marked image whose dimensions cannot be determined is rejected rather than passed through: that rejection reports that the image's source dimensions could not be determined, not the resize message quoted above. No image that sets `"error"` reaches the model resized.
474
475The [Token counting](https://platform.claude.com/docs/en/build-with-claude/token-counting) endpoint honors `transformations` too, rejecting an embedded image exactly as the Messages API would, so you can check whether an embedded image fits without being resized, before running inference. Counting never fetches images supplied by URL or file ID, so a marked image from those sources is checked only at Messages time, as described above.
476
447477## Rescale coordinates when you cannot pre-resize
448478
449If you cannot pre-resize (for example, when the image comes from an upstream system you can't modify), use the resize helper from [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading) to recover the dimensions Claude saw, then map the coordinates Claude returns into normalized coordinates or back onto your original image. Claude resizes oversized images rather than rejecting them, up to the API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits). Beyond those limits the request fails with a validation error instead. Pass the tier limits that match the model you called: the wrong tier's limits recover the wrong resized dimensions and silently shift every coordinate. This approach requires knowing the pixel dimensions of the image you uploaded, so it does not apply to PDF uploads.
479If you cannot pre-resize (for example, when the image comes from an upstream system you can't modify), use the resize helper from [Resize your image before uploading](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#resize-your-image-before-uploading) to recover the dimensions Claude saw, then map the coordinates Claude returns into normalized coordinates or back onto your original image. Unless an image [opts into an error instead](https://platform.claude.com/docs/en/build-with-claude/vision-coordinates#oversized-image-error), Claude resizes oversized images rather than rejecting them, up to the API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits). Beyond those limits the request fails with a validation error instead. Pass the tier limits that match the model you called: the wrong tier's limits recover the wrong resized dimensions and silently shift every coordinate. This approach requires knowing the pixel dimensions of the image you uploaded, so it does not apply to PDF uploads.
450480
451481Screenshots and zoom images that you return to the [computer use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#handle-coordinate-scaling-for-higher-resolutions) and [browser use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool#targets-and-coordinates) toolsets are an exception to automatic resizing. The API rejects a `tool_result` image that exceeds the model's limits with a validation error instead of resizing it. Resize those images in your application before returning them, then scale the coordinates Claude returns back to your screen's dimensions.
452482
claude_api_primer Changed · +3 / -4 lines
from line 181
181181 ```python Python
182182 import anthropic
183183 import base64
184 import httpx
184 import httpx2
185185
186186 # Option 1: Base64-encoded image
187187 image_url = "https://platform.claude.com/docs/images/vision-example.jpg"
188188 image_media_type = "image/jpeg"
189 image_data = base64.standard_b64encode(httpx.get(image_url).content).decode("utf-8")
189 image_data = base64.standard_b64encode(httpx2.get(image_url).content).decode("utf-8")
190190
191191 message = anthropic.Anthropic().messages.create(
192192 model="claude-opus-5",
from line 262
262262
263263<CodeGroup exclude="shell:cURL, typescript, csharp, go, java, php, ruby">
264264 ```bash CLI
265 ant messages create \
266 --transform content --format yaml <<'YAML'
265 ant messages create --transform content --format yaml <<'YAML'
267266 model: claude-opus-5
268267 max_tokens: 16000
269268 thinking:
cli-sdks-libraries/sdks/python Changed · +20 / -18 lines
from line 36
3636
3737## Requirements
3838
39Python 3.9 or later is required.
39Python 3.10 or later is required. If you are upgrading from a 0.x release of the SDK, see the [v1 migration guide](https://github.com/anthropics/anthropic-sdk-python/blob/main/MIGRATION.md) for the list of breaking changes.
4040
4141## Usage
4242
from line 102
102102
103103### Using aiohttp for better concurrency
104104
105For improved async performance, you can use the `aiohttp` HTTP backend instead of the default `httpx`:
105For improved async performance, you can use the `aiohttp` HTTP backend instead of the default `httpx2`:
106106
107107```python
108108import os
from line 362
362362 )
363363except anthropic.APIConnectionError as e:
364364 print("The server could not be reached")
365 print(e.__cause__) # an underlying Exception, likely raised within httpx
365 print(e.__cause__) # an underlying Exception, likely raised within httpx2
366366except anthropic.RateLimitError as e:
367367 print("A 429 status code was received; we should back off a bit.")
368368except anthropic.APIStatusError as e:
from line 426
426426
427427## Timeouts
428428
429By default requests time out after 10 minutes. You can configure this with a `timeout` option, which accepts a float or an `httpx.Timeout` object:
429By default requests time out after 10 minutes. You can configure this with a `timeout` option, which accepts a float or an `httpx2.Timeout` object:
430430
431431```python
432import httpx
432import httpx2
433433from anthropic import Anthropic
434434
435435# Configure the default for all requests:
from line 439
439439
440440# More granular control:
441441client = Anthropic(
442 timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
442 timeout=httpx2.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
443443)
444444
445445# Override per-request:
from line 588
588588
589589### Accessing raw response data (for example, headers)
590590
591The "raw" `Response` returned by `httpx` can be accessed through the `.with_raw_response` property on the client. This is useful for accessing response headers or other metadata:
591The "raw" `Response` returned by `httpx2` can be accessed through the `.with_raw_response` property on the client. This is useful for accessing response headers or other metadata:
592592
593593```python
594594client = Anthropic()
from line 606
606606print(message.content)
607607```
608608
609These methods return an `APIResponse` object.
609These methods return an `APIResponse` object. On the async client they return an `AsyncAPIResponse`, and `.parse()`, `.read()`, `.text()`, and `.json()` must be awaited.
610610
611611### Streaming response body
612612
from line 645
645645To make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs. Options on the client, such as retries, are respected when making these requests.
646646
647647```python
648import httpx
648import httpx2
649649
650650response = client.post(
651651 "/foo",
652 cast_to=httpx.Response,
652 cast_to=httpx2.Response,
653653 body={"my_param": True},
654654)
655655
from line 670
670670
671671### Configuring the HTTP client
672672
673You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including support for proxies and transports:
673The SDK sends requests with [httpx2](https://httpx2.pydantic.dev), an API-compatible fork of `httpx`. To customize the HTTP client, including proxies and transports, pass your own [httpx2 client](https://httpx2.pydantic.dev/api/#client) as `http_client`:
674674
675675```python
676import httpx
676import httpx2
677677from anthropic import Anthropic, DefaultHttpxClient
678678
679679client = Anthropic(
from line 681
681681 base_url="http://my.test.server.example.com:8083",
682682 http_client=DefaultHttpxClient(
683683 proxy="http://my.test.proxy.example.com",
684 transport=httpx.HTTPTransport(local_address="0.0.0.0"),
684 transport=httpx2.HTTPTransport(local_address="0.0.0.0"),
685685 ),
686686)
687687```
from line 693
693693```
694694
695695<Note>
696 Use `DefaultHttpxClient` and `DefaultAsyncHttpxClient` instead of raw `httpx.Client` and `httpx.AsyncClient` to ensure the SDK's default configuration (such as timeouts and connection limits) is preserved.
696 Use `DefaultHttpxClient` and `DefaultAsyncHttpxClient` instead of raw `httpx2.Client` and `httpx2.AsyncClient` to ensure the SDK's default configuration (such as timeouts and connection limits) is preserved. The `http_client` argument must be an `httpx2` client. Passing a client from the separate `httpx` package raises a `TypeError`.
697697</Note>
698
699Tracing and mocking tools that patch `httpx` itself, such as OpenTelemetry's `HTTPXClientInstrumentor`, Sentry's `httpx` integration, `respx`, or `pytest-httpx`, do not see the SDK's requests by default. To use them, call `httpx2.alias_httpx()` once at startup, before anything imports `httpx`. This makes `import httpx` resolve to `httpx2` for the whole process.
698700
699701### Managing HTTP resources
700702
manage-claude/compliance-activity-feed Changed · +4 / -2 lines
from line 14
1414 Both Compliance Access Keys (`sk-ant-api01-...`) carrying this scope and Admin API keys (`sk-ant-admin01-...`) can call the Activity Feed. See [Set up the Compliance API](https://platform.claude.com/docs/en/manage-claude/compliance-api-access) for the conditions under which each key type carries the scope.
1515</Check>
1616
17The Activity Feed records every authentication, chat, file, project, administrative, and platform action that occurs in your organization, in reverse chronological order. Activities are queryable within 1 minute of occurring and are retained for 6 years.
17The Activity Feed records authentication, chat, file, project, administrative, and platform activity across your organization and returns it in reverse chronological order. Activities are queryable within 1 minute of occurring and are retained for 6 years.
1818
1919```bash cURL
2020curl --fail-with-body -sS \
from line 150
150150| ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
151151| `user_actor` | A signed-in claude.ai or Claude Console user took the action. | `email_address`, `user_id`, `ip_address`, `user_agent` |
152152| `api_actor` | A request called the Claude API or the Compliance API with a customer-issued API key. Compliance API calls produce this actor type for both Compliance Access Keys and Admin API keys. | `api_key_id`, `ip_address`, `user_agent` |
153| `admin_api_key_actor` | An organization admin used an Admin API key to manage users, invites, workspaces, or API keys. | `admin_api_key_id` |
153| `admin_api_key_actor` | An organization admin used an Admin API key to manage users, invites, workspaces, or API keys. | `admin_api_key_id`, `ip_address`, `user_agent` |
154154| `unauthenticated_user_actor` | An action occurred before sign-in completed, for example `sso_login_initiated`. | `unauthenticated_email_address`, `ip_address`, `user_agent` |
155155| `anthropic_actor` | Anthropic acted on the organization, for example through internal tooling. | `email_address` (always `null`; present for shape consistency with `user_actor`, because Anthropic operators are not represented by individual email) |
156156| `scim_directory_sync_actor` | An identity provider (such as Okta, Microsoft Entra ID, or JumpCloud) pushed a change through SCIM directory sync. | `workos_event_id`, `directory_id`, `idp_connection_type` (nullable; for example `OktaSCIMV2`, `AzureSCIMV2`) |
157
158A `claude_*_viewed` activity means a Claude app loaded content, not that a person viewed it. Types such as `claude_chat_viewed`, `claude_file_viewed`, and `claude_project_viewed` are recorded each time a Claude app loads the chat, file, or project from Anthropic's servers. Repeated loads are not deduplicated. The web, desktop, and mobile apps load content at different moments, sometimes in the background, and can display a cached copy without loading it. Counts of these activities vary by platform as a result, and they do not correspond to messages sent or screens viewed.
157159
158160<Note>
159161 **Build forward-compatible handlers.** Pass through unrecognized `type` and `actor.type` values, and ignore fields your handler does not expect, so your integration keeps working when new activity types ship.
manage-claude/compliance-integration-patterns Changed · +10 / -7 lines
from line 94
9494
9595Each `Activity` carries fields you can join against events already in your SIEM (Splunk, Datadog, Microsoft Sentinel, Cribl, or similar):
9696
97| Compliance API field | Join target |
98| --------------------- | ----------------------------------------------- |
99| `actor.user_id` | Your identity provider's stable user identifier |
100| `actor.email_address` | Directory email when a stable ID is unavailable |
101| `actor.ip_address` | Network, VPN, and endpoint logs |
102| `created_at` | Time-window correlation across any source |
97| Compliance API field | Join target |
98| --------------------- | ----------------------------------------------------------------------- |
99| `actor.user_id` | Your identity provider's stable user identifier |
100| `actor.email_address` | Directory email when a stable ID is unavailable |
101| `actor.ip_address` | Network, VPN, and endpoint logs |
102| `actor.user_agent` | Endpoint and device inventory, and the client app that made the request |
103| `created_at` | Time-window correlation across any source |
103104
104`actor.user_id` and `actor.email_address` are present when `actor.type` is `user_actor`; check the discriminator before reading them. `user_id` is a stable, opaque identifier for the user account: it is consistent across every Compliance API endpoint and activity payload, and it does not change when the user's email or display name changes. Use `user_id`, not `email_address`, as the primary join key.
105`actor.user_id` and `actor.email_address` are present when `actor.type` is `user_actor`. `actor.ip_address` and `actor.user_agent` are absent on some actor types, such as `anthropic_actor` and `scim_directory_sync_actor`. Check the discriminator before reading any of these fields. `user_id` is a stable, opaque identifier for the user account: it is consistent across every Compliance API endpoint and activity payload, and it does not change when the user's email or display name changes. Use `user_id`, not `email_address`, as the primary join key.
105106
106107Calls to the Compliance API itself emit `compliance_api_accessed` activities. Ingest these alongside other activity types so your SIEM records who queried compliance data, and when. Pass `activity_types[]=compliance_api_accessed` to scope the query, then in your client, read `actor.api_key_id` from each activity whose `actor.type` is `api_actor` to attribute the access to a specific Compliance Access Key or Admin API key.
107108
from line 137
136137* The starting cursor and the terminal `last_id`.
137138* The number of records exported.
138139* The run timestamp and the `request-id` of the final page.
140
141Activity volume is not a completeness check. The `claude_*_viewed` activity types, such as `claude_chat_viewed`, follow each app's loading pattern (see [Understand the Activity object](https://platform.claude.com/docs/en/manage-claude/compliance-activity-feed#understand-the-activity-object)). A period with chat messages but no `claude_chat_viewed` activities does not on its own indicate missing data. Rely on the traversal and the overlap or reconciliation pass described in [Window polling](https://platform.claude.com/docs/en/manage-claude/compliance-integration-patterns#window-polling) instead.
139142
140143The content endpoints (chats, files, projects, project attachments, and local and remote session transcripts) serve Claude Enterprise data only. The Activity Feed surfaces administrative and resource events organization-wide. The Compliance API does not include:
141144
managed-agents/cloud-sandboxes-reference Changed · +37 / -25 lines
### Document and media processing ### Browser automation
from line 14
1414
1515## Programming languages
1616
17| Language | Version | Package manager |
18| -------- | ------- | --------------- |
19| Python | 3.12+ | pip, uv |
20| Node.js | 20+ | npm, yarn, pnpm |
21| Go | 1.22+ | go modules |
22| Rust | 1.77+ | cargo |
23| Java | 21+ | maven, gradle |
24| Ruby | 3.3+ | bundler, gem |
25| PHP | 8.3+ | composer |
26| C/C++ | GCC 13+ | make, cmake |
17| Language | Version | Package manager |
18| -------- | --------------------------- | -------------------- |
19| Python | 3.10, 3.11, 3.12, and 3.13 | pip, uv, poetry |
20| Node.js | 20, 21, and 22 (default) | npm, yarn, pnpm, bun |
21| Go | 1.24 (default) and 1.25 | go modules |
22| Rust | Stable toolchain (rustup) | cargo |
23| Java | OpenJDK 21 | maven, gradle |
24| Ruby | 3.1, 3.2, and 3.3 (default) | bundler, gem |
25| PHP | 8.3 | composer |
26| C/C++ | GCC 13 and Clang | make, cmake, ninja |
2727
28Common Python data and document libraries, including NumPy, pandas, Matplotlib, openpyxl, python-docx, python-pptx, and pypdf, are installed for the `python3` interpreter.
29
2830## Databases
2931
30| Database | Description |
31| ----------------- | -------------------------------------------------- |
32| SQLite | Pre-installed, available immediately |
33| PostgreSQL client | `psql` client for connecting to external databases |
34| Redis client | `redis-cli` for connecting to external instances |
32| Database | Description |
33| ------------- | ----------------------------------------------------------------------------- |
34| PostgreSQL 16 | Server and `psql` client are installed. The server is not running by default. |
35| Redis 7 | Server and `redis-cli` are installed. The server is not running by default. |
36| SQLite | Available through language bindings, such as Python's `sqlite3` module. |
3537
36<Note>
37 Database servers (such as PostgreSQL and Redis) are not running in the sandbox by default. The sandbox includes client tools for connecting to external database instances. SQLite is fully available for local use.
38</Note>
39
4038## Utilities
4139
4240### System tools
from line 41
4341
4442* `git` - Version control
4543* `curl`, `wget` - HTTP clients
46* `jq` - JSON processing
44* `jq`, `yq` - JSON and YAML processing
4745* `tar`, `zip`, `unzip` - Archive tools
48* `ssh`, `scp` - Remote access (requires a networking mode that allows the destination host)
49* `tmux`, `screen` - Terminal multiplexers
46* `tmux` - Terminal multiplexer
5047
5148### Development tools
5249
from line 50
5350* `make`, `cmake` - Build systems
5451* `docker` - Container management (limited availability)
5552* `ripgrep` (`rg`) - Fast file search
56* `tree` - Directory visualization
57* `htop` - Process monitoring
5853
5954### Text processing
6055
from line 57
6257* `vim`, `nano` - Text editors
6358* `diff`, `patch` - File comparison
6459
60### Document and media processing
61
62* `ffmpeg` - Audio and video processing
63* ImageMagick (`convert`, `identify`) - Image manipulation
64* `pandoc` - Document conversion
65* LibreOffice (headless) - Office document conversion
66* Poppler utilities (`pdftotext`, `pdftoppm`) and `qpdf` - PDF processing
67* `tesseract` - Optical character recognition (English language data)
68* TeX Live (`pdflatex`, `xelatex`, `latexmk`) - Typesetting
69
70### Browser automation
71
72* Playwright (Python and Node.js) - Browser automation library
73* Chromium (`/opt/pw-browsers/chromium`) - Browser used by Playwright, not on `PATH`
74
75The sandbox sets `PLAYWRIGHT_BROWSERS_PATH` to `/opt/pw-browsers`, so the pre-installed Playwright packages find Chromium there without configuration. The Python package is installed for the `python3` interpreter. Use the pre-installed packages rather than installing another Playwright version, which would look for a browser build that is not present. Firefox and WebKit are not installed.
76
6577## Sandbox specifications
6678
6779| Property | Value |
6880| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
69| Operating system | Ubuntu 22.04 LTS |
81| Operating system | Ubuntu 24.04 LTS |
7082| Architecture | x86\_64 (amd64) |
7183| Memory | Up to 8 GB |
7284| Disk space | Up to 10 GB |
managed-agents/define-outcomes Changed · +7 / -11 lines
from line 238
238238 ```
239239
240240 ```php PHP
241 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
242241 use Anthropic\Client;
243242 use Anthropic\Core\FileParam;
244243
from line 255
256255 MD;
257256 file_put_contents('/tmp/rubric.md', $rubricText);
258257
259 $rubric = $client->beta->files->upload(
258 $rubric = $client->files->upload(
260259 file: FileParam::fromResource(fopen('/tmp/rubric.md', 'r'), contentType: 'text/markdown'),
261260 );
262261 echo "Uploaded rubric: {$rubric->id}\n";
from line 335
336335 --transform id --raw-output)
337336
338337 # Define the outcome — agent starts working on receipt
339 ant beta:sessions:events send \
340 --session-id "$SESSION_ID" <<YAML
338 ant beta:sessions:events send --session-id "$SESSION_ID" <<YAML
341339 events:
342340 - type: user.define_outcome
343341 description: Build a DCF model for Costco in .xlsx
from line 710
712710
713711## Retrieve deliverables
714712
715The agent writes output files to `/mnt/session/outputs/` inside the sandbox. Once the session is idle, fetch them through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) scoped to the session. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly.
713The agent writes output files to `/mnt/session/outputs/` inside the sandbox. To retrieve them, list files through the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) with the session ID as the `scope_id`, then download them by ID. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header on the list request, so the SDK and CLI examples make that call through the `beta` namespace and pass the header explicitly. Files appear in the list shortly after the agent finishes writing them, sometimes a few seconds after the session goes idle. If a file you expect is not listed yet, list again after a short delay; once it appears in the list, its upload has finished.
716714
717715<CodeGroup>
718716 ```bash cURL
from line 736
738736 ```bash CLI
739737 # List files produced by this session
740738 # scope_id filtering requires the managed-agents beta on the files request
741 ant beta:files list --scope-id "$SESSION_ID" \
742 --beta managed-agents-2026-04-01
739 ant beta:files list --scope-id "$SESSION_ID" --beta managed-agents-2026-04-01
743740
744741 # Download a file
745742 FILE_ID=$(ant beta:files list --scope-id "$SESSION_ID" \
from line 855
858855 ```
859856
860857 ```php PHP
861 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
862858 // List files produced by this session
863859 // scope_id filtering requires the managed-agents beta on the files request
864860 $files = $client->beta->files->list(scopeID: $session->id, betas: ['managed-agents-2026-04-01']);
865 foreach ($files->data as $file) {
861 foreach ($files->getItems() as $file) {
866862 echo "{$file->id} {$file->filename}\n";
867863 }
868864
869865 // Download a file
870 if (count($files->data) > 0) {
871 $content = $client->beta->files->download($files->data[0]->id);
866 if (count($files->getItems()) > 0) {
867 $content = $client->files->download($files->getItems()[0]->id);
872868 file_put_contents('/tmp/output.txt', $content);
873869 }
874870 ```
managed-agents/environments Changed · +5 / -7 lines
from line 161
161161 ```
162162
163163 ```bash CLI
164 ant beta:sessions create \
165 --agent "$AGENT_ID" \
166 --environment-id "$ENVIRONMENT_ID"
164 ant beta:sessions create --agent "$AGENT_ID" --environment-id "$ENVIRONMENT_ID"
167165 ```
168166
169167 ```python Python
from line 388
390388
391389| Field | Package manager | Example |
392390| ------- | ------------------------- | ------------------------------------------- |
393| `apt` | System packages (apt-get) | `"ffmpeg"` |
394| `cargo` | Rust (cargo) | `"[email protected]"` |
391| `apt` | System packages (apt-get) | `"graphviz"` |
392| `cargo` | Rust (cargo) | `"[email protected]"` |
395393| `gem` | Ruby (gem) | `"rails:7.1.0"` |
396394| `go` | Go modules | `"golang.org/x/tools/cmd/goimports@latest"` |
398| `pip` | Python (pip) | `"pandas==2.2.0"` |
396| `pip` | Python (pip) | `"sqlalchemy==2.0.30"` |
399397
400398### Networking
401399
from line 720
722720
723721## Pre-installed runtimes
724722
725Cloud sandboxes include common runtimes out of the box. See [Cloud sandbox reference](https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference) for the full list of pre-installed languages, databases, and utilities.
723Cloud sandboxes include common language runtimes, databases, and command-line tools out of the box. See [Cloud sandbox reference](https://platform.claude.com/docs/en/managed-agents/cloud-sandboxes-reference) for the full list.
726724
727725## Next steps
728726
managed-agents/files Changed · +15 / -14 lines
from line 24
2424 ```
2525
2626 ```bash CLI
27 FILE_ID=$(ant files upload \
28 --file data.csv \
29 --transform id --raw-output)
27 FILE_ID=$(ant files upload --file data.csv --transform id --raw-output)
3028 ```
3129
3230 ```python Python
from line 69
7169 ```
7270
7371 ```php PHP
74 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
75 $file = $client->beta->files->upload(
76 FileParam::fromResource(fopen($csvPath, 'r'), filename: 'data.csv', contentType: 'text/csv'),
72 $file = $client->files->upload(
73 file: FileParam::fromResource(fopen($csvPath, 'r'), filename: 'data.csv', contentType: 'text/csv'),
7774 );
7875 echo "File ID: {$file->id}\n";
7976 ```
from line 314
317314
318315 ```php PHP
319316 $resources = [
320 ['type' => 'file', 'file_id' => 'file_abc123', 'mount_path' => '/data.csv'],
321 ['type' => 'file', 'file_id' => 'file_def456', 'mount_path' => '/config.json'],
322 ['type' => 'file', 'file_id' => 'file_ghi789', 'mount_path' => '/src/main.py'],
317 ['type' => 'file', 'fileID' => 'file_abc123', 'mountPath' => '/data.csv'],
318 ['type' => 'file', 'fileID' => 'file_def456', 'mountPath' => '/config.json'],
319 ['type' => 'file', 'fileID' => 'file_ghi789', 'mountPath' => '/src/main.py'],
323320 ];
324321 ```
325322
from line 535
538535
539536## Listing and downloading session files
540537
541Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly.
538Use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files) to list files scoped to a session and download them. Files the agent writes to `/mnt/session/outputs/` appear in the list shortly after the agent finishes writing them, sometimes a few seconds after the session goes idle. If an output file you expect is missing, list again after a short delay; once it appears in the list, its upload has finished.
542539
540Filtering by `scope_id` requires the `managed-agents-2026-04-01` beta header, so the list examples use the `beta` files namespace and pass that header explicitly.
541
543542<CodeGroup>
544543 ```bash cURL
545544 # List files associated with a session
from line 556
557556
558557 ```bash CLI
559558 # List files associated with a session
560 ant beta:files list --scope-id sesn_abc123 \
561 --beta managed-agents-2026-04-01
559 ant beta:files list --scope-id sesn_abc123 --beta managed-agents-2026-04-01
562560
563561 # Download a file
564562 ant files download --file-id "$FILE_ID" --output output.txt
from line 649
651649 ```
652650
653651 ```php PHP
654 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
655652 // List files associated with a session
656653 $files = $client->beta->files->list(
657654 scopeID: 'sesn_abc123',
658655 betas: ['managed-agents-2026-04-01'],
659656 );
657 foreach ($files->getItems() as $file) {
658 echo "{$file->id} {$file->filename}\n";
659 }
660660
661661 // Download a file
662 $content = $client->beta->files->download($files->data[0]->id);
662 $content = $client->files->download($files->getItems()[0]->id);
663663 file_put_contents('output.txt', $content);
664664 ```
665665
from line 696
696696* If you omit `mount_path`, the file is placed at `/mnt/session/uploads/<file_id>`
697697* Parent directories are created automatically
698698* Paths should be absolute (starting with `/`)
699* Files the agent writes to `/mnt/session/outputs/` become available through the Files API, scoped to the session; see [Listing and downloading session files](https://platform.claude.com/docs/en/managed-agents/files#listing-and-downloading-session-files)
699700
managed-agents/github Changed · +10 / -4 lines
from line 389
389389 ```
390390</CodeGroup>
391391
392The `resources[].authorization_token` authenticates the repository clone operation and is not echoed in API responses.
392A `github_repository` resource accepts the following fields:
393393
394| Field | Description |
395| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
396| `type` | Required. Must be `"github_repository"`. |
397| `url` | Required. The repository's HTTPS URL in the form `https://github.com/<owner>/<repo>`, without a `.git` suffix. Other forms, including SSH URLs, are rejected with an `invalid_request_error`. |
398| `authorization_token` | Required. The GitHub token used to clone the repository. It is not echoed in API responses. See [Token permissions](https://platform.claude.com/docs/en/managed-agents/github#token-permissions). |
399| `mount_path` | Optional. The directory under `/workspace` to clone the repository into. Defaults to `/workspace/<repo-name>`. |
400| `checkout` | Optional. A branch (`{"type": "branch", "name": "main"}`) or commit (`{"type": "commit", "sha": "..."}`) to check out. Defaults to the repository's default branch. |
401
394402Mounting a repository also loads any skills stored in its root `.claude/skills` directory. Skills are discovered once per session, from the repository state checked out at session start. See [Load skills from a GitHub repository](https://platform.claude.com/docs/en/managed-agents/skills#load-skills-from-a-github-repository).
395403
396404## Token permissions
from line 753
745753 ```
746754
747755 ```bash CLI
748 ant beta:sessions:events send \
749 --session-id "$SESSION_ID" \
750 > /dev/null <<'EOF'
756 ant beta:sessions:events send --session-id "$SESSION_ID" > /dev/null <<'EOF'
751757 events:
752758 - type: user.message
753759 content:
managed-agents/session-operations Changed · +5 / -5 lines
from line 29
2929
3030The semantics of a `tools` or `mcp_servers` update are full replacement: the provided array is the new value. To preserve existing entries, `GET` the session, modify the array, and `POST` it back.
3131
32The session must be `idle` to update the agent. [Interrupt](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) the session if you need to update the agent while it's running.
32The session must be `idle` to update the agent. To update the agent while the session is running, send a [`user.interrupt` event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) by itself and wait for the session to become `idle`.
3333
3434<CodeGroup defaultLanguage="CLI">
3535 ```bash cURL
from line 532
532532
533533## Archiving a session
534534
535Archive a session to prevent new events from being sent while preserving its history. A `running` session cannot be archived; send an [interrupt event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) if you need to archive it immediately.
535Archive a session to prevent new events from being sent while preserving its history. A `running` session cannot be archived; to archive one, send a [`user.interrupt` event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) by itself and wait for the session to become `idle`.
536536
537537<CodeGroup defaultLanguage="CLI">
538538 ```bash cURL
from line 581
581581
582582## Deleting a session
583583
584Delete a session to permanently remove its record, events, and associated sandbox. A `running` session cannot be deleted; send an [interrupt event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) if you need to delete it immediately.
584Delete a session to permanently remove its record, events, and associated sandbox. A `running` session cannot be deleted; to delete one, send a [`user.interrupt` event](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#integrating-events) by itself and wait for the session to become `idle`.
585585
586Memory stores, vaults, skills, environments, and agents are independent resources and are not affected by session deletion. Files you uploaded through the Files API are also unaffected, but files the session itself produced are scoped to it and are permanently deleted along with its filesystem. Download anything you need to keep before deleting the session.
586Memory stores, vaults, skills, environments, and agents are independent resources and are not affected by session deletion. Files you uploaded through the Files API are also unaffected, but files the session itself produced are scoped to it and are permanently deleted along with its filesystem. Download anything you need to keep before deleting the session. An output file written at the end of the last turn can take a few seconds after the session goes idle to appear in the [session's file list](https://platform.claude.com/docs/en/managed-agents/files#listing-and-downloading-session-files), so check that the files you expect are listed first.
587587
588588<CodeGroup defaultLanguage="CLI">
589589 ```bash cURL
release-notes/overview Changed · +29 / -25 lines
### August 20, 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### August 20, 2026
16
17* We've released **v1.0 of the [Python SDK](https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/python)**. The SDK's HTTP layer moves from `httpx` to [httpx2](https://httpx2.pydantic.dev), a maintained, API-compatible fork: build custom `http_client`, `Timeout`, and transport objects from `httpx2` (the `DefaultHttpxClient` helpers are unchanged), and call `httpx2.alias_httpx()` at startup if you rely on tracing or mocking libraries that patch `httpx`. v1.0 requires Python 3.10 or later and removes long-deprecated surface, including the legacy Text Completions API, the `temperature`, `top_p`, and `top_k` parameters on Messages methods, and the tool runner's client-side `compaction_control`. On the async client, `.with_raw_response` results now need `await response.parse()`, and `AnthropicBedrock` now raises an error when no AWS region is configured instead of defaulting to `us-east-1`. See the [v1 migration guide](https://github.com/anthropics/anthropic-sdk-python/blob/main/MIGRATION.md) for every change with before-and-after snippets.
18
1519### August 19, 2026
1620
17* The [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) is now generally available on the Claude API as the `computer_toolset_20260801` toolset: no beta header, batch actions (several actions in one turn), `zoom` enabled by default, and per-member configuration through `configs`. Earlier beta versions remain available. Upgrading an existing integration changes the request shape and tool handling; see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
21* The [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool) is out of beta on the Claude API as the `computer_toolset_20260801` toolset: no beta header, batch actions (several actions in one turn), `zoom` enabled by default, and per-member configuration through `configs`. Earlier beta versions remain available. Upgrading an existing integration changes the request shape and tool handling; see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
1822* We've launched the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) (`browser_toolset_20260801`), a client toolset for driving a browser that your application hosts. It works inside a browser viewport rather than a whole desktop, reading the page itself (its accessibility tree, elements, forms, and tabs) and adding element references, form input, tab management, download reporting, and opt-in file upload on top of screenshot-and-click control.
1923* Both toolsets are available for Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Sonnet 5, and Claude Opus 4.8 on the Claude API.
20* The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is now generally available on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the GA response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). `/v1/files` requests that still send the beta header keep working and return the previous response format.
21* [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the Skills API (`/v1/skills`) are now generally available on the Claude API. Requests no longer require the `skills-2025-10-02` beta header, including Messages API requests that load Skills through the `container` parameter. Requests that still send the header continue to work unchanged. See [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide).
22* The [Admin API](https://platform.claude.com/docs/en/api/admin) user-management endpoints for **Claude Enterprise** (claude.ai) organizations (members, invites, groups, and custom roles) are now generally available. The `anthropic-beta: ce-user-management-2026-07-13` header is no longer required on group and custom-role requests; requests that still send it are accepted unchanged. See [User management](https://platform.claude.com/docs/en/manage-claude/user-management).
24* The [Files API](https://platform.claude.com/docs/en/build-with-claude/files) is out of beta on the Claude API. Requests to the `/v1/files` endpoints, and Messages API requests that reference an uploaded file, no longer require the `files-api-2025-04-14` beta header. Requests sent without the header use the current response format: [file expiration](https://platform.claude.com/docs/en/build-with-claude/files#file-expiration) (set `expires_in_seconds` when you upload a file; file objects report `expires_at`), and `page` and `next_page` [pagination](https://platform.claude.com/docs/en/api/overview#pagination) plus an `ids[]` filter when you [list files](https://platform.claude.com/docs/en/build-with-claude/files#list-files). `/v1/files` requests that still send the beta header keep working and return the previous response format.
25* [Agent Skills](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview) and the Skills API (`/v1/skills`) are out of beta on the Claude API. Requests no longer require the `skills-2025-10-02` beta header, including Messages API requests that load Skills through the `container` parameter. Requests that still send the header continue to work unchanged. See [Using Agent Skills with the API](https://platform.claude.com/docs/en/build-with-claude/skills-guide).
26* The [Admin API](https://platform.claude.com/docs/en/api/admin) user-management endpoints for **Claude Enterprise** (claude.ai) organizations (members, invites, groups, and custom roles) are out of beta. The `anthropic-beta: ce-user-management-2026-07-13` header is no longer required on group and custom-role requests; requests that still send it are accepted unchanged. See [User management](https://platform.claude.com/docs/en/manage-claude/user-management).
2327* You can now restrict which sites a Claude Managed Agents agent's `web_search` and `web_fetch` tools can reach. Set `allowed_domains` or `blocked_domains` on the tool's entry in the `agent_toolset_20260401` `configs` array; `web_fetch` also accepts `max_content_tokens` and `web_search` accepts `user_location`. Each `configs` entry is identified by its `name` and typed by an optional `type`, and requests that pass only `name`, `enabled`, and `permission_policy` continue to work; in the typed SDKs, `configs` entries become per-tool types. See [Restrict web search and web fetch domains](https://platform.claude.com/docs/en/managed-agents/tools#restrict-web-search-and-web-fetch-domains).
2428* Claude Managed Agents sessions that run in a [self-hosted sandbox](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes) can now attach [memory stores](https://platform.claude.com/docs/en/managed-agents/memory). The Python, TypeScript, and Go SDK workers download each attached store into the sandbox at its `mount_path` and sync the agent's changes back to the store. See [Use memory stores](https://platform.claude.com/docs/en/managed-agents/self-hosted-sandboxes#use-memory-stores).
2529* The session viewer in the Claude Console has been redesigned with a timeline minimap, a transcript grouped by model request, and an Inspector panel for session details and cost, raw events, per-tool statistics, mounted resources, and per-thread activity. See [Console observability](https://platform.claude.com/docs/en/managed-agents/events-and-streaming#console-observability).
from line 63
5963
6064### July 24, 2026
6165
62* We've launched **Claude Opus 5** (`claude-opus-5`), a step-change improvement over Claude Opus 4.8. Claude Opus 5 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) (both the default and the maximum), 128k max output tokens, and [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) on by default, at $5 / $25 USD per MTok, the same pricing as Claude Opus 4.8. It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/about-claude/models/whats-new-opus-5) for new features, behavior changes, and migration guidance, and the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview) for complete specs.
66* We've launched **Claude Opus 5** (`claude-opus-5`), a step-change improvement over Claude Opus 4.8. Claude Opus 5 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) (both the default and the maximum), 128k max output tokens, and [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) on by default, at $5 / $25 USD per MTok, the same pricing as Claude Opus 4.8. It's available on the Claude API, [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Claude on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Claude in Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry). See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/about-claude/models/whats-new-opus-5) for new features, behavior changes, and migration guidance, and the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview) for complete specs.
6367* On Claude Opus 5, disabling thinking is allowed only at effort `high` or below: `thinking: {"type": "disabled"}` with effort `xhigh` or `max` returns a 400 error, a breaking change from Claude Opus 4.8. See [What's new in Claude Opus 5](https://platform.claude.com/docs/en/about-claude/models/whats-new-opus-5#behavior-changes).
6468* [Effort](https://platform.claude.com/docs/en/build-with-claude/effort) is the primary control for steering Claude Opus 5: the model supports the full ladder (`low`, `medium`, `high`, `xhigh`, `max`), with `max` for capability-critical work.
6569* Mid-conversation tool changes are now in beta on Claude Fable 5, Claude Mythos 5, Claude Opus 4.8, and Claude Opus 5: add or remove tools between turns of a conversation while preserving the prompt cache. Include the `mid-conversation-tool-changes-2026-07-01` beta header in your requests.
from line 181
177181
178182### May 28, 2026
179183
180* We've launched **Claude Opus 4.8** (claude-opus-4-8), our most capable generally available model. Claude Opus 4.8 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default on the Claude API, Amazon Bedrock, Google Cloud, and Microsoft Foundry, 128k max output tokens, and the same set of tools and platform features as Claude Opus 4.7. See the [migration guide](https://platform.claude.com/docs/en/about-claude/models/migration-guide) for baseline settings, features, and migration guidance.
184* We've launched **Claude Opus 4.8** (claude-opus-4-8), our most capable widely released model. Claude Opus 4.8 supports a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default on the Claude API, Amazon Bedrock, Google Cloud, and Microsoft Foundry, 128k max output tokens, and the same set of tools and platform features as Claude Opus 4.7. See the [migration guide](https://platform.claude.com/docs/en/about-claude/models/migration-guide) for baseline settings, features, and migration guidance.
181185* We've launched [mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages). On Claude Opus 4.8, you can send `role: "system"` messages after a user turn (subject to [placement rules](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations)) in the `messages` array, preserving prompt cache hits when instructions change during a long-running session. No beta header is required.
182186* The [`stop_details`](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#refusal-response) field on refusal responses is now publicly documented; it returns a `category` (`cyber`, `bio`, or `null`) and a human-readable `explanation`, so your application can route different classes of refusal to the right next step. No beta header is required.
183187* On Claude Opus 4.8, the [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) defaults to `high` across all surfaces, including Claude Code and the Messages API.
from line 236
232236
233237### May 4, 2026
234238
235* [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation) is now generally available. Authenticate workloads to the Claude API with short-lived OIDC tokens from your own identity provider (AWS IAM, Google Cloud, GitHub Actions, Kubernetes, Microsoft Entra ID, Okta, SPIFFE, and more) instead of long-lived static API keys. Configure issuers and federation rules in the Claude Console, and the SDK handles token exchange and refresh automatically. See [Authentication](https://platform.claude.com/docs/en/manage-claude/authentication).
239* We've launched [Workload Identity Federation](https://platform.claude.com/docs/en/manage-claude/workload-identity-federation). Authenticate workloads to the Claude API with short-lived OIDC tokens from your own identity provider (AWS IAM, Google Cloud, GitHub Actions, Kubernetes, Microsoft Entra ID, Okta, SPIFFE, and more) instead of long-lived static API keys. Configure issuers and federation rules in the Claude Console, and the SDK handles token exchange and refresh automatically. See [Authentication](https://platform.claude.com/docs/en/manage-claude/authentication).
236240
237241### April 30, 2026
238242
239* We've retired the 1M token context window beta (`context-1m-2025-08-07`) for Claude Sonnet 4.5 and Claude Sonnet 4. The beta header now has no effect on these models, and requests exceeding the standard 200k-token context window return an error. To use the 1M context window, migrate to [Claude Sonnet 4.6](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison) or [Claude Opus 4.6](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), where it's generally available at standard pricing with no beta header required.
243* We've retired the 1M token context window beta (`context-1m-2025-08-07`) for Claude Sonnet 4.5 and Claude Sonnet 4. The beta header now has no effect on these models, and requests exceeding the standard 200k-token context window return an error. To use the 1M context window, migrate to [Claude Sonnet 4.6](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison) or [Claude Opus 4.6](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), where it's included at standard pricing with no beta header required.
240244
241245### April 29, 2026
242246
from line 260
256260
257261### April 16, 2026
258262
259* We've launched [Claude Opus 4.7](https://www.anthropic.com/news/claude-opus-4-7), our most capable generally available model for complex reasoning and agentic coding, at the same $5 / $25 per MTok pricing as Opus 4.6. See [What's new in Claude Opus 4.7](https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7) for capability improvements, new features, and the updated tokenizer. Opus 4.7 includes API breaking changes versus Opus 4.6; see the [migration guide](https://platform.claude.com/docs/en/about-claude/models/migration-guide) before upgrading.
263* We've launched [Claude Opus 4.7](https://www.anthropic.com/news/claude-opus-4-7), our most capable widely released model for complex reasoning and agentic coding, at the same $5 / $25 per MTok pricing as Opus 4.6. See [What's new in Claude Opus 4.7](https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-7) for capability improvements, new features, and the updated tokenizer. Opus 4.7 includes API breaking changes versus Opus 4.6; see the [migration guide](https://platform.claude.com/docs/en/about-claude/models/migration-guide) before upgrading.
260264* [Claude in Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock) is now open to all Amazon Bedrock customers. Claude Opus 4.7 and Claude Haiku 4.5 are available self-serve from the Bedrock console through the Messages API endpoint at `/anthropic/v1/messages`, in 27 AWS regions with global and regional endpoints.
261265* We've launched [task budgets](https://platform.claude.com/docs/en/build-with-claude/task-budgets) in beta on Claude Opus 4.7. Give Claude an advisory token budget for a full agentic loop (thinking, tool calls, tool results, and output) and the model sees a running countdown, using it to prioritize work and finish gracefully as the budget is consumed. Include the `task-budgets-2026-03-13` beta header in your requests.
262266* Claude Opus 4.7 supports [high-resolution image input](https://platform.claude.com/docs/en/build-with-claude/vision#high-resolution-image-support-on-claude-opus-4-7), raising the maximum image resolution from 1568 to 2576 pixels on the long edge for improved performance on computer use, screenshot understanding, and document analysis. High-resolution support is automatic and requires no beta header; images may use up to approximately 3x more image tokens than on prior models.
from line 299
295299
296300### March 13, 2026
297301
298* The [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is now generally available for Claude Opus 4.6 and Sonnet 4.6 at standard pricing. Requests over 200k tokens work automatically for these models with no beta header required. The 1M token context window remains in beta for Claude Sonnet 4.5 and Sonnet 4.
302* The [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is out of beta for Claude Opus 4.6 and Sonnet 4.6, at standard pricing. Requests over 200k tokens work automatically for these models with no beta header required. The 1M token context window remains in beta for Claude Sonnet 4.5 and Sonnet 4.
299303* We've removed the dedicated 1M rate limits for all supported models. Your standard account limits now apply across every context length.
300304* We've raised the media limit from 100 to 600 images or PDF pages per request when using the 1M token context window.
301305
from line 313
309313
310314* We've launched [Claude Sonnet 4.6](https://www.anthropic.com/news/claude-sonnet-4-6), our latest balanced model combining speed and intelligence for everyday tasks. Sonnet 4.6 delivers improved agentic search performance while consuming fewer tokens. Sonnet 4.6 supports [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) and a [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) (beta). See [Models & Pricing](https://platform.claude.com/docs/en/about-claude/models) for details.
311315* API [code execution](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) is now **free when used with web search or web fetch**. Sandboxed code execution improves model capability and token efficiency. See the [pricing details](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#usage-and-pricing) for standalone usage.
312* The [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) and [programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) are now generally available (no beta header required). Web search and web fetch now support [dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering), which uses code execution to filter results before they reach the context window for better performance and reduced token cost.
313* The [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool), [web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool), [tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), [tool use examples](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples), and [memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) are now generally available (no beta header required).
316* The [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool) and [programmatic tool calling](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) are available with no beta header required. Web search and web fetch now support [dynamic filtering](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool#dynamic-filtering), which uses code execution to filter results before they reach the context window for better performance and reduced token cost.
317* The [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool), [web fetch tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool), [tool search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool), [tool use examples](https://platform.claude.com/docs/en/agents-and-tools/tool-use/define-tools#providing-tool-use-examples), and [memory tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool) no longer require a beta header.
314318
315319### February 7, 2026
316320
from line 323
319323### February 5, 2026
320324
321325* We've launched [Claude Opus 4.6](https://www.anthropic.com/news/claude-opus-4-6), our most intelligent model for complex agentic tasks and long-horizon work. Opus 4.6 recommends [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking) (`thinking: {type: "adaptive"}`); manual thinking (`type: "enabled"` with `budget_tokens`) is deprecated. Opus 4.6 does not support prefilling assistant messages. Learn more in [What's new in Claude 4.6](https://platform.claude.com/docs/en/about-claude/models/whats-new-claude-4-6).
322* The [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) is now generally available (no beta header required) and supports Claude Opus 4.6. Effort replaces `budget_tokens` for controlling thinking depth on new models.
326* The [effort parameter](https://platform.claude.com/docs/en/build-with-claude/effort) no longer requires a beta header and now supports Claude Opus 4.6. Effort replaces `budget_tokens` for controlling thinking depth on new models.
323327* We've launched the [compaction API](https://platform.claude.com/docs/en/build-with-claude/compaction) in beta, providing server-side context summarization for effectively infinite conversations. Available on Opus 4.6.
324328* We've introduced [data residency controls](https://platform.claude.com/docs/en/manage-claude/data-residency), allowing you to specify where model inference runs with the `inference_geo` parameter. US-only inference is available at 1.1x pricing for models released after February 1, 2026.
325329* The [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) is now available in beta for Claude Opus 4.6, in addition to Sonnet 4.5 and Sonnet 4. [Long context pricing](https://platform.claude.com/docs/en/about-claude/pricing#long-context-pricing) applies to requests exceeding 200k input tokens.
326* [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) is now generally available on all models and platforms (no beta header required).
330* [Fine-grained tool streaming](https://platform.claude.com/docs/en/agents-and-tools/tool-use/fine-grained-tool-streaming) no longer requires a beta header on any model or platform.
327331
328332### January 29, 2026
329333
330* [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) are now generally available on the Claude API for Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5. GA includes expanded schema support, improved grammar compilation latency, and a simplified integration path with no beta header required. The `output_format` parameter has moved to `output_config.format`. Existing beta users can continue using the beta header during the transition period. Structured outputs remain in public beta on Amazon Bedrock and Microsoft Foundry.
334* [Structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) are out of beta on the Claude API for Claude Sonnet 4.5, Claude Opus 4.5, and Claude Haiku 4.5. This release includes expanded schema support, improved grammar compilation latency, and a simplified integration path with no beta header required. The `output_format` parameter has moved to `output_config.format`. Existing beta users can continue using the beta header during the transition period. Structured outputs remain in public beta on Amazon Bedrock and Microsoft Foundry.
331335
332336### January 12, 2026
333337
from line 359
355359
356360### November 21, 2025
357361
358* Search result content blocks are now generally available on Amazon Bedrock. Learn more in [Search results](https://platform.claude.com/docs/en/build-with-claude/search-results).
362* Search result content blocks are now available on Amazon Bedrock with no beta header required. Learn more in [Search results](https://platform.claude.com/docs/en/build-with-claude/search-results).
359363
360364### November 19, 2025
361365
from line 455
451455### August 13, 2025
452456
453457* We announced the deprecation of the Claude Sonnet 3.5 models (`claude-3-5-sonnet-20240620` and `claude-3-5-sonnet-20241022`). These models will be retired on October 28, 2025. We recommend migrating to Claude Sonnet 4.5 (`claude-sonnet-4-5-20250929`) for improved performance and capabilities. Read more in [Model deprecations](https://platform.claude.com/docs/en/about-claude/model-deprecations).
454* The 1-hour cache duration for prompt caching is now generally available. You can now use the extended cache TTL without a beta header. Learn more in [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration).
458* The 1-hour cache duration for prompt caching no longer requires a beta header. Learn more in [Prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#1-hour-cache-duration).
455459
456460### August 12, 2025
457461
from line 467
463467
464468### August 8, 2025
465469
466* Search result content blocks are now generally available on the Claude API and Vertex AI. This feature enables natural citations for RAG applications with proper source attribution. The beta header `search-results-2025-06-09` is no longer required. Learn more in [Search results](https://platform.claude.com/docs/en/build-with-claude/search-results).
470* Search result content blocks are out of beta on the Claude API and Vertex AI. This feature enables natural citations for RAG applications with proper source attribution. The beta header `search-results-2025-06-09` is no longer required. Learn more in [Search results](https://platform.claude.com/docs/en/build-with-claude/search-results).
467471
468472### August 5, 2025
469473
from line 516
512516* We've launched the [Code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool) in public beta, a tool that enables Claude to execute Python code in a secure, sandboxed environment.
513517* We've launched the [MCP connector](https://platform.claude.com/docs/en/agents-and-tools/mcp-connector) in public beta, a feature that allows you to connect to remote MCP servers directly from the Messages API.
514518* To increase answer quality and decrease tool errors, we've changed the default value for the `top_p` [nucleus sampling](https://en.wikipedia.org/wiki/Top-p_sampling) parameter in the Messages API from 0.999 to 0.99 for all models. To revert this change, set `top_p` to 0.999. Additionally, when extended thinking is enabled, you can now set `top_p` to values between 0.95 and 1.
515* We've moved our [Go SDK](https://github.com/anthropics/anthropic-sdk-go) from beta to GA.
519* Our [Go SDK](https://github.com/anthropics/anthropic-sdk-go) has moved from beta to its first stable release.
516520* We've included minute and hour level granularity to the [Usage](https://console.anthropic.com/settings/usage) page of Console alongside 429 error rates on the Usage page.
517521
518522### May 21, 2025
519523
520* We've moved our [Ruby SDK](https://github.com/anthropics/anthropic-sdk-ruby) from beta to GA.
524* Our [Ruby SDK](https://github.com/anthropics/anthropic-sdk-ruby) has moved from beta to its first stable release.
521525
522526### May 7, 2025
523527
from line 537
533537
534538### March 31st, 2025
535539
536* We've moved our [Java SDK](https://github.com/anthropics/anthropic-sdk-java) from beta to GA.
540* Our [Java SDK](https://github.com/anthropics/anthropic-sdk-java) has moved from beta to its first stable release.
537541* We've moved our [Go SDK](https://github.com/anthropics/anthropic-sdk-go) from alpha to beta.
538542
539543### February 27th, 2025
from line 594
590594
591595### December 17th, 2024
592596
593The following features are now generally available in the Claude API:
597The following features are now available in the Claude API without a beta header:
594598
595599* [Models API](https://platform.claude.com/docs/en/api/models/list): Query available models, validate model IDs, and resolve [model aliases](https://platform.claude.com/docs/en/about-claude/models/overview) to their canonical model IDs.
596600* [Message Batches API](https://platform.claude.com/docs/en/build-with-claude/batch-processing): Process large batches of messages asynchronously at 50% of the standard API cost.
from line 667
663667
664668### August 19th, 2024
665669
666* We've moved 8,192 token outputs from beta to general availability for Claude Sonnet 3.5.
670* 8,192-token outputs on Claude Sonnet 3.5 are out of beta and no longer require the `max-tokens-3-5-sonnet-2024-07-15` header.
667671
668672### August 14th, 2024
669673
from line 689
685689
686690### June 20th, 2024
687691
688* [Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet), our most intelligent model yet, is now generally available across the Claude API, Amazon Bedrock, and Vertex AI.
692* [Claude Sonnet 3.5](https://www.anthropic.com/news/claude-3-5-sonnet), our most intelligent model yet, is now available across the Claude API, Amazon Bedrock, and Vertex AI.
689693
690694### May 30th, 2024
691695
692* [Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) is now generally available across the Claude API, Amazon Bedrock, and Vertex AI.
696* [Tool use](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) is out of beta across the Claude API, Amazon Bedrock, and Vertex AI, with no beta header required.
693697
694698### May 10th, 2024
695699
about-claude/model-deprecations Changed · +1 / -1 lines
from line 213
213213
214214## API parameter deprecations
215215
216Anthropic occasionally deprecates request parameters that no longer apply to current models. Deprecated parameters remain in the SDK request types so existing code continues to type-check, but their behavior changes per model.
216Anthropic occasionally deprecates request parameters that no longer apply to current models. How the API treats a deprecated parameter depends on the model, as the following table shows. Most SDKs keep deprecated parameters in their request types so existing code continues to type-check. The Python SDK (v1.0 and later) removes `temperature`, `top_p`, and `top_k`, so passing them raises a `TypeError`.
217217
218218| Parameter | Status | Behavior | Recommended replacement |
219219| ------------------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
about-claude/models/introducing-claude-fable-5-and-claude-mythos-5 Changed · +2 / -2 lines
from line 50
5050
5151Claude Fable 5 and Claude Mythos 5 both become available on June 9, 2026:
5252
53* **Claude Fable 5** is generally available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry).
54* **Claude Mythos 5** is not generally available: it is offered in limited availability to approved customers in [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team. Customers without access to Claude Mythos 5 can use Claude Fable 5, which is generally available and offers the same capabilities.
53* **Claude Fable 5** is available on the Claude API, [Amazon Bedrock](https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock), [Claude Platform on AWS](https://platform.claude.com/docs/en/build-with-claude/claude-platform-on-aws), [Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-on-vertex-ai), and [Microsoft Foundry](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry).
54* **Claude Mythos 5** is offered only to approved customers in [Project Glasswing](https://anthropic.com/glasswing). For access, contact your Anthropic, AWS, or Google Cloud account team. Customers without access to Claude Mythos 5 can use Claude Fable 5, which does not require access approval and offers the same capabilities.
5555
5656Claude Fable 5 and Claude Mythos 5 carry 30-day data retention and are not available under zero data retention: both are designated [Covered Models](https://support.claude.com/en/articles/15425695). See [Model-specific data retention requirements](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements).
5757
about-claude/models/overview Changed · +1 / -1 lines
from line 16
1616
1717Claude Fable 5 (`claude-fable-5`) is Anthropic's most capable widely released model. Claude Mythos 5 (`claude-mythos-5`) shares Claude Fable 5's specs and pricing and joins the invitation-only Claude Mythos Preview (`claude-mythos-preview`) within [Project Glasswing](https://anthropic.com/glasswing). See [Introducing Claude Fable 5 and Claude Mythos 5](https://platform.claude.com/docs/en/about-claude/models/introducing-claude-fable-5-and-claude-mythos-5) for launch details and API changes.
1818
19Claude Fable 5 is generally available on the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry beginning June 9, 2026. Claude Mythos 5 is not generally available: it is offered in limited availability to approved customers in [Project Glasswing](https://anthropic.com/glasswing), beginning the same day. For access, contact your Anthropic, AWS, or Google Cloud account team.
19Claude Fable 5 is available on the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry beginning June 9, 2026. Claude Mythos 5 is offered only to approved customers in [Project Glasswing](https://anthropic.com/glasswing), beginning the same day. For access, contact your Anthropic, AWS, or Google Cloud account team.
2020
2121### Latest models comparison
2222
about-claude/models/whats-new-sonnet-5 Changed · +1 / -1 lines
from line 12
1212| --------------- | ----------------- | ---------------------------------------------- |
1313| Claude Sonnet 5 | `claude-sonnet-5` | The best combination of speed and intelligence |
1414
15Claude Sonnet 5 supports the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. On the Claude API, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) and the generally available `computer_toolset_20260801` version of the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), neither of which Claude Sonnet 4.6 supports; the earlier `computer_20251124` version is still accepted on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
15Claude Sonnet 5 supports the [1M token context window](https://platform.claude.com/docs/en/build-with-claude/context-windows) by default (1M tokens is both the default and the maximum; there is no smaller context variant), 128k max output tokens, [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/thinking), and the same set of tools and platform features as Claude Sonnet 4.6, except [Priority Tier](https://platform.claude.com/docs/en/api/service-tiers#supported-models), which is not available on Claude Sonnet 5. On the Claude API, Claude Sonnet 5 also supports the [browser use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/browser-use-tool) and the stable `computer_toolset_20260801` version of the [computer use tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool), neither of which Claude Sonnet 4.6 supports; the earlier `computer_20251124` version is still accepted on both models. To upgrade an existing integration, see [Migrate from `computer_20251124`](https://platform.claude.com/docs/en/agents-and-tools/tool-use/computer-use-tool#migrate-from-computer-20251124).
1616
1717For complete pricing and specs, see the [models overview](https://platform.claude.com/docs/en/about-claude/models/overview).
1818
about-claude/use-case-guides/customer-support-chat Changed · +1 / -1 lines
from line 9
99To follow this guide, you need:
1010
1111* A Claude API key (set as the `ANTHROPIC_API_KEY` environment variable)
12* Python 3.9 or later
12* Python 3.10 or later
1313
1414Install the required packages:
1515
about-claude/use-case-guides/ticket-routing Changed · +1 / -3 lines
from line 342
342342 message = client.messages.create(
343343 model=DEFAULT_MODEL,
344344 max_tokens=500,
345 temperature=0,
346345 messages=[{"role": "user", "content": classification_prompt}],
347346 stream=False,
348347 )
from line 408
409408 message = client.messages.create(
410409 model=DEFAULT_MODEL,
411410 max_tokens=500,
412 temperature=0,
413411 messages=[{"role": "user", "content": classification_prompt}],
414412 )
415413 usage = message.usage # Get the usage statistics for the API call for how many input and output tokens were used.
from line 459
461459
462460For example, you might have a top-level classifier that broadly categorizes tickets into "Technical Issues," "Billing Questions," and "General Inquiries." Each of these categories can then have its own sub-classifier to further refine the classification.
463461
464
462
465463
466464* **Pros - greater nuance and accuracy:** You can create different prompts for each parent path, allowing for more targeted and context-specific classification. This can lead to improved accuracy and more nuanced handling of customer requests.
467465
agents-and-tools/agent-skills/claude-api-skill Changed · +1 / -1 lines
from line 120
120120* **Cloud platform detection**, preserving platform-specific model ID formats (for example, the `anthropic.` prefix on Amazon Bedrock) and skipping changes for features that are unavailable on partner-operated platforms
121121* **Breaking parameter changes**, such as removing `temperature`, `top_p`, and `top_k` for Claude Opus 4.8 and Claude Opus 4.7, and converting `thinking: {type: "enabled", budget_tokens: N}` to `thinking: {type: "adaptive"}`
122122* **Prefill replacement**, converting assistant-message prefill patterns to [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs) where applicable
123* **Beta header cleanup**, removing headers that are GA on the target model (for example, `effort-2025-11-24`, `fine-grained-tool-streaming-2025-05-14`, `interleaved-thinking-2025-05-14`) and switching back from `client.beta.messages.create` to `client.messages.create`
123* **Beta header cleanup**, removing beta headers that the target model doesn't require (for example, `effort-2025-11-24`, `fine-grained-tool-streaming-2025-05-14`, `interleaved-thinking-2025-05-14`) and switching back from `client.beta.messages.create` to `client.messages.create`
124124* **Effort calibration**, recommending an `output_config.effort` starting point for the target model (for example, the default `high` on Claude Opus 5, and `xhigh` for coding and agentic use cases on Claude Opus 4.8 and Claude Opus 4.7)
125125* **Prompt-behavior tuning**, flagging length-control, tool-triggering, subagent, and instruction-following prompts that may behave differently on the target model
126126* **Silent default handling**, opting back into thinking summarization (`thinking.display: "summarized"`) when reasoning is surfaced to users on Claude Opus 4.8 and Claude Opus 4.7
agents-and-tools/mcp-connector Changed · +1 / -2 lines
from line 1317
13171317 ```
13181318
13191319 ```php PHP
1320 // The PHP SDK exposes the Files API under the beta namespace; field names can differ from other SDKs.
13211320 // As a content block in a message
13221321 $resource = $mcp->readResource('file:///path/to/doc.txt');
13231322
from line 1338
13391338
13401339 // As a file upload
13411340 $fileResource = $mcp->readResource('file:///path/to/data.json');
1342 $file = $anthropic->beta->files->upload(file: BetaMcp::resourceToFile($fileResource));
1341 $file = $anthropic->files->upload(file: BetaMcp::resourceToFile($fileResource));
13431342 echo $file->id, "\n";
13441343 ```
13451344
agents-and-tools/tool-use/memory-tool Changed · +2 / -2 lines
from line 104
104104
105105## Getting started
106106
107The memory tool is generally available on the Messages API: no beta header is required. Using it takes two steps:
107Using the memory tool takes two steps:
108108
1091091. Add the memory tool to your request. The `tools` entry `{"type": "memory_20250818", "name": "memory"}` is the entire configuration: the `name` must be `memory`, and you don't define an input schema for an Anthropic-provided tool.
1101102. Implement a client-side handler for each memory command. Your handler must reject paths outside `/memories`, so read [Path traversal protection](https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool#path-traversal-protection) before you write it.
from line 285
285285
286286Claude's reply to a request like the previous one ends with a `tool_use` block that requests a memory operation, such as `view /memories`. Your application executes the operation and returns the result in a `tool_result` block, then sends the conversation back so Claude can continue: the standard [tool-use loop](https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls).
287287
288Four SDKs provide memory tool helpers that handle the tool interface and the loop. Subclass `BetaAbstractMemoryTool` (Python and C#), use `betaMemoryTool` (TypeScript), or implement `BetaMemoryToolHandler` (Java) to back memory with your own storage, such as files on disk, a database, cloud storage, or encrypted files. Python and TypeScript also ship a ready-made local-filesystem implementation, `BetaLocalFilesystemMemoryTool`. The helper and tool-runner surfaces live in each SDK's beta namespace even though the memory tool itself is generally available. The Go and Ruby SDKs have no memory helper, so those examples run the tool-use loop themselves, and PHP wraps your handler closure in its generic `BetaRunnableTool`. All three use an in-memory store that you replace with your own storage.
288Four SDKs provide memory tool helpers that handle the tool interface and the loop. Subclass `BetaAbstractMemoryTool` (Python and C#), use `betaMemoryTool` (TypeScript), or implement `BetaMemoryToolHandler` (Java) to back memory with your own storage, such as files on disk, a database, cloud storage, or encrypted files. Python and TypeScript also ship a ready-made local-filesystem implementation, `BetaLocalFilesystemMemoryTool`. The helper and tool-runner surfaces live in each SDK's beta namespace even though the memory tool itself doesn't require a beta header. The Go and Ruby SDKs have no memory helper, so those examples run the tool-use loop themselves, and PHP wraps your handler closure in its generic `BetaRunnableTool`. All three use an in-memory store that you replace with your own storage.
289289
290290<CodeGroup exclude="shell">
291291 ```python Python
agents-and-tools/tool-use/tool-runner Changed · +1 / -1 lines
from line 1088
10881088
10891089### Automatic context management
10901090
1091For long-running agentic tasks, the Python, TypeScript, and Ruby tool runners support automatic [compaction](https://platform.claude.com/docs/en/build-with-claude/context-editing#client-side-compaction-sdk), which generates summaries when token usage exceeds a threshold so the conversation can continue beyond context window limits. All three SDKs have deprecated this client-side option in favor of server-side [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing), which is available in every SDK. The Go, Java, C#, and PHP tool runners don't include client-side compaction.
1091For long-running agentic tasks, the TypeScript and Ruby tool runners support automatic [compaction](https://platform.claude.com/docs/en/build-with-claude/context-editing#client-side-compaction-sdk), which generates summaries when token usage exceeds a threshold so the conversation can continue beyond context window limits. Both SDKs have deprecated this client-side option in favor of [server-side compaction](https://platform.claude.com/docs/en/build-with-claude/compaction), which works with every SDK's tool runner through the `context_management` request parameter. The Python SDK (v1.0 and later) and the Go, Java, C#, and PHP tool runners don't include client-side compaction.
10921092
10931093### Debugging tool execution
10941094
api/admin/analytics/artifacts Changed · +1 / -1 lines
from line 100
100100```http
101101curl https://api.anthropic.com/v1/organizations/analytics/artifacts \
102102 -H 'anthropic-version: 2023-06-01' \
103 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
103 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
104104```
105105
106106#### Response
api/admin/analytics/artifacts/list Changed · +1 / -1 lines
from line 98
9898```http
9999curl https://api.anthropic.com/v1/organizations/analytics/artifacts \
100100 -H 'anthropic-version: 2023-06-01' \
101 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
101 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
102102```
103103
104104#### Response
api/admin/analytics/chat_projects/list Changed · +1 / -1 lines
from line 136
136136```http
137137curl https://api.anthropic.com/v1/organizations/analytics/apps/chat/projects \
138138 -H 'anthropic-version: 2023-06-01' \
139 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
139 -H "X-Api-Key: $ANTHROPIC_ADMIN_API_KEY"
140140```
141141
142142#### Response