Claude Platform Docs

파일 다운로드

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

파일 다운로드

Parameters
file_id: String⁠Path parameter

ID of the File.

workspace_id: String⁠Header parameter

Optional header to select the Workspace for this request. The value is a Workspace ID (for example, wrkspc_011CZkZaBF1tNoB5wlCeusgy).

Only needed for credentials that can act on more than one Workspace. A credential that belongs to a specific Workspace may omit it; if sent, it must match that Workspace.

Returns
StringIO
파일 다운로드
require "anthropic"

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

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

puts(response)