Screenshot
Premium · 5 creditsCapture a screenshot of any web page with configurable viewport dimensions, image format, and full-page mode.
POST /api/screenshot
Section titled “POST /api/screenshot”Parameters
Section titled “Parameters”| Field | Type | Required | Default | Description |
|---|---|---|---|---|
url | string | Yes | — | URL to capture |
width | integer | No | 1280 | Viewport width in pixels (max 3840) |
height | integer | No | 720 | Viewport height in pixels (max 2160) |
format | string | No | png | png, jpeg, or webp |
quality | integer | No | 85 | Compression quality 0–100 (jpeg and webp only) |
full | boolean | No | false | Capture the full scrollable page |
Response
Section titled “Response”Binary image data with the appropriate Content-Type header.
Examples
Section titled “Examples”Basic screenshot
Section titled “Basic screenshot”curl -X POST https://morso.dev/api/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com"}' \ -o screenshot.pngFull-page JPEG
Section titled “Full-page JPEG”curl -X POST https://morso.dev/api/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "format": "jpeg", "quality": 90, "full": true}' \ -o screenshot.jpgCustom viewport
Section titled “Custom viewport”curl -X POST https://morso.dev/api/screenshot \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"url": "https://example.com", "width": 375, "height": 812, "format": "webp"}' \ -o mobile.webpErrors
Section titled “Errors”- 400 — Missing URL, dimensions exceed limits, or invalid format.
- 500 — Browser unavailable or page navigation timeout.
See Errors for the standard error shape.