{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/difficat-com/json-schema/difficat-com-screenshot-response-schema.json",
  "title": "ScreenshotResponse",
  "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/ScreenshotResponse",
  "type": "object",
  "required": [
    "jobId",
    "jobToken",
    "filename",
    "url",
    "dimensions",
    "links"
  ],
  "properties": {
    "jobId": {
      "type": "string"
    },
    "jobToken": {
      "type": "string",
      "description": "Bearer token for the file link. Shown once."
    },
    "filename": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "maxLength": 2048
    },
    "dimensions": {
      "type": "object",
      "properties": {
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        }
      }
    },
    "links": {
      "type": "object",
      "properties": {
        "file": {
          "type": "string"
        }
      }
    },
    "payment": {
      "$ref": "#/$defs/Payment"
    },
    "pagesCharged": {
      "type": "integer",
      "description": "0 on a free run."
    },
    "sample": {
      "type": "boolean",
      "description": "Present and true when the call ran under the free allowance; payment is then absent."
    },
    "allowanceRemaining": {
      "type": "integer",
      "description": "Free run: the units of this kind left for the address today."
    }
  },
  "$defs": {
    "Payment": {
      "type": "object",
      "description": "What this call was charged. The amount is a decimal USD string (\"0.10\"); by contrast, the x-payment-info.amount advertised on each paid operation is USD cents as an integer string (\"10\"). A call settled from a prepaid balance carries rail \"prepaid\" and the remaining balance. A call paid with a Pro account’s key carries rail \"subscription\", the captured pages drawn from the included allowance (2 per live pair) and the pages left; its amount is what any leftover balance and overage paid, \"0.00\" when the allowance covered the call.",
      "required": [
        "amount",
        "currency"
      ],
      "properties": {
        "amount": {
          "type": "string"
        },
        "currency": {
          "type": "string"
        },
        "rail": {
          "type": "string",
          "enum": [
            "prepaid",
            "subscription"
          ]
        },
        "balance": {
          "type": "string",
          "description": "Remaining prepaid balance, decimal USD."
        },
        "pagesFromAllowance": {
          "type": "integer",
          "description": "Pro key: captured pages covered by the allowance, 2 per live pair."
        },
        "allowanceRemaining": {
          "type": "integer",
          "description": "Pro key: captured pages left in the period."
        }
      }
    }
  }
}