---
title: Download File
url: https://platform.claude.com/docs/en/api/go/files/download
---

# Download File

`client.Files.Download(ctx, fileID, query) (*Response, error)`

**GET** `/v1/files/{file_id}/content`

Download File

## Parameters

- `fileID string` (path parameter)

  ID of the File.

- `query FileDownloadParams`

  - `WorkspaceID param.Opt[string] Optional` (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

- `type FileDownloadResponse interface{…}`

## Example

```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.Files.Download(
		context.TODO(),
		"file_id",
		anthropic.FileDownloadParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", response)
}
```
