> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chowder.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Download File

> Download a file from the instance as binary.

Downloads a file from the instance. The response is the raw binary file content with appropriate `Content-Disposition` and `Content-Type` headers set, so it works naturally with browsers and tools like `curl -O`.

## Authentication

Requires an **org-level API key** or a **scoped token** with the appropriate permission.

## Path Parameters

<ParamField path="instance_id" type="string" required>
  The ID of the instance.
</ParamField>

## Query Parameters

<ParamField query="path" type="string" required>
  The file path to download, relative to the instance root.
</ParamField>

## Response

Returns the raw binary file content with a `Content-Disposition: attachment` header.

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  curl -X GET "https://api.chowder.dev/v1/instances/ins_abc123/files/download?path=assets/logo.png" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -O -J
  ```
</RequestExample>

<ResponseExample>
  ```text 200 theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
  Binary file content with headers:
  Content-Disposition: attachment; filename="logo.png"
  Content-Type: image/png
  ```
</ResponseExample>
