{
  "info": {
    "description": "Informational loan calculators and a Loan Estimate red-flag scan. LoanPilotAI is not a lender, broker or loan originator; outputs are illustrations, not quotes, credit decisions or financial advice.",
    "title": "LoanPilotAI API",
    "version": "1.0.0"
  },
  "openapi": "3.0.3",
  "paths": {
    "/api/v1/affordability": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "annual_rate_pct": {
                    "type": "number"
                  },
                  "down_payment": {
                    "type": "number"
                  },
                  "max_dti_pct": {
                    "type": "number"
                  },
                  "monthly_debts": {
                    "type": "number"
                  },
                  "monthly_gross_income": {
                    "type": "number"
                  },
                  "term_years": {
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Affordability illustration",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/explain-loan-estimate": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "text"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Deterministic checklist for pasted Loan Estimate text",
        "tags": [
          "loan-estimate"
        ]
      }
    },
    "/api/v1/loan-calc": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "annual_rate_pct": {
                    "type": "number"
                  },
                  "extra_monthly": {
                    "type": "number"
                  },
                  "loan_type": {
                    "type": "string"
                  },
                  "principal": {
                    "type": "number"
                  },
                  "term_years": {
                    "type": "number"
                  }
                },
                "required": [
                  "principal",
                  "annual_rate_pct",
                  "term_years"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Payment, totals and amortization",
        "tags": [
          "calculators"
        ]
      }
    },
    "/api/v1/pricing": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Plans and prices",
        "tags": [
          "billing"
        ]
      }
    },
    "/api/v1/rates": {
      "get": {
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Freddie Mac PMMS national averages",
        "tags": [
          "rates"
        ]
      }
    },
    "/api/v1/refinance-break-even": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "properties": {
                  "balance": {
                    "type": "number"
                  },
                  "closing_costs": {
                    "type": "number"
                  },
                  "current_rate_pct": {
                    "type": "number"
                  },
                  "new_rate_pct": {
                    "type": "number"
                  },
                  "new_term_years": {
                    "type": "number"
                  },
                  "remaining_years": {
                    "type": "number"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Refinance break-even months",
        "tags": [
          "calculators"
        ]
      }
    },
    "/checkout/{plan}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "plan",
            "required": true,
            "schema": {
              "enum": [
                "pro_monthly",
                "pro_yearly"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "303": {
            "description": "Redirect to Stripe Checkout"
          },
          "503": {
            "description": "Checkout unavailable"
          }
        },
        "summary": "Redirects to Stripe hosted checkout for a plan",
        "tags": [
          "billing"
        ]
      }
    },
    "/mcp": {
      "post": {
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Invalid input"
          }
        },
        "summary": "Model Context Protocol endpoint (JSON-RPC 2.0: initialize, tools/list, tools/call)",
        "tags": [
          "agents"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://loanpilotai.eliteaiempire.com"
    }
  ]
}
