Docs · Model reference

down-payment

Verified · spec v1.0.0

Inputs

FieldTypeValid domain
homePricefloat100,000 – 2,000,000
downPaymentPctfloat0.03 – 0.3
currentSavingsfloat0 – 500,000
monthlySavingsfloat100 – 10,000
annualReturnfloat0 – 0.12

All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.

Sentinel values

  • monthsToGoal = 600 goal not reached within 600 months (yearsToGoal = 50 exactly)

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/down-payment
{
  "homePrice": 1050000,
  "downPaymentPct": 0.16,
  "currentSavings": 250000,
  "monthlySavings": 5100,
  "annualReturn": 0.06
}
Response (chart arrays compacted)
{
  "ok": true,
  "model": "down-payment",
  "specVersion": "1.0.0",
  "contractUrl": "/api/v1/models/down-payment",
  "specUrl": "/api/v1/models/down-payment/spec",
  "inputs": {
    "homePrice": 1050000,
    "downPaymentPct": 0.16,
    "currentSavings": 250000,
    "monthlySavings": 5100,
    "annualReturn": 0.06
  },
  "outputs": {
    "targetAmount": 168000,
    "monthsToGoal": 0,
    "yearsToGoal": 0,
    "projectedSavings": [
      250000,
      256349.99999999997,
      "… 599 more"
    ]
  },
  "sentinels": [
    {
      "field": "monthsToGoal",
      "value": 600,
      "meaning": "goal not reached within 600 months (yearsToGoal = 50 exactly)",
      "triggered": false
    }
  ],
  "assumptions": [
    "Implements model spec down-payment v1.0.0 (dual-implementation verified)."
  ],
  "facts": [],
  "record": {
    "sha256": "87cf78f5487be7a0e72cc1191399c8dfd75069700cbd8712f88eef766e783ffa",
    "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.