Docs · Model reference

wedding

Verified · spec v1.0.0

Inputs

FieldTypeValid domain
weddingBudgetfloat5,000 – 150,000
fundingMethodchoicesavings | debt
currentSavingsfloat0 – 500,000
monthlySavingsfloat200 – 10,000
debtInterestRatefloat0.05 – 0.3
debtRepaymentMonthschoice6 | 12 | 18 | 24 | 30 | 36 | 42 | 48 | 54 | 60 | 66 | 72 | 78 | 84
annualReturnfloat0.02 – 0.12
yearsHorizonint5 – 40
  • debtInterestRate must stay > 0 (NaN at 0)

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

Sentinel values

  • monthsToSave = 9999 never — monthlySavings is 0 (quantity ignores interest)

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/wedding
{
  "weddingBudget": 78000,
  "fundingMethod": "savings",
  "currentSavings": 250000,
  "monthlySavings": 5100,
  "debtInterestRate": 0.18,
  "debtRepaymentMonths": 6,
  "annualReturn": 0.07,
  "yearsHorizon": 23
}
Response (chart arrays compacted)
{
  "ok": true,
  "model": "wedding",
  "specVersion": "1.0.0",
  "contractUrl": "/api/v1/models/wedding",
  "specUrl": "/api/v1/models/wedding/spec",
  "inputs": {
    "weddingBudget": 78000,
    "fundingMethod": "savings",
    "currentSavings": 250000,
    "monthlySavings": 5100,
    "debtInterestRate": 0.18,
    "debtRepaymentMonths": 6,
    "annualReturn": 0.07,
    "yearsHorizon": 23
  },
  "outputs": {
    "opportunityCostAtHorizon": 739522.6586244833,
    "monthsToSave": 16,
    "totalDebtCost": 82145.80044623888,
    "wealthWithoutWedding": 5034082.729977921,
    "wealthWithWedding": 4294560.071353437,
    "netWealthImpact": -739522.6586244833,
    "yearlyData": [
      {
        "year": 0,
        "withWedding": 172000,
        "withoutWedding": 328000
      },
      {
        "year": 1,
        "withWedding": 245240,
        "withoutWedding": 412160
      },
      "… 22 more"
    ]
  },
  "sentinels": [
    {
      "field": "monthsToSave",
      "value": 9999,
      "meaning": "never — monthlySavings is 0 (quantity ignores interest)",
      "triggered": false
    }
  ],
  "assumptions": [
    "Implements model spec wedding v1.0.0 (dual-implementation verified).",
    "debtInterestRate must stay > 0 (NaN at 0)"
  ],
  "facts": [],
  "record": {
    "sha256": "963a9c60071ab9e56e06b423405fd50f76ae32d6b5269a845256475e2897e1a8",
    "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.