Skip to main content
Automate the creation of product screenshots effortlessly with the overlay and device option for screenshots. See Screenshot options for all available device and screenshot options.

Example

curl --request POST 'https://api.doczilla.app/v1/screenshot' \
  --header 'Authorization: Bearer <your token>' \
  --header 'Content-Type: application/json' \
  --output 'doczilla.png' \
  --data '{
    "page": {
      "url": "https://doczilla.app",
      "waitForMilliseconds": 500
    },
    "screenshot": {
      "device": "Macbook Pro 13",
      "overlay": {
        "background": "linear-gradient(135deg, #17BCE0 0%, #17E286 100%)",
        "browser": "dark",
        "margin": 0.2
      }
    }
  }'
import Doczilla, { ScreenshotOptions, ScreenshotOverlay } from '@doczilla/node'

const doczilla = new Doczilla('<your token>')

const screenshot = await doczilla.screenshot.direct({
  page: {
    url: 'https://doczilla.app',
    // Wait for the animations to be completed
    waitForMilliseconds: 500
  },
  screenshot: {
    device: ScreenshotOptions.device.MACBOOK_PRO_13,
    overlay: {
      background: 'linear-gradient(135deg, #17BCE0 0%, #17E286 100%)',
      browser: ScreenshotOverlay.browser.DARK,
      margin: 0.2
    }
  }
})

Output