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

# Download File

`HttpResponse files().download(params = FileDownloadParams.none(), requestOptions = RequestOptions.none())`

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

Download File

## Parameters

- `FileDownloadParams params`

  - `Optional<String> fileId` (path parameter)

    ID of the File.

  - `Optional<String> workspaceId` (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.

## Example

```java
package com.anthropic.example;

import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.core.http.HttpResponse;
import com.anthropic.models.files.FileDownloadParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        AnthropicClient client = AnthropicOkHttpClient.fromEnv();

        HttpResponse response = client.files().download("file_id");
    }
}
```
