{
  "type": "object",
  "properties": {
    "data": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000,
      "description": "What to encode, e.g. \"https://aipaygen.com\" or \"WIFI:T:WPA;S:MyNet;P:secret;;\"."
    },
    "ecc": {
      "description": "Error correction: L 7%, M 15% (default), Q 25% (max 1,663 bytes), H 30% (max 1,273 bytes; use H if you'll overlay a logo).",
      "type": "string",
      "enum": [
        "L",
        "M",
        "Q",
        "H"
      ]
    },
    "dark": {
      "description": "Foreground hex color, default \"#000000\".",
      "type": "string",
      "pattern": "^#[0-9a-f]{3}([0-9a-f]{3})?$"
    },
    "light": {
      "description": "Background hex color, default \"#ffffff\".",
      "type": "string",
      "pattern": "^#[0-9a-f]{3}([0-9a-f]{3})?$"
    },
    "border": {
      "description": "Quiet-zone modules around the code (default 4; scanners need at least 2).",
      "type": "integer",
      "minimum": 0,
      "maximum": 10
    },
    "include_matrix": {
      "description": "Also return the matrix as rows of 0/1 strings.",
      "type": "boolean"
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}