Claude Platform Docs

Download File

client.files.download(stringfileID, RequestOptionsoptions?): Response
GET/v1/files/{file_id}/content

Download File

Parameters
fileID: string

ID of the File.

Returns
unnamed_schema_0 = Response

Download File

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env["ANTHROPIC_API_KEY"] // This is the default and can be omitted
});

const response = await client.files.download("file_id");

console.log(response);

const content = await response.blob();
console.log(content);