---
title: "Analyse with AI"
description: "Claude Haiku 5.5 reads the numbers (and your own content) and returns 3 to 5 findings that point at a section, timestamp, page or version, with rewrites…"
canonical_url: https://docs.markdrop.in/api/analytics/analyse-with-ai
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Analyse with AI

`POST https://api.markdrop.in/api/v1/me/documents/{slug}/analytics/ai/{kind}`

Claude Haiku 5.5 reads the numbers (and your own content) and returns 3 to 5 findings that point at a section, timestamp, page or version, with rewrites (`content`), chapters (`media`) and a verdict with a confidence Markdrop computes (`versions`). Returns the saved analysis when there is one; send `{"refresh": true}` to analyse again. Below 20 sessions the model isn't called (`state: thin`). Counts towards your AI limits: `429` with `code: limit` and a `reason` when one is reached.

- **Authentication:** API token required: `Authorization: Bearer mdk_…`.
- **Rate limit:** 20 per minute per IP address.
- **MCP tool:** `analyze_document_engagement` ([tools](https://docs.markdrop.in/ai/tools))
- **Guide:** [AI insights for one link](https://docs.markdrop.in/analytics/ai-insights)

## Path parameters

- `slug` (string, required): The document's address: the part after `markdrop.in/`.
- `kind` (string, required): One of `content`, `media`, `pages`, `versions`. One of `content`, `media`, `pages`, `versions`.

## Query parameters

- `range` (string): The period to count: `7d`, `30d`, `90d` or `all`. One of `7d`, `30d`, `90d`, `all`. One of `7d`, `30d`, `90d`, `all`. Default `"30d"`.
- `internal` (integer): From 0 to 1. Default `0`.
- `ver` (integer): From 1 to 100,000.

## 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/me/documents/k3x9q2m/analytics/ai/content?range=30d' \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/me/documents/k3x9q2m/analytics/ai/content?range=30d", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MARKDROP_TOKEN}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os

import requests

r = requests.post(
    "https://api.markdrop.in/api/v1/me/documents/k3x9q2m/analytics/ai/content?range=30d",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
print(r.json())
```
