Docs · Model reference
refinance
Verified · spec v1.0.0Inputs
| Field | Type | Valid domain |
|---|---|---|
| currentBalance | float | 50,000 – 1,500,000 |
| currentRate | float | 0.02 – 0.12 |
| currentRemainingMonths | int | 12 – 360 |
| newRate | float | 0.02 – 0.12 |
| newTermMonths | int | 120 – 360 |
| closingCosts | float | 0 – 20,000 |
| monthsUntilMove | int | 12 – 360 |
All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.
Sentinel values
breakEvenMonths=Infinity→ never breaks even (monthlySavings ≤ 0; exported as the string "Infinity")
Responses annotate these in a sentinels array with a triggered flag per run.
Live example — generated from the real engine
Request
POST /api/v1/models/refinance
{
"currentBalance": 775000,
"currentRate": 0.07,
"currentRemainingMonths": 186,
"newRate": 0.07,
"newTermMonths": 240,
"closingCosts": 10000,
"monthsUntilMove": 186
}Response (chart arrays compacted)
{
"ok": true,
"model": "refinance",
"specVersion": "1.0.0",
"contractUrl": "/api/v1/models/refinance",
"specUrl": "/api/v1/models/refinance/spec",
"inputs": {
"currentBalance": 775000,
"currentRate": 0.07,
"currentRemainingMonths": 186,
"newRate": 0.07,
"newTermMonths": 240,
"closingCosts": 10000,
"monthsUntilMove": 186
},
"outputs": {
"currentMonthlyPayment": 6839.060350410964,
"newMonthlyPayment": 6008.566751046266,
"monthlySavings": 830.4935993646977,
"breakEvenMonths": 13,
"netSavingsAtHorizon": 144471.80948183377,
"worthRefinancing": true
},
"sentinels": [
{
"field": "breakEvenMonths",
"value": "Infinity",
"meaning": "never breaks even (monthlySavings ≤ 0; exported as the string \"Infinity\")",
"triggered": false
}
],
"assumptions": [
"Implements model spec refinance v1.0.0 (dual-implementation verified)."
],
"facts": [],
"record": {
"sha256": "15d17ce955bcced4d3f955ef159116cddf8d4d63a14300f6e3287c02e63c9e8f",
"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.