{
  "name": "qr-gen",
  "title": "Ravencraft QR Code Router & Generator Service",
  "version": "1.0.0",
  "base_url": "https://services.ravencraft.dk/qr-gen",
  "description": "Centralized, high-performance QR code generator and router with disk caching, customizable colors, quiet zones, ECC error correction, and instant download streaming.",
  "auth": { "type": "none" },
  "endpoints": [
    {
      "method": "GET",
      "path": "/",
      "returns": "image/png or image/svg+xml",
      "summary": "Generate or route a QR code image with caching.",
      "query_params": {
        "data": { "type": "string", "required": true, "summary": "Payload, URL or text to encode in QR code." },
        "size": { "type": "integer", "min": 50, "max": 1200, "default": 300, "summary": "Width and height in pixels." },
        "color": { "type": "string", "example": "000000", "default": "000000", "summary": "Foreground hex color without #." },
        "bgcolor": { "type": "string", "example": "ffffff", "default": "ffffff", "summary": "Background hex color without #." },
        "qzone": { "type": "integer", "min": 0, "max": 20, "default": 4, "summary": "Quiet zone margin around the code." },
        "ecc": { "type": "string", "enum": ["L", "M", "Q", "H"], "default": "M", "summary": "Error correction level." },
        "format": { "type": "string", "enum": ["png", "svg"], "default": "png", "summary": "Image output format." },
        "download": { "type": "integer", "enum": [0, 1], "default": 0, "summary": "Force browser download attachment." },
        "filename": { "type": "string", "default": "qr-code.png", "summary": "Custom download filename." },
        "transparent": { "type": "integer", "enum": [0, 1], "default": 0, "summary": "Render with transparent background." }
      }
    },
    {
      "method": "GET",
      "path": "/health.php",
      "returns": "application/json",
      "summary": "Health check reporting service and cache status."
    },
    {
      "method": "GET",
      "path": "/help.php",
      "returns": "text/html",
      "summary": "Interactive documentation and live test generator."
    }
  ],
  "logging": {
    "via": "/shared/log_client.php",
    "events": [
      "qr_gen.request",
      "qr_gen.cache_hit",
      "qr_gen.upstream_fetch",
      "qr_gen.error"
    ]
  }
}
