Docs · Model reference
having-a-child
Verified · spec v1.0.0Inputs
| Field | Type | Valid domain |
|---|---|---|
| annualIncome | float | 40,000 – 500,000 |
| currentSavingsRate | float | 0.01 – 0.5 |
| currentSavings | float | 0 – 1,000,000 |
| currentAge | int | 22 – 60 |
| retirementAge | int | 45 – 75 |
| annualReturn | float | 0.02 – 0.15 |
| marginalTaxRate | float | 0.1 – 0.5 |
| firstYearCost | float | 5,000 – 50,000 |
| ongoingAnnualCost | float | 3,000 – 40,000 |
| childcareYears | int | 0 – 10 |
| childcareAnnualCost | float | 0 – 50,000 |
| college529Monthly | float | 0 – 1,000 |
- retirementAge must exceed currentAge
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/having-a-child
{
"annualIncome": 270000,
"currentSavingsRate": 0.26,
"currentSavings": 500000,
"currentAge": 41,
"retirementAge": 60,
"annualReturn": 0.09,
"marginalTaxRate": 0.3,
"firstYearCost": 28000,
"ongoingAnnualCost": 22000,
"childcareYears": 5,
"childcareAnnualCost": 25000,
"college529Monthly": 500
}Response (chart arrays compacted)
{
"ok": true,
"model": "having-a-child",
"specVersion": "1.0.0",
"contractUrl": "/api/v1/models/having-a-child",
"specUrl": "/api/v1/models/having-a-child/spec",
"inputs": {
"annualIncome": 270000,
"currentSavingsRate": 0.26,
"currentSavings": 500000,
"currentAge": 41,
"retirementAge": 60,
"annualReturn": 0.09,
"marginalTaxRate": 0.3,
"firstYearCost": 28000,
"ongoingAnnualCost": 22000,
"childcareYears": 5,
"childcareAnnualCost": 25000,
"college529Monthly": 500
},
"outputs": {
"totalFirstYearCost": 28000,
"totalChildCostToAdulthood": 439000,
"savingsRateImpact": 2532.4074074074074,
"fireImpactYears": 3.4166666666666665,
"retirementWealthWithChild": 3714835.0017737933,
"retirementWealthWithout": 5200510.200275814,
"college529At18": 268175.83702424646,
"yearlyData": [
{
"year": 41,
"withChild": 500000,
"withoutChild": 500000
},
{
"year": 42,
"withChild": 563751.1111111111,
"withoutChild": 594140
},
"… 18 more"
]
},
"sentinels": [],
"assumptions": [
"Implements model spec having-a-child v1.0.0 (dual-implementation verified).",
"retirementAge must exceed currentAge"
],
"facts": [],
"record": {
"sha256": "da6d7fc3e8c20d94c66fc319e51663acd25347151dba97b19922b2615cd9355a",
"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.