---
title: "Get the preview image"
description: "The 1200×630 image link previews show for a document, as PNG."
canonical_url: https://docs.markdrop.in/api/documents/get-the-preview-image
last_updated: 2026-10-30
site: "Markdrop Docs"
index: https://docs.markdrop.in/llms.txt
---

# Get the preview image

`GET https://api.markdrop.in/api/v1/og/{slug}.png`

The 1200×630 image link previews show for a document, as PNG.

- **Authentication:** No token needed.
- **Rate limit:** 120 per minute per IP address.
- **Guide:** [Link previews](https://docs.markdrop.in/documents/link-previews)

## Path parameters

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

## Query parameters

- `host` (string): Draw the card for this address (a workspace's own domain) instead of markdrop.in. Up to 253 characters.

## Responses

- `200`: OK.
- `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 https://api.markdrop.in/api/v1/og/k3x9q2m.png
```

**JavaScript**

```javascript
const res = await fetch("https://api.markdrop.in/api/v1/og/k3x9q2m.png");
const data = await res.blob();
```

**Python**

```python
import requests

r = requests.get("https://api.markdrop.in/api/v1/og/k3x9q2m.png")
r.raise_for_status()
open("out.png", "wb").write(r.content)
```
