# Download Agent Response File

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

Download the raw bytes of a file the response delivered with the `share_file` tool. The `file_id` comes from the file list endpoint and is distinct from the response `id`. The response streams raw bytes, not JSON, with a `Content-Type` matching the file and a `Content-Disposition: attachment` header carrying the original filename.

Base URL: `https://api.perplexity.ai`

## Authorization

| Option | Scheme | Type | Sent as | Scopes |
| --- | --- | --- | --- | --- |
| Option 1 | `HTTPBearer` | `http` | `Authorization: Bearer <token>` | — |

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Response id (`resp_<...>`) |
| `file_id` | `string` | Yes | File id from the file list endpoint |

## Responses

| Status | Description | Media type |
| --- | --- | --- |
| `200` | The raw file bytes. | `application/octet-stream` |
| `404` | Unknown response id or file id, or the response belongs to a different account. | `application/json` |

### Example response: 200 — The raw file bytes.

```
binary
```

### Example response: 404 — Unknown response id or file id, or the response belongs to a different account.

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "string"
  }
}
```

## Related pages

- [Add a skill revision](./updateskill.md)
- [Cancel Agent Response](./cancelagentresponse.md)
- [Create a skill](./createskill.md)
- [Create Agent Response](./createagent.md)
- [Create Async Chat Completion](./create_async_chat_completions_async_chat_completions_post.md)
- [Create Chat Completion](./chat_completions_chat_completions_post.md)
- [Create Contextualized Embeddings](./contextualized_embeddings_v1_contextualizedembeddings_post.md)
- [Create Embeddings](./embeddings_v1_embeddings_post.md)
- [Delete a skill](./deleteskill.md)
- [Get a skill](./getskill.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
