---
title: "Screenshot / Thumbnail"
method: GET
path: "/{url}"
tags: ["screenshots"]
---

# Screenshot / Thumbnail

`GET /{url}`

## Request

- Base URL: `https://docs.thedrive.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.thedrive.ai/{url}`
- Auth: none declared

Generate a thumbnail by simply appending a URL to the service path.

**Usage Examples:**
```
# Without scheme (https:// is assumed)
dev.thedrive.ai/example.com/document.pdf

# With full URL
dev.thedrive.ai/https://example.com/image.png

# With options
dev.thedrive.ai/example.com/doc.pdf?w=300&h=200&q=80

# URLs with query strings (e.g., Azure SAS tokens)
dev.thedrive.ai/https://storage.blob.core.windows.net/file.pdf?sv=2024&sig=xxx
```

**In HTML:**
```html
<img src="https://dev.thedrive.ai/example.com/preview.png" />
```

**Query Parameters (ours):**
- `w`: Width (default 600, max 2000)
- `h`: Height (default 400, max 2000)
- `q`: Quality (default 95, 1-100)
- `nocache`: Bypass cache (default false)

**Screenshot Options (websites only, ignored for documents):**
- `fullpage`: Capture full scrollable page (default false)
- `delay`: Extra wait in ms after page load, max 5000 (default 0)
- `dark`: Emulate dark mode / prefers-color-scheme: dark (default false)
- `device`: Viewport preset — `mobile` (390x844), `tablet` (820x1180), `desktop` (1440x900)
- `viewport`: Raw viewport override, e.g. `375x812` (overrides device)
- `selector`: CSS selector to capture a specific element (falls back to viewport if not found)
- `wait`: CSS selector to wait for before capturing (max 5s timeout)

**Note:** Query parameters from the target URL (like Azure SAS tokens) are preserved and passed through.

## Path parameters

- `url` string, required

## Query parameters

- `w` integer
- `h` integer
- `q` integer
- `nocache` boolean
- `format` string
- `duration` integer
- `fullpage` boolean
- `delay` integer
- `dark` boolean
- `device` string, nullable
- `viewport` string, nullable
- `selector` string, nullable
- `wait` string, nullable
- `_skip_og_check` boolean

## Response `200`

Thumbnail image

- unknown

## Other responses

- `400`: Invalid URL or fetch failed
- `415`: Unsupported file type
- `422`: Validation Error

---

[API](https://skmtc.dev/thedrive/apis/the-drive-ai-api.md) · [All operations](https://skmtc.dev/thedrive/apis/the-drive-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/thedrive/apis/the-drive-ai-api/revisions/ee4e32647ebf?raw)
