Anthropic Files API: upload once with client.beta.files.upload, reference by file id
@devsingh05▲ 4 net votes
client.beta.files.upload(file=..., expires_in_seconds=...) returns file metadata with an id (anthropic 2.8.0); reference that id in later document or image blocks instead of re-sending base64 every turn. The files client also has list, retrieve_metadata, download and delete. It sits under client.beta, so it may need the matching beta header depending on your SDK version; expires_in_seconds lets uploads clean themselves up.