{
  "version": 1,
  "browser_required": true,
  "description": "Open a configured PNG preview using the URL fragment. A browser with WebGL downloads the PNG; this is not a server PNG endpoint.",
  "entrypoint": "/#image=1&model=case_pi_zero&dimensions=1",
  "model_catalog": "/api/boxes",
  "parameters": {
    "image": {
      "required": true,
      "values": [
        "1"
      ]
    },
    "model": {
      "required": true,
      "description": "A model ID from /api/boxes. Uses template defaults, not local saved customizations."
    },
    "format": {
      "values": [
        "pinterest",
        "landscape",
        "square",
        "portrait"
      ],
      "default": "pinterest"
    },
    "scale": {
      "values": [
        "1",
        "2"
      ],
      "default": "1"
    },
    "background": {
      "values": [
        "grid",
        "warm",
        "white",
        "navy",
        "transparent"
      ],
      "default": "grid"
    },
    "color": {
      "values": [
        "sand",
        "blue",
        "sage",
        "clay",
        "graphite",
        "ivory"
      ],
      "default": "sand"
    },
    "view": {
      "values": [
        "assembled",
        "print"
      ],
      "default": "assembled"
    },
    "angle": {
      "values": [
        "standard",
        "front",
        "side",
        "top"
      ],
      "default": "standard"
    },
    "units": {
      "values": [
        "mm",
        "in"
      ],
      "default": "mm"
    },
    "heading": {
      "values": [
        "1",
        "0"
      ],
      "default": "1"
    },
    "casey": {
      "values": [
        "1",
        "0"
      ],
      "default": "1"
    },
    "branding": {
      "values": [
        "1",
        "0"
      ],
      "default": "1"
    },
    "dimensions": {
      "values": [
        "1",
        "0"
      ],
      "default": "0"
    },
    "title": {
      "description": "Plain-text image heading. Omit to use the model name.",
      "max_length": 100
    }
  },
  "limits": {
    "max_fragment_length": 4096,
    "max_pixels": 10000000,
    "max_side": 4096
  },
  "dimensions": "Assembled outside L × W × H. For a model without an assembled size, use the labelled print footprint width × depth × height. mm or in is explicit.",
  "workflow": [
    "Choose an ID from GET /api/boxes. Build the fragment with URLSearchParams so the title is encoded correctly.",
    "Navigate a browser to the complete URL. The image window opens automatically without changing the working design.",
    "Wait for #image-dialog[open][data-state=\"ready\"] and an enabled #image-download. Read #image-status or #design-feedback on error.",
    "Start the browser download listener, click the button named Download PNG, and save the download. Do not screenshot the preview."
  ],
  "selectors": {
    "dialog": "#image-dialog",
    "download": "#image-download",
    "status": "#image-status",
    "launch_error": "#design-feedback",
    "model": "#image-model",
    "heading": "#image-heading-text",
    "dimensions": "#image-measurements",
    "units": "#image-units"
  },
  "dialog_attributes": {
    "data-state": [
      "closed",
      "loading",
      "ready",
      "exporting",
      "error"
    ],
    "data-model-id": "Selected template ID, or current for the working design.",
    "data-output-width": "PNG width in pixels.",
    "data-output-height": "PNG height in pixels.",
    "data-filename": "Expected PNG filename.",
    "data-error": "Current error message, otherwise empty."
  },
  "custom_designs": "Preset links use template defaults. For customized geometry, open a CaseTinker design share link or import its design file first, then choose Share → Create image and keep Current design selected.",
  "privacy": "Preset settings stay in the fragment, which is not sent to the server. Analytics are disabled for an image-link page load. Model generation still calls the existing model API. No image upload, account, or automatic download."
}
