One change
For Amazon Bedrock support
cli-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.
cli-sdks-libraries/sdks/python Changed · +5 / -19 lines
from line 330
client = Anthropic() # Upload using a file path -client.beta.files.upload( +client.files.upload( file=Path("/path/to/file"), ) # Upload using bytes -client.beta.files.upload( +client.files.upload( file=("file.txt", b"my bytes", "text/plain"), ) ```
from line 713
You 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. -For example, to use the [Files API](https://platform.claude.com/docs/en/build-with-claude/files): +For example, to enable [context editing](https://platform.claude.com/docs/en/build-with-claude/context-editing): ```python client = Anthropic()
from line 721
response = client.beta.messages.create( model="claude-opus-5", max_tokens=1024, - messages=[ - { - "role": "user", - "content": [ - {"type": "text", "text": "Please summarize this document for me."}, - { - "type": "document", - "source": { - "type": "file", - "file_id": "file_abc123", - }, - }, - ], - }, - ], - betas=["files-api-2025-04-14"], + messages=[{"role": "user", "content": "Hello, Claude"}], + betas=["context-management-2025-06-27"], ) ```