POST /v1/screenshot

The POST endpoint gives you full control over screenshot capture with all available options.

Endpoint

POST https://api.renderscreenshot.com/v1/screenshot

Authentication

Include your API key in the Authorization header:

Authorization: Bearer rs_live_xxxxx

Request Body

{
  "url": "https://example.com",
  "preset": "og_card",
  "viewport": {
    "width": 1200,
    "height": 630
  },
  "output": {
    "format": "png",
    "quality": 90
  }
}

Parameters

Parameter Type Required Description
url string Yes The URL to screenshot
preset string No Preset configuration (og_card, twitter_card, full_page)
viewport.width integer No Viewport width in pixels (default: 1280)
viewport.height integer No Viewport height in pixels (default: 720)
output.format string No Output format: png, jpeg, webp, pdf
output.quality integer No Image quality 1-100 (jpeg/webp only)

Response

On success, returns the screenshot binary with appropriate Content-Type header.

Headers

Content-Type: image/png
X-Cache-URL: https://cdn.renderscreenshot.com/screenshots/abc123.png
X-Request-Id: req_xxxxx

The X-Cache-URL header contains a public CDN URL that requires no authentication.

Example

curl -X POST https://api.renderscreenshot.com/v1/screenshot \
  -H "Authorization: Bearer rs_live_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://github.com",
    "preset": "og_card"
  }' \
  --output screenshot.png

Full Parameter Reference

See Parameters for a complete list of all available options.

Was this page helpful?