Docs · Model reference
rent-vs-buy
Verified · spec v1.1.0Inputs
| Field | Type | Valid domain |
|---|---|---|
| homePrice | float | 100,000 – 2,000,000 |
| downPaymentPct | float | 0.05 – 0.5 |
| mortgageRate | float | 0 – 0.12 |
| mortgageTermYears | int | 10 – 30 |
| propertyTaxRate | float | 0.005 – 0.025 |
| maintenanceRate | float | 0.005 – 0.02 |
| homeAppreciationRate | float | 0 – 0.1 |
| monthlyRent | float | 500 – 10,000 |
| rentIncreaseRate | float | 0 – 0.08 |
| investmentReturn | float | 0.02 – 0.12 |
| timeHorizonYears | int | 1 – 30 |
All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.
Live example — generated from the real engine
Request
POST /api/v1/models/rent-vs-buy
{
"homePrice": 1050000,
"downPaymentPct": 0.28,
"mortgageRate": 0.06,
"mortgageTermYears": 20,
"propertyTaxRate": 0.02,
"maintenanceRate": 0.01,
"homeAppreciationRate": 0.05,
"monthlyRent": 5300,
"rentIncreaseRate": 0.04,
"investmentReturn": 0.07,
"timeHorizonYears": 16
}Response (chart arrays compacted)
{
"ok": true,
"model": "rent-vs-buy",
"specVersion": "1.1.0",
"contractUrl": "/api/v1/models/rent-vs-buy",
"specUrl": "/api/v1/models/rent-vs-buy/spec",
"inputs": {
"homePrice": 1050000,
"downPaymentPct": 0.28,
"mortgageRate": 0.06,
"mortgageTermYears": 20,
"propertyTaxRate": 0.02,
"maintenanceRate": 0.01,
"homeAppreciationRate": 0.05,
"monthlyRent": 5300,
"rentIncreaseRate": 0.04,
"investmentReturn": 0.07,
"timeHorizonYears": 16
},
"outputs": {
"buyNetWorth": 2061394.0000265343,
"rentNetWorth": 1664854.784671464,
"breakEvenYear": 1,
"yearlyComparison": [
{
"year": 1,
"buyNW": 366683.67908895446,
"rentNW": 349049.6256251398
},
{
"year": 2,
"buyNW": 443237.24333949084,
"rentNW": 407062.4750440394
},
"… 14 more"
]
},
"sentinels": [],
"assumptions": [
"Implements model spec rent-vs-buy v1.1.0 (dual-implementation verified)."
],
"facts": [],
"record": {
"sha256": "2d6bef780937b11bad9ccfc6432e0a97b9a29ce34e4677e45fbbd27b41130992",
"fields": [
"model",
"specVersion",
"inputs",
"outputs"
],
"howToVerify": "Store this record with any advice or agent output built on these numbers. To verify later: build {model, specVersion, inputs, outputs} from the stored response, serialize as JSON with object keys sorted recursively (no whitespace), and SHA-256 it — a match proves the numbers came from this spec version with these inputs, unaltered."
},
"disclaimer": "Illustrative planning model, not financial advice. Outputs follow the published model spec exactly; read the spec for assumptions and exclusions before relying on any number."
}This example is executed against the production engine when the page builds — it cannot drift from the API's real behavior.