{
 "openapi": "3.1.0",
 "info": {
  "title": "Pack Studio API",
  "version": "2.0.0",
  "description": "Public API for https://www.pack-studio.com. Read endpoints need no key. The same capabilities are available as an MCP server at https://www.pack-studio.com/mcp. Lead and part endpoints act on behalf of a person who asked; do not submit without their confirmation.",
  "contact": {
   "name": "Pack Studio",
   "email": "software@inkbit3d.com",
   "url": "https://www.pack-studio.com/agents"
  }
 },
 "servers": [
  {
   "url": "https://www.pack-studio.com"
  }
 ],
 "paths": {
  "/api/search": {
   "get": {
    "operationId": "search",
    "summary": "Search the site",
    "parameters": [
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      }
     },
     {
      "name": "type",
      "in": "query",
      "schema": {
       "type": "string",
       "enum": [
        "feature",
        "answer",
        "guide",
        "article",
        "case-study",
        "industry",
        "glossary",
        "news",
        "page"
       ]
      }
     },
     {
      "name": "limit",
      "in": "query",
      "schema": {
       "type": "integer",
       "minimum": 1,
       "maximum": 20,
       "default": 8
      }
     }
    ],
    "responses": {
     "200": {
      "description": "Ranked results",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "query": {
           "type": "string"
          },
          "results": {
           "type": "array",
           "items": {
            "type": "object",
            "properties": {
             "title": {
              "type": "string"
             },
             "url": {
              "type": "string"
             },
             "markdown_url": {
              "type": "string"
             },
             "type": {
              "type": "string"
             },
             "summary": {
              "type": "string"
             },
             "score": {
              "type": "number"
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/roi": {
   "get": {
    "operationId": "estimateEngineeringSavings",
    "summary": "Estimate engineering hours and labor saved per launch",
    "description": "Hours saved = estimates × (minutes today − minutes with Pack Studio) ÷ 60. Engineering labor only.",
    "parameters": [
     {
      "name": "n",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": "Packaging estimates per launch"
     },
     {
      "name": "before",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": "Minutes per estimate today"
     },
     {
      "name": "after",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": "Minutes per estimate with Pack Studio"
     },
     {
      "name": "rate",
      "in": "query",
      "required": true,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": "Loaded labor rate, USD per hour"
     },
     {
      "name": "launches",
      "in": "query",
      "required": false,
      "schema": {
       "type": "number",
       "minimum": 0
      },
      "description": "Launches per year (optional)"
     }
    ],
    "responses": {
     "200": {
      "description": "Estimate with the Lucid Motors benchmark and its source",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "400": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/lead": {
   "post": {
    "operationId": "requestDemo",
    "summary": "Request a demo, quote, brochure or waitlist place",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "required": [
         "firstName",
         "lastName",
         "email",
         "company",
         "industry"
        ],
        "properties": {
         "firstName": {
          "type": "string"
         },
         "lastName": {
          "type": "string"
         },
         "email": {
          "type": "string",
          "format": "email",
          "description": "Business email address"
         },
         "company": {
          "type": "string"
         },
         "industry": {
          "type": "string",
          "enum": [
           "Automotive OEM",
           "Automotive Tier 1 or Tier 2 supplier",
           "Packaging producer or converter",
           "Industrial manufacturing",
           "Logistics or 3PL",
           "Consumer products",
           "Aerospace and defense",
           "Medical devices",
           "Education or research",
           "Other"
          ]
         },
         "phone": {
          "type": "string"
         },
         "message": {
          "type": "string"
         },
         "form": {
          "type": "string",
          "enum": [
           "contact",
           "brochure",
           "waitlist"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Accepted"
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/api/part-challenge": {
   "post": {
    "operationId": "sendPart",
    "summary": "Send a part to be run in Pack Studio",
    "requestBody": {
     "required": true,
     "content": {
      "multipart/form-data": {
       "schema": {
        "type": "object",
        "required": [
         "firstName",
         "lastName",
         "email",
         "company",
         "industry",
         "part",
         "consent"
        ],
        "properties": {
         "firstName": {
          "type": "string"
         },
         "lastName": {
          "type": "string"
         },
         "email": {
          "type": "string",
          "format": "email",
          "description": "Business email address"
         },
         "company": {
          "type": "string"
         },
         "industry": {
          "type": "string",
          "enum": [
           "Automotive OEM",
           "Automotive Tier 1 or Tier 2 supplier",
           "Packaging producer or converter",
           "Industrial manufacturing",
           "Logistics or 3PL",
           "Consumer products",
           "Aerospace and defense",
           "Medical devices",
           "Education or research",
           "Other"
          ]
         },
         "phone": {
          "type": "string"
         },
         "message": {
          "type": "string"
         },
         "part": {
          "type": "string"
         },
         "file": {
          "type": "string",
          "format": "binary",
          "description": "STEP, STL, 3MF, OBJ or IGES up to 4 MB"
         },
         "fileUrl": {
          "type": "string",
          "format": "uri"
         },
         "consent": {
          "type": "string",
          "enum": [
           "yes"
          ]
         }
        }
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Received"
     },
     "413": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "422": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     },
     "503": {
      "description": "Error",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "error": {
           "type": "string"
          },
          "fields": {
           "type": "array",
           "items": {
            "type": "string"
           }
          }
         }
        }
       }
      }
     }
    }
   }
  },
  "/data/claims.json": {
   "get": {
    "operationId": "facts",
    "summary": "Every published figure with its source",
    "responses": {
     "200": {
      "description": "Facts registry",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  },
  "/data/features.json": {
   "get": {
    "operationId": "features",
    "summary": "Every feature landing page with status and summary",
    "responses": {
     "200": {
      "description": "Feature list",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     }
    }
   }
  }
 }
}