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

For Amazon Bedrock support changedcli-sdks-libraries/sdks/python

Nearest release: v2.1.238, published under an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+5added
Lines−19removed
From line 330 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits11to this page, all time

The whole hunk

from line 330, old and new numbered
/
lines
from line 330
330330client = Anthropic()
331331 
332332# Upload using a file path
333client.beta.files.upload(
333client.files.upload(
334334 file=Path("/path/to/file"),
335335)
336336 
337337# Upload using bytes
338client.beta.files.upload(
338client.files.upload(
339339 file=("file.txt", b"my bytes", "text/plain"),
340340)
341341```
from line 713
713713 
714714You can access most beta API features through the `beta` property of the client. To enable a particular beta feature, you need to add the appropriate [beta header](https://platform.claude.com/docs/en/api/beta-headers) to the `betas` field when creating a message.
715715 
716For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files):
716For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing):
717717 
718718```python
719719client = Anthropic()
from line 721
721721response = client.beta.messages.create(
722722 model="claude-opus-5",
723723 max_tokens=1024,
724 messages=[
725 {
726 "role": "user",
727 "content": [
728 {"type": "text", "text": "Please summarize this document for me."},
729 {
730 "type": "document",
731 "source": {
732 "type": "file",
733 "file_id": "file_abc123",
734 },
735 },
736 ],
737 },
738 ],
739 betas=["files-api-2025-04-14"],
724 messages=[{"role": "user", "content": "Hello, Claude"}],
725 betas=["context-management-2025-06-27"],
740726)
741727```
742728 
Feedback