Image options
Reference for the image options of the shotkit screenshot API, with an example request for each.
Encoding of image output. Pages are captured losslessly once, then resized and encoded, so these options never change the layout.
image_quality
Quality for lossy formats and video (0–100). Applies to jpg, webp, avif, tiff, and to video bitrate. For png, a value below 100 enables palette quantisation for much smaller files.
Type: number · Default: 80 · Range: 0–100
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","format":"webp","image_quality":60}' \
--fail-with-body -o shot.webpimage_width
Resize output to fit this width (keeps ratio). Images are only scaled down, never up. With both image_width and image_height, the result fits inside the box.
Type: number · Range: 1–16000
curl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","image_width":640}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com","image_height":400}' \
--fail-with-body -o shot.jpgcurl -X POST "https://shotkit.net/api/take" \
-H "X-Access-Key: YOUR_ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"html":"<div style=\"display:inline-block;padding:12px 20px;border-radius:999px;background:#16a34a;color:#fff;font:600 24px system-ui\">Passing</div>","selector":"div","format":"png","omit_background":true}' \
--fail-with-body -o shot.png