Skip to content

Screenshot API quickstart (curl, JavaScript, Python, PHP)

  1. Request access by email at support@shotvik.com.
  2. Once you have access, you get an API key (it looks like shotvik_<key_id>_<secret>) and its signing secret, which you only need for signed OG image links. Shotvik can’t show either of them again later, so store them safely.
  3. Store the key as an environment variable. Don’t commit it to your repository:
Terminal window
export SHOTVIK_API_KEY="shotvik_..."

This request renders https://example.com and saves it as a PNG (POST /v1/screenshot, key in the Authorization: Bearer header).

Terminal window
curl https://api.shotvik.com/v1/screenshot \
-H "Authorization: Bearer $SHOTVIK_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com", "format": "png"}' \
--fail-with-body --output screenshot.png

Open screenshot.png. If the request fails, you get a JSON error with a code, a message and a request_id. See Errors.

Useful response headers:

  • X-Usage-Used / X-Usage-Remaining: your monthly usage;
  • X-Shotvik-Warnings: only present if fonts or images on the page were skipped (details);
  • X-Target-Status: the status the target site returned;
  • X-Request-Id: include it if you contact support.

A request counts toward your monthly quota only when you get an image or PDF back, even if the target page itself returned a 4xx/5xx status. Timeouts, errors on our side, blocked requests and cache hits don’t count. See Rate limits and plans.

Shotvik is in private beta. Request access: support@shotvik.com · Privacy