Claude Platform Docs

Download File

files.download(file_id) -> StringIO
GET/v1/files/{file_id}/content

Download File

Parameters
file_id: String

ID of the File.

Returns
StringIO

Download File

require "anthropic"

anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")

response = anthropic.files.download("file_id")

puts(response)