---
title: "Download Pdf"
method: GET
path: "/v1/api/download_pdf"
tags: ["document"]
---

# Download Pdf

`GET /v1/api/download_pdf`

## Request

- The document declares no server URL.
- Auth: API key in header `X-API-Key`

Download a PDF file from a URL and save it to the database.

Args:
    user: The user who is uploading the file.
    url: The URL of the PDF file to download.

Returns:
    dict: The document ID of the downloaded file.

## Query parameters

- `url` string, required

## Response `201`

Successful Response

- DocumentUploadResponse: Response for document upload
  - `docId` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/askyourpdf/apis/askyourpdf-api.md) - [All operations](https://skmtc.dev/askyourpdf/apis/askyourpdf-api/llms.txt) - [OpenAPI document](https://skmtc.dev/askyourpdf/apis/askyourpdf-api/revisions/5e6164560609?raw)
