Download File
client.Beta.Files.Download(ctx, fileID, query) (*Response, error)
/v1/files/{file_id}/content?beta=true
Download File
Parameters
fileID string
ID of the File.
Returns
type BetaFileDownloadResponse interface{…}
Download File
Go
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.Beta.Files.Download(
context.TODO(),
"file_id",
anthropic.BetaFileDownloadParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response)
}