{"openapi":"3.1.0","info":{"title":"Relendi Public API","version":"1.0.0","summary":"Commercial real estate loan math and CRE knowledge lookup.","description":"Relendi's public API. No API key and no account are required.\n\n**When to use it.** Reach for these operations when a commercial real\nestate figure has to be exact rather than plausible. The calculators are\ndeterministic — the same inputs always return the same numbers.\n\n**When not to use it.** Residential mortgages, consumer lending,\njurisdictions outside the United States, legal or tax advice, or live\nrate quotes.\n\nAgents that speak MCP should prefer https://relendi.com/api/mcp/public.","contact":{"name":"Relendi support","email":"support@relendi.com","url":"https://relendi.com/contact"},"termsOfService":"https://relendi.com/terms"},"servers":[{"url":"https://relendi.com","description":"Production"}],"tags":[{"name":"Discovery","description":"Find the available operations."},{"name":"Calculators","description":"Deterministic CRE math. Same inputs, same output."},{"name":"Knowledge","description":"CRE finance knowledge lookup."}],"paths":{"/api/v1/tools":{"get":{"operationId":"listTools","summary":"List every callable operation.","description":"Returns the public operations with their names, descriptions, endpoints and whether each is deterministic. No authentication.","tags":["Discovery"],"responses":{"200":{"description":"The operation index.","content":{"application/json":{"schema":{"type":"object","required":["count","tools"],"properties":{"service":{"type":"string"},"description":{"type":"string"},"openapi":{"type":"string","format":"uri"},"documentation":{"type":"string","format":"uri"},"mcp":{"type":"string","format":"uri"},"count":{"type":"integer"},"tools":{"type":"array","items":{"type":"object","required":["name","description","endpoint","method"],"properties":{"name":{"type":"string"},"description":{"type":"string"},"deterministic":{"type":"boolean"},"endpoint":{"type":"string","format":"uri"},"method":{"type":"string"},"schema":{"type":"string"}}}}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/size_loan":{"post":{"operationId":"sizeLoan","summary":"Size a commercial real estate loan from first principles.","description":"Size a commercial real estate loan from first principles. Returns the maximum supportable loan as the MINIMUM of four constraints — loan-to-value, debt-service-coverage, debt yield and loan-to-cost — plus which one binds. Deterministic math on the numbers you supply; it does not quote lender terms.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"netOperatingIncome":{"type":"number","exclusiveMinimum":0,"maximum":10000000000,"description":"Annual NOI in dollars"},"estimatedValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000,"description":"Property value in dollars"},"totalCost":{"description":"Total project cost, for the LTC test","type":"number","exclusiveMinimum":0,"maximum":10000000000},"thresholds":{"type":"object","properties":{"maxLtv":{"type":"number","minimum":0.4,"maximum":0.95},"minDscr":{"type":"number","minimum":1,"maximum":2},"minDebtYield":{"type":"number","minimum":0.04,"maximum":0.2},"maxLtc":{"type":"number","minimum":0.4,"maximum":1},"proposedRate":{"type":"number","minimum":0,"maximum":0.5},"amortizationYears":{"type":"integer","minimum":1,"maximum":40}}}},"required":["netOperatingIncome","estimatedValue"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["size_loan"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: recommendedLoan, bindingConstraint, byLtv, byDscr, byDebtYield, byLtc, thresholds.maxLtv, thresholds.minDscr, thresholds.minDebtYield, thresholds.maxLtc, thresholds.proposedRate, thresholds.amortizationYears, inputs.noi, inputs.estimatedValue, inputs.totalCost, note.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/run_scenario":{"post":{"operationId":"runScenario","summary":"Run what-if loan sizing across a range of assumptions: a rate ladder, an NOI sensitivity table, or the feasibility of...","description":"Run what-if loan sizing across a range of assumptions: a rate ladder, an NOI sensitivity table, or the feasibility of a target loan amount against each constraint. Deterministic — same math as size_loan, swept.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"netOperatingIncome":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"estimatedValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"totalCost":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"mode":{"type":"string","enum":["rate_ladder","noi_sensitivity","loan_feasibility"]},"rates":{"maxItems":7,"type":"array","items":{"type":"number","minimum":0,"maximum":0.5}},"noiDeltaPcts":{"maxItems":7,"type":"array","items":{"type":"number","minimum":-50,"maximum":50}},"desiredLoanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"thresholds":{"type":"object","properties":{"maxLtv":{"type":"number","minimum":0.4,"maximum":0.95},"minDscr":{"type":"number","minimum":1,"maximum":2},"minDebtYield":{"type":"number","minimum":0.04,"maximum":0.2},"maxLtc":{"type":"number","minimum":0.4,"maximum":1},"proposedRate":{"type":"number","minimum":0,"maximum":0.5},"amortizationYears":{"type":"integer","minimum":1,"maximum":40}}}},"required":["netOperatingIncome","estimatedValue","mode"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["run_scenario"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: mode, note, scenarios.recommendedLoan, scenarios.bindingConstraint, scenarios.byLtv, scenarios.byDscr, scenarios.byDebtYield, scenarios.byLtc, scenarios.thresholds.maxLtv, scenarios.thresholds.minDscr, scenarios.thresholds.minDebtYield, scenarios.thresholds.maxLtc, scenarios.thresholds.proposedRate, scenarios.thresholds.amortizationYears, scenarios.inputs.noi, scenarios.inputs.estimatedValue, scenarios.inputs.totalCost, scenarios.note, scenarios.label, feasibility.constraint, feasibility.maxLoan, feasibility.passes, feasibility.headroom.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/calculate_metrics":{"post":{"operationId":"calculateMetrics","summary":"Compute the standard commercial real estate underwriting metrics from raw figures: NOI, cap rate, DSCR, debt yield, L...","description":"Compute the standard commercial real estate underwriting metrics from raw figures: NOI, cap rate, DSCR, debt yield, LTV, LTC, operating expense ratio, break-even occupancy and yield on cost. Supply whatever you have — each metric is returned only when its inputs are present, with the formula used. Use this instead of computing CRE ratios yourself.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"annualRevenue":{"description":"Gross/effective annual revenue","type":"number","minimum":0,"maximum":10000000000},"annualExpenses":{"description":"Annual operating expenses (excl. debt service)","type":"number","minimum":0,"maximum":10000000000},"netOperatingIncome":{"description":"Supply directly, or let it derive from revenue - expenses","type":"number","minimum":0,"maximum":10000000000},"propertyValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"purchasePrice":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"totalProjectCost":{"description":"For LTC and yield-on-cost","type":"number","exclusiveMinimum":0,"maximum":10000000000},"loanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"annualDebtService":{"description":"Annual, not monthly","type":"number","minimum":0,"maximum":10000000000},"rate":{"description":"DECIMAL (0.0725 = 7.25%), used to derive debt service","type":"number","minimum":0,"maximum":0.5},"amortizationYears":{"type":"integer","minimum":1,"maximum":40}}}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["calculate_metrics"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: netOperatingIncome, annualDebtService, capRate, dscr, debtYield, ltv, ltc, operatingExpenseRatio, breakEvenOccupancy, yieldOnCost, formulas, missing.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/calculate_payment":{"post":{"operationId":"calculatePayment","summary":"Amortizing and interest-only payment math for a commercial loan: monthly and annual debt service, total interest over...","description":"Amortizing and interest-only payment math for a commercial loan: monthly and annual debt service, total interest over the term, and the balloon balance at maturity when the term is shorter than the amortization (the normal CRE case — a 10-year term on a 30-year schedule).","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"loanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"rate":{"type":"number","minimum":0,"maximum":0.5,"description":"DECIMAL (0.0725 = 7.25%)"},"amortizationYears":{"type":"integer","minimum":1,"maximum":40},"termYears":{"description":"Balloon at this point","type":"number","minimum":0.5,"maximum":40},"interestOnly":{"type":"boolean"}},"required":["loanAmount","rate"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["calculate_payment"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: monthlyPayment, annualDebtService, interestOnly, amortizationYears, termYears, totalInterestOverTerm, balloonBalance, totalPaidOverTerm, note.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/stress_test":{"post":{"operationId":"stressTest","summary":"Stress a loan against rate shocks, income decline, and combined scenarios.","description":"Stress a loan against rate shocks, income decline, and combined scenarios. Returns stressed DSCR per scenario with a pass/marginal/fail verdict — the same tests a credit committee runs. Rates are PERCENT (7.25 = 7.25%).","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"netOperatingIncome":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"loanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"propertyValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"rate":{"type":"number","minimum":0.5,"maximum":30,"description":"Current annual rate, percent (7.25 = 7.25%)"},"amortizationYears":{"type":"number","minimum":0,"maximum":40,"description":"Amortization in years; 0 = interest-only"},"minDscr":{"type":"number","minimum":1,"maximum":2}},"required":["netOperatingIncome","loanAmount","propertyValue","rate","amortizationYears"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["stress_test"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: scenarios.scenario, scenarios.kind, scenarios.description, scenarios.baseRate, scenarios.baseDSCR, scenarios.stressedRate, scenarios.stressedNOI, scenarios.stressedDSCR, scenarios.passesMinDSCR, scenarios.severity, summary.passed, summary.marginal, summary.failed.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/estimate_closing_costs":{"post":{"operationId":"estimateClosingCosts","summary":"Itemize commercial closing costs for a New York or Florida transaction — lender, title, government (mortgage recordin...","description":"Itemize commercial closing costs for a New York or Florida transaction — lender, title, government (mortgage recording tax, transfer taxes) prepaid and third-party lines. Returns every line item plus totals. For New York you MUST say whether the property is in New York City: the city's recording and transfer taxes are several times the upstate rates and one of them does not exist outside the five boroughs.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"loanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"propertyValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"state":{"type":"string","enum":["NY","FL"]},"isNYC":{"description":"REQUIRED when state is NY. True = five boroughs (NYC recording tax + Real Property Transfer Tax). False = anywhere else in New York State.","type":"boolean"},"isRefinance":{"type":"boolean"},"existingMortgageBalance":{"type":"number","minimum":0,"maximum":10000000000},"cemaEnabled":{"description":"NY refinance only. CEMA assigns rather than discharges the existing mortgage so recording tax applies to new money only. Defaults to FALSE because it requires the existing lender's cooperation, which is not guaranteed — assuming it understates costs.","type":"boolean"},"interestRate":{"type":"number","minimum":0.5,"maximum":30},"brokerFeePercent":{"type":"number","minimum":0,"maximum":10},"originationFeePercent":{"type":"number","minimum":0,"maximum":10},"annualPropertyTax":{"type":"number","minimum":0,"maximum":100000000},"annualInsurance":{"type":"number","minimum":0,"maximum":100000000}},"required":["loanAmount","propertyValue","state","isRefinance"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["estimate_closing_costs"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: loanAmount, propertyValue, state, isRefinance, existingMortgageBalance, isCemaEligible, lineItems.category, lineItems.name, lineItems.amount, lineItems.isEstimate, lineItems.notes, totalClosingCosts, netProceeds, cashToClose, cemaSavings.fullMRT, cemaSavings.cemaMRT, cemaSavings.savings.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/analyze_cash_out_refinance":{"post":{"operationId":"analyzeCashOutRefinance","summary":"Full cash-out refinance waterfall: the largest new loan the property supports across LTV, DSCR and debt-yield, then d...","description":"Full cash-out refinance waterfall: the largest new loan the property supports across LTV, DSCR and debt-yield, then down through payoff, prepayment penalty and closing costs to net cash in hand. Includes NY CEMA savings when applicable. prepaymentPenaltyPercent is REQUIRED — omitting a penalty overstates the borrower's proceeds by its entire amount, so state 0 explicitly when there is none.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"noi":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"propertyValue":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"existingLoanBalance":{"type":"number","minimum":0,"maximum":10000000000},"state":{"type":"string","enum":["NY","FL"]},"rate":{"type":"number","minimum":0.5,"maximum":30,"description":"New loan rate, percent (6.85 = 6.85%)"},"amortizationYears":{"type":"number","exclusiveMinimum":0,"maximum":40},"prepaymentPenaltyPercent":{"type":"number","minimum":0,"maximum":20,"description":"Percent of payoff balance. Required — state 0 if none."},"cemaEnabled":{"type":"boolean"},"maxLtv":{"type":"number","exclusiveMinimum":0,"maximum":1},"minDscr":{"type":"number","exclusiveMinimum":0,"maximum":3},"minDebtYield":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["noi","propertyValue","existingLoanBalance","state","rate","amortizationYears","prepaymentPenaltyPercent"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["analyze_cash_out_refinance"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: maxNewLoan, bindingConstraint, byLtv, byDscr, byDebtYield, existingLoanBalance, prepaymentPenalty, totalClosingCosts, grossCashOut, netCashOut, newMonthlyPayment, newAnnualDebtService, newLtv, newDscr, newDebtYield, noCashAvailable, cemaSavings.fullMRT, cemaSavings.cemaMRT, cemaSavings.savings.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/compare_loan_offers":{"post":{"operationId":"compareLoanOffers","summary":"Rank competing loan offers by true cost of capital, not headline rate.","description":"Rank competing loan offers by true cost of capital, not headline rate. Accounts for origination, exit and other fees over the actual term, and returns an effective rate, total cost and fee burden in basis points for each — so a 'cheaper' rate with heavy fees sorts correctly.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"offers":{"minItems":2,"maxItems":6,"type":"array","items":{"type":"object","properties":{"lenderName":{"type":"string","maxLength":120},"loanAmount":{"type":"number","exclusiveMinimum":0,"maximum":10000000000},"interestRate":{"type":"number","minimum":0.5,"maximum":30,"description":"Annual rate, percent (8.25 = 8.25%)"},"term":{"type":"string","maxLength":40,"pattern":"^\\s*\\d+(\\.\\d+)?\\s*(mo|mos|month|months|yr|yrs|year|years)\\s*$","description":"Loan term WITH its unit — '18 months' or '5 years'. A bare number is rejected: the underlying parser would read '30' as 30 months, understating a 30-year note's cost 12x."},"originationFee":{"type":"number","minimum":0,"maximum":10},"exitFee":{"type":"number","minimum":0,"maximum":10},"applicationFee":{"type":"number","minimum":0,"maximum":1000000}},"required":["loanAmount","interestRate","term"]}}},"required":["offers"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["compare_loan_offers"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: ranked.lenderName, ranked.loanAmount, ranked.interestRate, ranked.term, ranked.effectiveRate, ranked.totalInterestCost, ranked.totalFeeCost, ranked.totalCost, ranked.costPerMonth, ranked.feeBurdenBps, cheapest, note.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/search_cre_knowledge":{"post":{"operationId":"searchCreKnowledge","summary":"Search Relendi's curated commercial-real-estate knowledge base — lending concepts, deal lifecycle, typical fees and t...","description":"Search Relendi's curated commercial-real-estate knowledge base — lending concepts, deal lifecycle, typical fees and timelines. Returns source-cited excerpts. Use it to ground CRE answers rather than relying on memory.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string","minLength":3,"maxLength":200},"topK":{"type":"integer","minimum":1,"maximum":5}},"required":["query"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["search_cre_knowledge"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: results.citation, results.content, results.score, guidance.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/ask_cre_question":{"post":{"operationId":"askCreQuestion","summary":"Ask a plain-English question about commercial real estate lending and get a short answer grounded in Relendi's knowle...","description":"Ask a plain-English question about commercial real estate lending and get a short answer grounded in Relendi's knowledge base, with citations. For loan math prefer size_loan or run_scenario, which are exact.","tags":["Knowledge"],"x-deterministic":false,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":5,"maxLength":500}},"required":["question"]}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["ask_cre_question"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: answer, citations, grounded.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/tools/prepare_deal":{"post":{"operationId":"prepareDeal","summary":"Prepare a Move this deal to Relendi link from the user's CRE scenario.","description":"Prepare a Move this deal to Relendi link from the user's CRE scenario. Use when the user wants to keep a deal, continue in Relendi, or carry property details beyond a calculator. Include only facts the user supplied, not guessed values or calculated loan limits as a requested amount. This does not save or submit anything: the user follows the link, reviews the inputs and signs up or signs in to save a private draft. Do not include personal or account information.","tags":["Calculators"],"x-deterministic":true,"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assetClass":{"type":"string","enum":["Residential","Mixed-Use","Office","Hotel","Retail","Industrial","Land","Self-Storage"]},"transactionType":{"type":"string","enum":["Refinance","Acquisition","Construction/Rehab","Bridge","Pre-Development"]},"address":{"type":"object","properties":{"street":{"type":"string","maxLength":160},"city":{"type":"string","maxLength":80},"state":{"type":"string","pattern":"^[A-Z]{2}$"},"zip":{"type":"string","pattern":"^\\d{5}(?:-\\d{4})?$"}},"additionalProperties":false},"netOperatingIncome":{"type":"number","minimum":0,"maximum":10000000000},"estimatedValue":{"type":"number","minimum":0,"maximum":10000000000},"requestedLoanAmount":{"type":"number","minimum":0,"maximum":10000000000},"annualRevenue":{"type":"number","minimum":0,"maximum":10000000000},"annualExpenses":{"type":"number","minimum":0,"maximum":10000000000},"purchasePrice":{"type":"number","minimum":0,"maximum":10000000000},"totalCost":{"type":"number","minimum":0,"maximum":10000000000},"requestedInterestRate":{"description":"PERCENT: 7.25 means 7.25%","type":"number","minimum":0,"maximum":50},"amortizationYears":{"type":"integer","minimum":1,"maximum":40},"interestOnly":{"type":"boolean"},"numberOfUnits":{"type":"integer","minimum":1,"maximum":100000},"assumptions":{"type":"object","properties":{"maxLtv":{"type":"number","minimum":0.4,"maximum":0.95},"minDscr":{"type":"number","minimum":1,"maximum":2},"minDebtYield":{"type":"number","minimum":0.04,"maximum":0.2},"maxLtc":{"type":"number","minimum":0.4,"maximum":1},"ratePercent":{"type":"number","minimum":0,"maximum":50},"amortizationYears":{"type":"integer","minimum":1,"maximum":40}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"The computed result.","content":{"application/json":{"schema":{"type":"object","required":["tool","result"],"properties":{"tool":{"type":"string","enum":["prepare_deal"]},"deterministic":{"type":"boolean"},"result":{"type":"object","description":"Result fields: url, label, nextStep.","additionalProperties":true}}}}}},"400":{"description":"Error. Possible codes: invalid_input.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Error. Possible codes: unknown_tool, not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Error. Possible codes: method_not_allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Error. Possible codes: rate_limited, quota_exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error. Possible codes: tool_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Error. Possible codes: flag_off.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","hint","docs"],"properties":{"code":{"type":"string","enum":["invalid_input","unknown_tool","not_found","method_not_allowed","rate_limited","quota_exhausted","flag_off","tool_error"],"description":"Stable machine-readable failure code. Branch on this, not on the message."},"message":{"type":"string","description":"Human-readable explanation."},"hint":{"type":"string","description":"What to do differently on the next attempt."},"docs":{"type":"string","format":"uri","description":"Documentation for this API."},"details":{"description":"Field-level detail, present on validation failures."}}}}}}},"x-mcp":{"description":"The same operations are available over MCP (Streamable HTTP).","endpoint":"https://relendi.com/api/mcp/public","manifest":"https://relendi.com/.well-known/mcp.json"},"x-rate-limit":{"description":"Anonymous calls are rate limited per IP and carry a daily quota. Exceeding either returns HTTP 429 with code rate_limited or quota_exhausted."}}