---
title: "Suggest a cover"
description: "Picks a cover from the built-in gallery for what the page is about, the way new pages get one, without saving it: cover is gallery:<id>."
canonical_url: https://docs.markdrop.in/api/pages/suggest-a-cover
last_updated: 2026-11-04
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Suggest a cover

`POST https://api.markdrop.in/api/v1/pages/{slug}/cover/suggest`

Picks a cover from the built-in gallery for what the page is about, the way new pages get one, without saving it: `cover` is `gallery:<id>`. For people who can edit the page.

- **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-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).

## 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/pages/k3x9q2m/cover/suggest \
  -H "Authorization: Bearer $MARKDROP_TOKEN"
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/pages/k3x9q2m/cover/suggest", {
  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/pages/k3x9q2m/cover/suggest",
    headers={"Authorization": f"Bearer {os.environ['MARKDROP_TOKEN']}"},
)
r.raise_for_status()
print(r.json())
```
