Claude Platform Docs

Download File

client.Files.Download(ctx, fileID) (*Response, error)
GET/v1/files/{file_id}/content

Download File

Parameters
fileID string

ID of the File.

Returns
type FileDownloadResponse interface{…}

Download File

package main

import (
	"context"
	"fmt"

	"github.com/anthropics/anthropic-sdk-go"
	"github.com/anthropics/anthropic-sdk-go/option"
)

func main() {
	client := anthropic.NewClient(
		option.WithAPIKey("my-anthropic-api-key"),
	)
	response, err := client.Files.Download(context.TODO(), "file_id")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response)
}