Skip to main content
Perplexity

Search documentation

Type to search this documentation.

Download Agent Response File

GET/v1/agent/{id}/files/{file_id}/contentDownload Agent Response File

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.

Parameters

idstringpathrequired

Response id (`resp_<...>`)

file_idstringpathrequired

File id from the file list endpoint

Responses

200The raw file bytes.application/octet-stream
string · binary
Example response
"binary"
404Unknown response id or file id, or the response belongs to a different account.application/json
object
errorobject

Error information returned when a request fails

Show child attributes
codestring

Error code

messagestringrequired

Human-readable error message

typestring

Error type category

Example response
{
  "error": {
    "code": "string",
    "message": "string",
    "type": "string"
  }
}
Documentation menu