Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drain.lat/llms.txt

Use this file to discover all available pages before exploring further.

Screenshot

Base URL: https://drain.lat/api/v1/screenshot All endpoints require the x-api-key header.

GET /

Take a screenshot of any public webpage and return it as a PNG image. Endpoint
GET /api/v1/screenshot?url=https://example.com
Query Parameters
ParameterTypeDefaultDescription
urlstring-Required. The full URL to screenshot (must be https://)
widthnumber1280Viewport width in pixels (max 2560)
heightnumber720Viewport height in pixels (max 1440)
fullPagebooleanfalseCapture the full scrollable page instead of just the viewport
curl "https://drain.lat/api/v1/screenshot?url=https://github.com" \
  -H "x-api-key: YOUR_API_KEY" \
  --output screenshot.png
Response Returns a raw image/png binary. Save it directly to a file or pipe it into an image viewer.
Content-Type: image/png

Examples

Default viewport (1280×720)
GET /api/v1/screenshot?url=https://example.com
Full HD screenshot
GET /api/v1/screenshot?url=https://example.com&width=1920&height=1080
Full page capture
GET /api/v1/screenshot?url=https://example.com&fullPage=true
Max resolution
GET /api/v1/screenshot?url=https://example.com&width=2560&height=1440

Limitations

Requests to localhost, 127.0.0.1, 0.0.0.0, and private IP ranges (e.g. 192.168.x.x, 10.x.x.x) are blocked for security reasons.
  • Maximum resolution: 2560×1440
  • Only public URLs are supported - pages behind login walls will capture the login screen
  • JavaScript-heavy pages may not fully render if they take too long to load
  • The endpoint returns an error if the target URL is unreachable or returns a non-2xx status