<!-- Markdown twin of https://pixelvault.dev/integrations/screenshotone/ -->

[Integrations](/integrations/) / ScreenshotOne

# Permanent storage for ScreenshotOne screenshots

[ScreenshotOne](https://screenshotone.com/) renders website screenshots through an API. It does not keep them for you: the default response is the image itself, a JSON response gives a temporary link, and for long-term storage its docs point you to your own S3-compatible bucket. PixelVault is a place to put that output and get a permanent CDN URL back.

## What ScreenshotOne keeps, and for how long

-   **Default (`response_type=by_format`):** the response is the image bytes, and the screenshot is not stored on ScreenshotOne's servers ([response\_type](https://screenshotone.com/docs/options/#response_type)).
-   **`response_type=json`:** the response contains a `screenshot_url`. That URL is temporary, and ScreenshotOne says to download the file promptly ([Screenshot URL](https://screenshotone.com/docs/screenshot-url/)). Its MCP docs put it at up to four hours ([MCP](https://screenshotone.com/docs/mcp/)).
-   **`cache=true`:** reuses a result for `cache_ttl` seconds, 4 hours by default and one month at most. ScreenshotOne says caching is for saving rendering costs and is not intended for CDN-like use ([Caching](https://screenshotone.com/docs/caching/)).
-   **`store=true`:** uploads the result to an S3-compatible bucket you configure, with an IAM user and access keys you create ([Upload to S3](https://screenshotone.com/docs/guides/upload-to-s3/)).

Sending the result to PixelVault instead gives you:

-   A permanent `img.pixelvault.dev` URL on a global CDN, with no bucket, IAM policy or CDN distribution to set up.
-   Sizes and formats from the URL: `?w=640`, `?fmt=auto` (AVIF or WebP when the browser accepts it), or `?size=social` for a 1200×630 card. See [Transforms](/docs/transforms/).
-   Private storage when a screenshot shows something internal: upload with `visibility=private` and share it through [signed URLs](/docs/private-media/) that expire.
-   Folders and metadata, so a screenshot keeps the page it came from and can be listed later. See [Organize media](/docs/guides/organize-media/).

If you already run S3 or R2 behind a CDN, ScreenshotOne's `store=true` is the shorter path: the file goes straight to your bucket and never passes through your server. PixelVault is for when you would rather not run that storage yourself.

## Option A: upload the bytes (recommended)

Use this when you call `/take` from your own code. Request the image as usual, then send the same bytes to [`POST https://api.pixelvault.dev/v1/images`](/docs/api/images/#upload_image) as `multipart/form-data` with the file in the `file` field. One render, one upload. PixelVault never calls ScreenshotOne, so retrying the upload cannot cost you another render, and with the default response type ScreenshotOne does not keep a copy.

ScreenshotOne accepts the access key as an `X-Access-Key` header as well as an `access_key` query parameter ([API keys](https://screenshotone.com/docs/api-keys/)). The samples use the header so the key stays out of URLs and logs. `format`, `block_cookie_banners` and `block_ads` are documented in [Screenshot Options](https://screenshotone.com/docs/options/); add any other option you already use.

### curl

```
# 1. Render. The access key goes in a header, not in the URL.
curl -fsS -G https://api.screenshotone.com/take \
  -H "X-Access-Key: $SCREENSHOTONE_ACCESS_KEY" \
  --data-urlencode "url=https://example.com" \
  -d format=png -d block_cookie_banners=true -d block_ads=true \
  -o example.com.png

# 2. Upload the same bytes.
curl -fsS -X POST https://api.pixelvault.dev/v1/images \
  -H "Authorization: Bearer $PIXELVAULT_API_KEY" \
  -F "file=@example.com.png" \
  -F folder=screenshots \
  -F 'metadata={"source":"screenshotone","page":"https://example.com"}'
```

### Node.js

```
import { randomUUID } from "node:crypto";

const page = "https://example.com";
const take = new URL("https://api.screenshotone.com/take");
take.search = new URLSearchParams({
  url: page,
  format: "png",
  block_cookie_banners: "true",
  block_ads: "true",
}).toString();

// 1. Render once.
const render = await fetch(take, {
  headers: { "X-Access-Key": process.env.SCREENSHOTONE_ACCESS_KEY },
});
if (!render.ok) throw new Error(`ScreenshotOne ${render.status}: ${await render.text()}`);
const bytes = await render.blob();

// 2. Upload those bytes. Reuse this key if you retry the upload.
const uploadKey = `shot-${randomUUID()}`;
const form = new FormData();
form.append("file", bytes, "example.com.png");
form.append("folder", "screenshots");
form.append("metadata", JSON.stringify({ source: "screenshotone", page }));

const res = await fetch("https://api.pixelvault.dev/v1/images", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PIXELVAULT_API_KEY}`,
    "Idempotency-Key": uploadKey,
  },
  body: form,
});
if (!res.ok) throw new Error(`PixelVault ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data.url); // https://img.pixelvault.dev/proj_…/screenshots/img_….png
```

### Python

```
import json, os, uuid
import requests

page = "https://example.com"

# 1. Render once.
render = requests.get(
    "https://api.screenshotone.com/take",
    headers={"X-Access-Key": os.environ["SCREENSHOTONE_ACCESS_KEY"]},
    params={"url": page, "format": "png",
            "block_cookie_banners": "true", "block_ads": "true"},
    timeout=120,
)
render.raise_for_status()

# 2. Upload those bytes. Reuse this key if you retry the upload.
upload_key = f"shot-{uuid.uuid4()}"
res = requests.post(
    "https://api.pixelvault.dev/v1/images",
    headers={"Authorization": f"Bearer {os.environ['PIXELVAULT_API_KEY']}",
             "Idempotency-Key": upload_key},
    files={"file": ("example.com.png", render.content, "image/png")},
    data={"folder": "screenshots",
          "metadata": json.dumps({"source": "screenshotone", "page": page})},
    timeout=60,
)
res.raise_for_status()
print(res.json()["data"]["url"])
```

The response is the stored image:

```
{ "data": {
  "id": "img_abc123",
  "kind": "image",
  "url": "https://img.pixelvault.dev/proj_xyz789/screenshots/img_abc123.png",
  "mime_type": "image/png",
  "width": 1280,
  "height": 1024,
  "folder": "screenshots",
  "metadata": { "source": "screenshotone", "page": "https://example.com" },
  …
} }
```

An `Idempotency-Key` makes the upload safe to retry: sending the same key with the same bytes returns the original image (`replayed: true`) instead of a copy. Use it for one set of bytes only. A new render produces different bytes, and the same key with different bytes is rejected with `422 idempotency_key_reuse`. See [Idempotency](/docs/idempotency/).

## Option B: save the temporary URL

Use this when something else already holds a ScreenshotOne `screenshot_url`, for example a JSON response stored by another service, or when you would rather not handle the bytes. Pass the URL to [`POST /v1/media`](/docs/guides/save-ai-outputs/) right away, while it is still valid. PixelVault identifies the file from its bytes, so a URL with a query string or an `application/octet-stream` content type is fine.

### curl

```
SHOT_URL=$(curl -fsS -G https://api.screenshotone.com/take \
  -H "X-Access-Key: $SCREENSHOTONE_ACCESS_KEY" \
  --data-urlencode "url=https://example.com" \
  -d format=png -d response_type=json | jq -r .screenshot_url)

curl -fsS -X POST https://api.pixelvault.dev/v1/media \
  -H "Authorization: Bearer $PIXELVAULT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: screenshotone-$(printf %s "$SHOT_URL" | shasum -a 256 | cut -c1-40)" \
  -d "$(jq -n --arg url "$SHOT_URL" '{url: $url, folder: "screenshots", filename: "example.com.png"}')"
```

### Node.js

```
import { createHash } from "node:crypto";

const take = new URL("https://api.screenshotone.com/take");
take.search = new URLSearchParams({
  url: "https://example.com",
  format: "png",
  response_type: "json",
}).toString();

const render = await fetch(take, {
  headers: { "X-Access-Key": process.env.SCREENSHOTONE_ACCESS_KEY },
});
if (!render.ok) throw new Error(`ScreenshotOne ${render.status}: ${await render.text()}`);
const { screenshot_url } = await render.json();

// Same screenshot_url, same key: a retry returns the stored copy instead of a second one.
const key = "screenshotone-" +
  createHash("sha256").update(screenshot_url).digest("hex").slice(0, 40);

const res = await fetch("https://api.pixelvault.dev/v1/media", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PIXELVAULT_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": key,
  },
  body: JSON.stringify({ url: screenshot_url, folder: "screenshots", filename: "example.com.png" }),
});
if (!res.ok) throw new Error(`PixelVault ${res.status}: ${await res.text()}`);
const { data } = await res.json();
console.log(data.kind, data.url); // "image" https://img.pixelvault.dev/…
```

The key is derived from the `screenshot_url`. Each new ScreenshotOne render gets its own URL and cached results reuse theirs ([Screenshot URL](https://screenshotone.com/docs/screenshot-url/)), so a retry, or a cache hit that returns the same URL, gives PixelVault the same key and it returns the copy it already stored. Note that `response_type=json` may temporarily store the screenshot on ScreenshotOne's servers to serve that URL ([Caching](https://screenshotone.com/docs/caching/)); Option A avoids that.

**Do not give PixelVault a `/take` URL.** A URL like `https://api.screenshotone.com/take?access_key=…&url=…` renders a new screenshot every time it is fetched, and it carries your access key:

-   You would be handing your ScreenshotOne access key to a third party inside a URL. Anyone holding it can spend your quota ([Signed Links](https://screenshotone.com/docs/signed-requests/)).
-   `POST /v1/media` requests a URL twice: a short probe that reads the first 4 KB, then the import. On a `/take` URL without `cache=true` that can mean two renders.

Pass the `screenshot_url` from the JSON response, which is a file URL; fetching it does not trigger a render ([Caching options](https://screenshotone.com/docs/options/#caching)). Or use Option A.

## Option C: from an agent with both MCP servers

ScreenshotOne runs a hosted MCP server at `https://mcp.screenshotone.com` (OAuth, no key to paste). Its `render-website-screenshot` tool returns a temporary `url`, and with `full_page_slices` a `url` per slice; its docs say an agent must download the image before that link expires ([ScreenshotOne MCP](https://screenshotone.com/docs/mcp/)). PixelVault's `save_url` tool takes such a link and returns a permanent URL plus a Markdown snippet ready to paste into a pull request or report.

1.  Add ScreenshotOne's server to your client using [its setup guide for that client](https://screenshotone.com/docs/mcp/#choose-your-client).
2.  Add PixelVault's server: `https://mcp.pixelvault.dev/mcp/oauth` for clients that sign in with OAuth, or `https://mcp.pixelvault.dev/mcp` with an `Authorization: Bearer` API key. See [MCP server](/docs/mcp/).
3.  Ask for both steps in one prompt:

```
Take a screenshot of https://example.com with ScreenshotOne's
render-website-screenshot tool, then save the returned url with
PixelVault's save_url tool (folder "screenshots") and give me the
permanent URL and the markdown snippet.
```

`render-website-screenshot-as-file` also includes a temporary `url` in its response. `render-html-screenshot-as-file` returns the image inline with no URL, so it has nothing to pass to `save_url`.

## n8n workflow

-   [Page URL → ScreenshotOne → PixelVault → permanent image URL](/workflows/screenshotone-to-pixelvault.json)

The template uses built-in nodes only (Manual Trigger, Set and two HTTP Request nodes), so it runs on n8n Cloud. **Render with ScreenshotOne** calls `/take` with `format=png` and saves the response as binary data in `data`. **Upload to PixelVault** sends that binary as the `file` form field, with folder `screenshots` and the page URL in metadata.

1.  Import the downloaded JSON using n8n’s workflow menu, **Import from File**.
2.  Open **Render with ScreenshotOne**. Under Generic Credential Type → Header Auth, create a credential with Name `X-Access-Key` and Value your ScreenshotOne access key.
3.  Open **Upload to PixelVault**. Create a second Header Auth credential with Name `Authorization` and Value `Bearer YOUR_PIXELVAULT_API_KEY` (a project key from your [dashboard](/dashboard/)).
4.  Keep both keys in credentials, not in node fields or exported workflows.
5.  Set `page_url` in **Set page URL** and execute. **Permanent image URL** returns `image_url`, `image_id` and `mime_type`.

ScreenshotOne also publishes a [verified n8n node](https://n8n.io/integrations/screenshotone/). You can use it in place of the HTTP Request node; set the upload node's Input Data Field Name to the binary property that node outputs. More on the upload node in the [n8n guide](/integrations/n8n/).

## Where this fits

-   **Open Graph and link-preview images:** render a page or an HTML card once, store it, and serve `?size=social` from the CDN. See [Generate OG images for every page](/prompts/generate-og-images/).
-   **Thumbnails for directories and listings:** one stored screenshot per site, resized in the URL (`?w=400&fmt=auto`) for cards and detail pages.
-   **Visual history and monitoring:** store a scheduled capture of the same page in one folder with the page and date in metadata, and keep every version instead of the latest cache entry.
-   **Pull requests and reports:** attach a screenshot that still loads months later, or keep it private behind a signed URL. See [CI screenshots on pull requests](/docs/guides/ci-screenshots/).

## Good to know

-   Image uploads are limited to 5 MB on Free, 10 MB on Starter and 15 MB on Pro. Full-page PNGs of long pages can be larger; use `format=jpg` or `webp` with `image_quality`, or `full_page_max_height` ([Screenshot Options](https://screenshotone.com/docs/options/)).
-   PixelVault stores images and PDFs this way. ScreenshotOne's scrolling videos and other outputs are not covered by this page.
-   ScreenshotOne's docs say signed requests are for links you share publicly; server-side calls like the ones above don't need them. If you have turned on required signing for your key, sign the `/take` query as described in [Signed Links](https://screenshotone.com/docs/signed-requests/).
-   Uploads are public unless you send `visibility=private`. Don't publish screenshots of internal pages or personal data at public URLs.
-   What we tested: on 29 November 2026 we uploaded a PNG to `POST /v1/images` as multipart and imported a public PNG URL with a query string through `POST /v1/media`. Both returned CDN URLs that served the image, and both served resized AVIF through `?size=social&fmt=auto`. The ScreenshotOne requests on this page follow its documented API, but we have not run them end to end with a ScreenshotOne key. Test with one page before you schedule anything.

References: ScreenshotOne [Screenshot Options](https://screenshotone.com/docs/options/), [API keys](https://screenshotone.com/docs/api-keys/), [Screenshot URL](https://screenshotone.com/docs/screenshot-url/), [Caching](https://screenshotone.com/docs/caching/), [Upload to S3](https://screenshotone.com/docs/guides/upload-to-s3/), [Signed Links](https://screenshotone.com/docs/signed-requests/), [MCP](https://screenshotone.com/docs/mcp/); PixelVault [`POST /v1/images`](/docs/api/images/#upload_image), [`POST /v1/media`](/docs/api/media/#import_media) and [Save AI outputs](/docs/guides/save-ai-outputs/).
