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

# File Download

> Allows downloading a file available in the system.

## Endpoint

`GET /download-file`

**Authentication**\
Requires header `authorization: <your_token>`.

## Parameters

Send the **file id** as a query parameter.

## Example (cURL)

```bash theme={null}
curl -X GET "https://gateway.orkeia.ai/download-file"   -H "authorization:  <your_token>"   -o downloaded_file.bin
```

## Responses

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": "document url"
}
```

### 500 — Bad Request

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
