---
title: "Ask AI about your items"
description: "Answers a question from the items you can open, with Claude Haiku 5.5: AI turns the question into search terms, search finds up to 40 matching items, and AI…"
canonical_url: https://docs.markdrop.in/api/search/ask-ai-about-your-items
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Ask AI about your items

`POST https://api.markdrop.in/api/v1/search/ask`

Answers a question from the items you can open, with Claude Haiku 5.5: AI turns the question into search terms, search finds up to 40 matching items, and AI picks the relevant ones and writes a short answer that cites them as [n]. Only text you can open is sent, never an encrypted item. Streams server-sent events: `status` (the stage), `results` (the matching items), `delta` (answer text as it's written), then `done` with `answer`, `citations` and `ranked`; or `limit` when an AI limit stops it, or `error`. Counts towards your AI limits.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 30 per minute per IP address.
- **MCP tool:** `ask_documents` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [Ask AI](https://docs.markdrop.in/workspaces/search#ask-ai)

## Request body

`application/json`, required.

- `question` (string, required): 1–500 characters.
- `scope` (string): Up to 40 characters.
- `current` (string): Up to 40 characters.

## 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/search/ask \
  -H "Authorization: Bearer $MARKDROP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"question":"How do we onboard contractors?"}'
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/search/ask", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "question": "How do we onboard contractors?"
  }),
});
const data = await res.text();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/search/ask",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
    json={"question": "How do we onboard contractors?"},
)
r.raise_for_status()
print(r.text)
```
