Menu

Caching options

Reference for the caching options of the shotkit screenshot API, with an example request for each.

Store the render and reuse it for identical requests. Cache hits are free and don't count toward your monthly screenshots.

cache

Cache the result and return a CDN URL. Identical requests (same options, same workspace) return the stored file until it expires. GET requests are redirected (302) to the file's CDN URL; POST requests get the bytes. Send Cache-Control: no-cache to force a fresh render that also refreshes the entry. See Caching.

Type: boolean · Default: false

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","cache":true}' \
  --fail-with-body -o shot.jpg

cache_ttl

Cache lifetime in seconds. Between 4 hours (14400) and 30 days (2592000). Also how long uploaded files and URLs from response_type=json stay available.

Type: number · Default: 14400 · Range: 14400–2592000

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","cache":true,"cache_ttl":86400}' \
  --fail-with-body -o shot.jpg

cache_key

Distinguish otherwise identical cached renders.

Type: string

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","cache":true,"cache_key":"2026-10-09"}' \
  --fail-with-body -o shot.jpg