{
  "openapi": "3.1.0",
  "info": {
    "title": "QRlanza free QR code API",
    "version": "1.0.0",
    "summary": "Free static QR codes as SVG or PNG. No API key, no account, nothing stored.",
    "description": "Make a static QR code from a link or any text. The content is written into the code itself: it never expires, but it cannot be changed after printing. For QR codes you can edit after printing, with scan statistics, use QRlanza dynamic QR codes (https://qrlanza.com/dynamic-qr-code-generator) and the authenticated API (https://qrlanza.com/docs/mcp).\n\nLimits: 20 QR codes a day per IP (00:00 UTC reset) and 5 a minute, shared with the free MCP server (https://qrlanza.com/api/mcp/free). Links (http/https) are checked against Google Web Risk; unsafe links are refused. CORS is open and successful responses can be cached for a day.",
    "contact": { "name": "QRlanza by Clariva", "url": "https://qrlanza.com/support" },
    "termsOfService": "https://qrlanza.com/terms"
  },
  "externalDocs": { "description": "Docs with examples (curl, JavaScript, Python) and MCP setup", "url": "https://qrlanza.com/free-qr-code-api" },
  "servers": [{ "url": "https://qrlanza.com" }],
  "paths": {
    "/api/v1/free/qr": {
      "get": {
        "operationId": "createStaticQrCode",
        "summary": "Create a static QR code",
        "parameters": [
          { "name": "data", "in": "query", "required": true, "description": "Link or text to encode, URL-encoded. Up to 1,200 bytes. A bare domain such as example.com/menu gets https://.", "schema": { "type": "string", "maxLength": 1200 }, "example": "https://example.com/menu" },
          { "name": "format", "in": "query", "description": "Image format.", "schema": { "type": "string", "enum": ["svg", "png"], "default": "svg" } },
          { "name": "size", "in": "query", "description": "Width and height in pixels.", "schema": { "type": "integer", "minimum": 64, "maximum": 2048, "default": 512 } },
          { "name": "color", "in": "query", "description": "Hex colour of the modules, with or without #. Must be dark enough on the background (contrast 3:1).", "schema": { "type": "string", "pattern": "^#?[0-9a-fA-F]{6}$", "default": "0b1220" } },
          { "name": "background", "in": "query", "description": "Hex background colour, with or without #. Must be lighter than color.", "schema": { "type": "string", "pattern": "^#?[0-9a-fA-F]{6}$", "default": "ffffff" } },
          { "name": "ecc", "in": "query", "description": "Error correction level.", "schema": { "type": "string", "enum": ["L", "M", "Q", "H"], "default": "M" } }
        ],
        "responses": {
          "200": {
            "description": "The QR code.",
            "headers": {
              "RateLimit-Limit": { "schema": { "type": "integer" }, "description": "QR codes allowed per day for this IP." },
              "RateLimit-Remaining": { "schema": { "type": "integer" }, "description": "QR codes left today." },
              "RateLimit-Reset": { "schema": { "type": "integer" }, "description": "Seconds until the daily count resets (00:00 UTC)." },
              "Cache-Control": { "schema": { "type": "string" }, "example": "public, max-age=86400" }
            },
            "content": {
              "image/svg+xml": { "schema": { "type": "string" } },
              "image/png": { "schema": { "type": "string", "format": "binary" } }
            }
          },
          "400": { "description": "Invalid parameter (empty or too long data, size out of range, unreadable colours).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "403": { "description": "Google Web Risk flags the link as unsafe.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "429": { "description": "Daily or per-minute limit reached. See Retry-After.", "headers": { "Retry-After": { "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } },
          "503": { "description": "Today's safety checks for new links are used up. Try again tomorrow.", "headers": { "Retry-After": { "schema": { "type": "integer" } } }, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "required": ["error"],
        "properties": { "error": { "type": "string" }, "docs": { "type": "string", "format": "uri" } }
      }
    }
  }
}
