Batch automation is for image sets: docs refreshes, directory thumbnails, changelog images, store screenshots, and social campaigns.

CLI batch

Create a URL file:

txt
https://example.comhttps://example.com/pricinghttps://example.com/docs

Run:

bash
screenframed batch urls.txt \ --device browser-macos \ --background midnight \ --format webp \ --out-dir screenshots

API manifest loop

javascript
const jobs = [ { name: "home", url: "https://example.com" }, { name: "pricing", url: "https://example.com/pricing" }, { name: "docs", url: "https://example.com/docs" },];for (const job of jobs) { const response = await fetch("https://screenframed.com/v1/capture", { method: "POST", headers: { Authorization: `Bearer ${process.env.SCREENFRAMED_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ url: job.url, device: "browser-macos", background_preset: "midnight", shadow: "soft", async: true, }), }); const queued = await response.json(); console.log(job.name, queued.job_id);}

CI guidance

Do

Use manifests

Keep capture inputs in versioned JSON so changes are reviewable.

Retry and backoff

For batch jobs:

  1. Queue with async: true.
  2. Persist each job_id.
  3. Poll /v1/jobs/{id} with backoff.
  4. Retry only failed jobs after inspecting the error.
  5. Store the final CDN URLs in your asset manifest.

Local watch mode

Use watch mode while developing a page:

bash
screenframed watch http://localhost:3000 \ --device browser-macos \ --background arctic \ --output preview.png \ --interval 5
Ask a question... ⌘I