{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/hydrafetch-com/json-schema/hydrafetch-com-screenshot-request-dto-schema.json",
  "title": "ScreenshotRequestDto",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/hydrafetch-com-openapi.json#/components/schemas/ScreenshotRequestDto",
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "The URL to screenshot. Must be http(s)."
    },
    "fullPage": {
      "type": "boolean",
      "description": "Capture the entire scrollable page instead of just the viewport. Default off."
    },
    "waitFor": {
      "type": "number",
      "minimum": 0,
      "maximum": 30000,
      "description": "Extra milliseconds to let the page settle before capture."
    },
    "timeout": {
      "type": "number",
      "minimum": 1000,
      "maximum": 100000,
      "description": "Overall time budget for the request, in milliseconds."
    },
    "maxAge": {
      "type": "number",
      "minimum": 0,
      "description": "Reuse a stored screenshot if it is younger than this many milliseconds. Defaults to 7 days, so a repeated request returns the stored PNG with `cached: true` without re-rendering — which also means it returns immediately and does not apply `waitFor`. Pass 0 to force a fresh capture."
    },
    "viewport": {
      "type": "string",
      "enum": [
        "desktop",
        "laptop",
        "tablet",
        "mobile"
      ],
      "description": "Screen size to render at. Defaults to desktop (1920x1080). Ignored when width/height are given explicitly."
    },
    "viewportWidth": {
      "type": "number",
      "minimum": 320,
      "maximum": 3840,
      "description": "Exact viewport width in pixels. Overrides `viewport`."
    },
    "viewportHeight": {
      "type": "number",
      "minimum": 240,
      "maximum": 2160,
      "description": "Exact viewport height in pixels. Overrides `viewport`. With fullPage the capture still extends to the full page height."
    }
  },
  "required": [
    "url"
  ]
}