Expand description
The Files API (beta).
Upload, download, list, and delete files. Once uploaded, file IDs can
be referenced in DocumentSource::File
and ImageSource::File blocks
instead of base64-encoding the bytes inline on every request.
Upload and download both support true streaming I/O (no buffering
the whole payload in memory) via the _path and _to variants.
§Beta
Every Files method automatically sends
anthropic-beta: files-api-2025-04-14. Override the beta version on the
Client builder if a newer revision is current.
Re-exports§
pub use types::FileDeleted;pub use types::FileMetadata;pub use types::ListFilesParams;pub use api::Files;async