---
title: "Ask about a page"
description: "Answers a question about a page you can read, from its content and the embedded items you can open."
canonical_url: https://docs.markdrop.in/api/page-ai/ask-about-a-page
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Ask about a page

`POST https://api.markdrop.in/api/v1/ai/pages/{slug}/ask`

Answers a question about a page you can read, from its content and the embedded items you can open. Send earlier turns in `history` to follow up. Streams the answer as server-sent events: `delta` events, then `done`.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 30 per minute per IP address.
- **Guide:** [AI in pages](https://docs.markdrop.in/pages/ai)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.

## Headers

- `X-Read-Password` (string): The password of a password-protected document.
- `X-Edit-Secret` (string): The document's edit secret (`sk_…`), for a document published without an account. See [Edit key](https://docs.markdrop.in/documents/edit-key).
- `X-Markdrop-Workspace` (string): A workspace's id: answer only if the document is in that workspace, else `404`. Workspace domains send it; you rarely need it.

## Request body

`application/json`, required.

- `question` (string, required): Your question. Up to 4,000 characters.
- `history` (array of any): Earlier questions and answers in this conversation, as `{q, a}`, oldest first. Up to 40 items.

## Responses

- `200`: OK.
- `401`: No token, or the token is revoked or mistyped.
- `422`: The request didn't validate. `detail` lists each problem, with where it is (`loc`) and why (`msg`).
- `429`: Too many requests from your IP address. Wait the seconds in `Retry-After`.

## Examples

**curl**

```bash
curl -X POST https://api.markdrop.in/api/v1/ai/pages/k3x9q2m/ask \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"question":"What'\''s still open?"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/ai/pages/k3x9q2m/ask", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "question": "What's still open?"
  }),
});
const data = await res.text();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/ai/pages/k3x9q2m/ask",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"question": "What's still open?"},
)
r.raise_for_status()
print(r.text)
```
