{
  "openapi": "3.1.0",
  "info": {
    "title": "Superior 3D and Laser — Instant 3D Printing Quote API",
    "version": "1.3.0",
    "description": "Public, read-only price estimate for FDM 3D printed parts from Superior 3D and Laser (Powell / Knoxville, TN). Uses the same pricing engine as the website checkout. It never creates an order, payment, or email. Final price is confirmed at checkout after the STL/STEP file is uploaded. Rate limited: about 20 requests/minute and 200/hour per IP (IPv6 counted per /64), plus an overall cap for the whole endpoint; over a limit the API answers 429 with Retry-After. If the shared limit store is briefly unreachable, limits are still enforced per server instance (requests are not refused because of it). Geometry can be given as volume + bounding box, or as a public https file_url to an STL, 3MF or OBJ file (max 25 MB, downloaded and measured within about 6 seconds, public internet hosts only; the file is measured in memory and never stored).",
    "contact": {
      "name": "Superior 3D and Laser",
      "email": "sales@superior3dandlaser.com",
      "url": "https://superior3dandlaser.com"
    }
  },
  "x-mcp": {
    "url": "https://superior3dandlaser.com/mcp",
    "transport": "streamable-http",
    "auth": "none",
    "tools": [
      "get_quote",
      "list_materials",
      "check_lead_times",
      "create_checkout_link"
    ],
    "description": "Read-only remote MCP server for AI assistants. get_quote, check_lead_times and create_checkout_link accept the same items as this API: each part by volume_cm3 + bbox_mm, or by file_url (public https STL/3MF/OBJ link; same limits as here: 25 MB, 500,000 triangles, about 6 seconds, at most 3 file_url items and 5 file requests per minute per IP). create_checkout_link only returns a link where the customer uploads the file and pays on the website; no tool places an order, creates a payment session or charges anything.",
    "rate_limits": "Every tools/call counts as one quote against the same per-IP limit as POST /api/quote (check_lead_times with items counts as two). Over a limit the server answers HTTP 429 with Retry-After and a JSON-RPC error (code -32000); in a batch where only some calls are refused, the response is 200 with per-message errors. A storage outage does not cause refusals: limits fall back to per-instance memory."
  },
  "servers": [
    {
      "url": "https://superior3dandlaser.com"
    }
  ],
  "paths": {
    "/api/quote": {
      "post": {
        "operationId": "getInstantQuote",
        "summary": "Estimate the price of 3D printed parts",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteRequest"
              },
              "example": {
                "items": [
                  {
                    "material": "PETG",
                    "quantity": 10,
                    "volume_cm3": 12.5,
                    "bbox_mm": {
                      "x": 60,
                      "y": 40,
                      "z": 15
                    }
                  }
                ],
                "lead_time": "standard",
                "delivery": {
                  "state": "TN",
                  "zip": "37849"
                }
              },
              "examples": {
                "by_dimensions": {
                  "value": {
                    "items": [
                      {
                        "material": "PETG",
                        "quantity": 10,
                        "volume_cm3": 12.5,
                        "bbox_mm": {
                          "x": 60,
                          "y": 40,
                          "z": 15
                        }
                      }
                    ],
                    "lead_time": "standard",
                    "delivery": {
                      "state": "TN",
                      "zip": "37849"
                    }
                  }
                },
                "by_file_url": {
                  "value": {
                    "items": [
                      {
                        "material": "PETG",
                        "quantity": 10,
                        "file_url": "https://example.com/parts/bracket.stl"
                      }
                    ],
                    "lead_time": "standard",
                    "delivery": {
                      "state": "TN",
                      "zip": "37849"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Price estimate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input (see details), including a file_url that is not https, uses an IP/private host, or resolves to a private/internal address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "415": {
            "description": "Content-Type must be application/json"
          },
          "422": {
            "description": "Part cannot be priced online (e.g. exceeds build volume), or file_url could not be fetched/measured (unsupported type, too large, timeout, open mesh); use custom_quote_url",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Rate limited (per IP, per IPv6 /64, or the endpoint's overall cap); see the Retry-After header and retry_after_sec",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "QuoteRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "minItems": 1,
            "maxItems": 20,
            "items": {
              "$ref": "#/components/schemas/Item"
            }
          },
          "lead_time": {
            "type": "string",
            "enum": [
              "standard",
              "expedite"
            ],
            "default": "standard",
            "description": "Print/production time, not delivery time: standard = 3–5 business days; expedite = 1–2 business days (+$50); subject to capacity. Shipping speed is chosen and paid separately at checkout."
          },
          "delivery": {
            "type": "object",
            "description": "Used only for sales tax. Omit for the shop default (Knox County, TN 9.25%). Out-of-state deliveries are not charged Tennessee sales tax.",
            "properties": {
              "state": {
                "type": "string",
                "pattern": "^[A-Za-z]{2}$"
              },
              "zip": {
                "type": "string",
                "pattern": "^\\d{5}(-\\d{4})?$",
                "description": "Tennessee ZIP selects the county/city rate"
              }
            }
          }
        }
      },
      "Item": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 80
          },
          "material": {
            "type": "string",
            "description": "Material name as listed at https://superior3dandlaser.com/pricing.html, e.g. PLA, PETG, ABS, ASA, \"TPU (95A)\". Resin is not available yet."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "maximum": 500,
            "default": 1
          },
          "volume_cm3": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Solid volume of ONE part in cm³ (from your CAD tool or slicer)"
          },
          "bbox_mm": {
            "type": "object",
            "required": [
              "x",
              "y",
              "z"
            ],
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "z": {
                "type": "number"
              }
            },
            "description": "Bounding box of one part in millimetres; must fit 350 × 320 × 325 mm"
          },
          "infill_percent": {
            "type": "integer",
            "enum": [
              10,
              15,
              20,
              25,
              40,
              50,
              75,
              100
            ],
            "default": 20
          },
          "nozzle_mm": {
            "type": "number",
            "enum": [
              0.2,
              0.4,
              0.6
            ],
            "default": 0.4
          },
          "color": {
            "type": "string",
            "description": "A color listed for the material, or \"custom\" (+$5 per line). Default black."
          },
          "post_processing": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "support_removal",
              "sanding",
              null
            ]
          },
          "heat_set_inserts": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0,
            "maximum": 200
          },
          "file_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "pattern": "^https://",
            "description": "Public https URL of one part's STL, 3MF or OBJ file (units: mm; 3MF unit attribute honoured). Limits: https on port 443 only, hostname required (no IP literals, no private/internal hosts or addresses), at most 2 redirects, 25 MB, at most 500,000 triangles, ~6 s total for downloading and measuring all files, 3 file_url items per request, and a stricter rate limit (about 5 requests/minute, 40/hour per IP). Use instead of volume_cm3 + bbox_mm."
          }
        },
        "required": [
          "material"
        ],
        "oneOf": [
          {
            "required": [
              "volume_cm3",
              "bbox_mm"
            ]
          },
          {
            "required": [
              "file_url"
            ]
          }
        ]
      },
      "QuoteResponse": {
        "type": "object",
        "properties": {
          "estimate": {
            "type": "boolean",
            "const": true
          },
          "currency": {
            "type": "string",
            "const": "USD"
          },
          "pricing_core_version": {
            "type": "integer"
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "material": {
                  "type": "string"
                },
                "color": {
                  "type": "string"
                },
                "quantity": {
                  "type": "integer"
                },
                "line_total": {
                  "type": "number"
                },
                "unit_price": {
                  "type": "number"
                },
                "measured": {
                  "type": "object",
                  "description": "Present only for file_url items: what the server measured.",
                  "properties": {
                    "source": {
                      "type": "string",
                      "const": "file_url"
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "stl",
                        "3mf",
                        "obj"
                      ]
                    },
                    "triangles": {
                      "type": "integer"
                    },
                    "volume_cm3": {
                      "type": "number"
                    },
                    "bbox_mm": {
                      "type": "object",
                      "properties": {
                        "x": {
                          "type": "number"
                        },
                        "y": {
                          "type": "number"
                        },
                        "z": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "parts_subtotal": {
            "type": "number"
          },
          "order_minimum": {
            "type": "number"
          },
          "minimum_adjustment": {
            "type": "number"
          },
          "lead_time": {
            "type": "string"
          },
          "lead_time_label": {
            "type": "string"
          },
          "lead_time_surcharge": {
            "type": "number"
          },
          "subtotal": {
            "type": "number"
          },
          "sales_tax": {
            "type": "number"
          },
          "sales_tax_rate": {
            "type": "number"
          },
          "total_before_shipping": {
            "type": "number"
          },
          "shipping": {
            "type": "string"
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "order_url": {
            "type": "string",
            "format": "uri"
          },
          "custom_quote_url": {
            "type": "string",
            "format": "uri"
          },
          "lead_time_note": {
            "type": "string"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
