Anthropic::FileMetadata
Inherits JSON::Serializable < Struct < Value < Object
File metadata returned by the Files API
file = client.beta.files.retrieve("file_abc123")
puts file.filename # => "document.pdf"
puts file.size_bytes # => 1024000
puts file.downloadable # => false (uploaded files are not downloadable)
Constructors
new(id : String, type : String, filename : String, mime_type : String, size_bytes : Int64, created_at : String, downloadable : Bool)
Sourcenew(pull : JSON::PullParser)
Sourcenew(*, __pull_for_json_serializable pull : JSON::PullParser)
SourceInstance methods
downloadable?
Whether the file can be downloaded Only files created by Claude (via code execution) are downloadable