{
  "openapi": "3.1.0",
  "info": {
    "title": "Syntrix Labs Beam Analysis Calculator",
    "version": "0.2.0",
    "description": "Free beam analysis calculator for engineers and AI agents. Euler–Bernoulli rectangular beam analysis for point loads and full-span uniform loads; simply supported, cantilever, fixed-fixed and propped cantilever configurations. Preliminary analysis only. No API key or payment required."
  },
  "servers": [
    {
      "url": "https://syntrixlabs.net"
    }
  ],
  "paths": {
    "/api/v1/engineering/beam-analysis": {
      "post": {
        "operationId": "beamAnalysis",
        "summary": "Beam analysis calculator: bending stress, deflection, shear force, bending moment and support reactions",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "L",
                  "b",
                  "h",
                  "E"
                ],
                "properties": {
                  "L": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Span mm"
                  },
                  "b": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Width mm"
                  },
                  "h": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Height mm"
                  },
                  "E": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Elastic modulus MPa"
                  },
                  "P": {
                    "type": "number",
                    "minimum": 0,
                    "default": 0,
                    "description": "Point load N"
                  },
                  "a": {
                    "type": "number",
                    "description": "Point position mm, strictly inside span if P > 0; defaults to midspan"
                  },
                  "w": {
                    "type": "number",
                    "minimum": 0,
                    "default": 0,
                    "description": "Full span uniform load N/mm"
                  },
                  "left": {
                    "enum": [
                      "free",
                      "pin",
                      "fixed"
                    ],
                    "default": "pin"
                  },
                  "right": {
                    "enum": [
                      "free",
                      "pin",
                      "fixed"
                    ],
                    "default": "pin"
                  }
                }
              },
              "example": {
                "L": 1500,
                "b": 50,
                "h": 140,
                "E": 69000,
                "P": 3200,
                "a": 750,
                "w": 0,
                "left": "pin",
                "right": "pin"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Beam results with units in field names, samples, assumptions and version",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "string"
                    },
                    "sign_convention": {
                      "type": "string"
                    },
                    "assumptions": {
                      "type": "string"
                    },
                    "I_mm4": {
                      "type": "number"
                    },
                    "left_reaction_N": {
                      "type": "number"
                    },
                    "right_reaction_N": {
                      "type": "number"
                    },
                    "left_reaction_moment_Nmm": {
                      "type": "number"
                    },
                    "right_reaction_moment_Nmm": {
                      "type": "number"
                    },
                    "left_axial_reaction_N": {
                      "type": "number"
                    },
                    "right_axial_reaction_N": {
                      "type": "number"
                    },
                    "max_deflection": {
                      "type": "object",
                      "properties": {
                        "x_mm": {
                          "type": "number"
                        },
                        "deflection_mm": {
                          "type": "number"
                        },
                        "moment_Nmm": {
                          "type": "number"
                        },
                        "shear_N": {
                          "type": "number"
                        },
                        "stress_MPa": {
                          "type": "number"
                        }
                      }
                    },
                    "max_bending": {
                      "type": "object",
                      "properties": {
                        "x_mm": {
                          "type": "number"
                        },
                        "deflection_mm": {
                          "type": "number"
                        },
                        "moment_Nmm": {
                          "type": "number"
                        },
                        "shear_N": {
                          "type": "number"
                        },
                        "stress_MPa": {
                          "type": "number"
                        }
                      }
                    },
                    "samples": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "x_mm": {
                            "type": "number"
                          },
                          "deflection_mm": {
                            "type": "number"
                          },
                          "moment_Nmm": {
                            "type": "number"
                          },
                          "shear_N": {
                            "type": "number"
                          },
                          "stress_MPa": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input or unstable supports"
          },
          "413": {
            "description": "Request too large"
          }
        },
        "description": "Compute bending stress, deflection, shear force, bending moment and support reactions. Use canonical N, mm, MPa; transverse static loading only. Unstable configurations are rejected.",
        "security": []
      }
    }
  }
}