{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/difficat-com/json-schema/difficat-com-screenshot-request-schema.json",
  "title": "ScreenshotRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/difficat-com-screenshots-api-openapi.yml#/components/schemas/ScreenshotRequest",
  "type": "object",
  "required": [
    "url"
  ],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048
    },
    "auth": {
      "$ref": "#/$defs/BasicAuth"
    },
    "viewportWidth": {
      "type": "integer",
      "minimum": 320,
      "maximum": 2560
    },
    "visual": {
      "$ref": "#/$defs/VisualRules"
    }
  },
  "$defs": {
    "BasicAuth": {
      "type": "object",
      "required": [
        "username",
        "password"
      ],
      "properties": {
        "username": {
          "type": "string",
          "description": "Username for HTTP basic auth."
        },
        "password": {
          "type": "string",
          "description": "Password for HTTP basic auth."
        }
      }
    },
    "VisualRules": {
      "type": "object",
      "description": "Capture rules applied to both sides.",
      "additionalProperties": false,
      "properties": {
        "masks": {
          "type": "array",
          "maxItems": 50,
          "description": "CSS selectors of elements hidden on both sites before the screenshot (at most 50, each up to 200 characters). The layout keeps its place.",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          }
        },
        "freeze": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "animations": {
              "type": "boolean",
              "description": "Stop CSS animations and transitions before the screenshot."
            },
            "clock": {
              "type": "boolean",
              "description": "Pause timers and the clock after load; a page that needs a timer to render may stay empty."
            },
            "clockSeconds": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}