> For the complete documentation index, see [llms.txt](https://docs.orbitfin.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.orbitfin.ai/orbit-api-reference/api/document-download.md).

# Document Download

Download report files in various formats.

#### Endpoint

```
POST /files/download
```

#### Parameters

| Parameter  | Type      | Required | Description                            |
| ---------- | --------- | -------- | -------------------------------------- |
| report\_id | string\[] | Yes      | Report IDs to download (max: 10)       |
| format     | string    | Yes      | Output format: pdf, extract, embedding |
| options    | object    | No       | Format-specific options                |

**Format Options:**

* **PDF**
* **Extract**
* **Embedding**

#### Example Request

bash

```bash
curl -X POST "https://api.orbitfin.ai/v1/files/download" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "report_id": ["rpt_9xk3m7nq"],
    "format": "extract",
    "options": {
      "format": "json",
      "include_tables": true
    }
  }'
```

#### Response

json

```json
{
  "status": "success",
  "credits_used": 0.5,
  "data": {
    "download_urls": [
      {
        "report_id": "rpt_9xk3m7nq",
        "url": "https://download.orbitfin.ai/temp/...",
        "expires_at": "2024-12-08T10:30:00Z",
        "file_size": 234567,
        "format": "extract"
      }
    ]
  }
}
```
