---
title: "Chat With Pdf"
method: POST
path: "/api/v1/chat/ask"
tags: ["Chat & AI"]
---

# Chat With Pdf

`POST /api/v1/chat/ask`

## Request

- Base URL: `https://api.allpdfmagic.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.allpdfmagic.com/api/v1/chat/ask`
- Auth: HTTP bearer

Ask a question about an uploaded PDF document.

## Request body

- ChatRequest
  - `document_id` string, required
  - `question` string, required
  - `history` ChatMessage[], nullable
    - `role` string, required
    - `content` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/allpdfmagic/apis/allpdfmagic-api.md) · [All operations](https://skmtc.dev/allpdfmagic/apis/allpdfmagic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/allpdfmagic/apis/allpdfmagic-api/revisions/92ad9e3b3b88?raw)
