> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrnshot.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Caching & fresh

> How results are cached, and when a request counts against quota

## Cache keying

Results are cached for **\~15 minutes**, keyed on the URL together with every
capture option (`format`, `width`, `height`, `full_page`, `quality`). Two
requests for the same URL with different options are different cache
entries — changing `format` from `png` to `webp` will not return a stale
cached PNG.

## Every request counts against quota

Cache hits and misses are billed the same way: a request that returns a
cached image still increments `used` in your [usage](/api-reference/usage/get-current-usage)
totals. The cache exists to make repeated captures fast and cheap to serve
on scrnshot's end, not to give you free requests.

The response tells you which case you hit:

```json theme={null}
{
  "image_url": "https://cdn.scrnshot.site/a1b2c3d4.png",
  "cached": true,
  ...
}
```

## Forcing a fresh render

Pro plans can set `fresh: true` to skip the cache entirely and force a new
render, useful for pages that change frequently (dashboards, live data,
anything time-sensitive). Free plans cannot bypass the cache — `fresh: true`
on Free returns `400`.

```bash theme={null}
curl -X POST https://api.scrnshot.site/v1/screenshots \
  -H "X-API-Key: $SCRNSHOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "fresh": true}'
```

## Retention vs. caching

Don't confuse the \~15-minute result cache with image retention — they're
different windows. Retention is how long the *stored image* stays available
at its `image_url` after capture (7 days on Free, 30 days on Pro); caching
is how long a *request* can be served without re-rendering. See
[Plans & limits](/guides/plans-and-limits) for retention details.
