Docs · Model reference
emergency-fund
Verified · spec v1.0.0Inputs
| Field | Type | Valid domain |
|---|---|---|
| monthlyExpenses | float | 500 – 20,000 |
| targetMonths | int | 1 – 12 |
| currentSavings | float | 0 – 100,000 |
| monthlySavings | float | 50 – 5,000 |
| savingsAccountRate | float | 0.01 – 0.08 |
All fields required. Out-of-domain values are rejected with per-field errors — never clamped. Unknown fields are rejected.
Sentinel values
monthsToGoal=240→ goal not reached within 240 months (yearsToGoal = 20 is the never-sentinel in years)
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/emergency-fund
{
"monthlyExpenses": 10000,
"targetMonths": 7,
"currentSavings": 50000,
"monthlySavings": 2500,
"savingsAccountRate": 0.05
}Response (chart arrays compacted)
{
"ok": true,
"model": "emergency-fund",
"specVersion": "1.0.0",
"contractUrl": "/api/v1/models/emergency-fund",
"specUrl": "/api/v1/models/emergency-fund/spec",
"inputs": {
"monthlyExpenses": 10000,
"targetMonths": 7,
"currentSavings": 50000,
"monthlySavings": 2500,
"savingsAccountRate": 0.05
},
"outputs": {
"targetAmount": 70000,
"monthsToGoal": 8,
"yearsToGoal": 0.6666666666666666,
"interestEarned": 1985.2857506217988,
"projectedBalance": [
{
"month": 0,
"balance": 50000,
"target": 70000
},
{
"month": 1,
"balance": 52708.333333333336,
"target": 70000
},
"… 7 more"
],
"coverageByMonth": [
{
"month": 0,
"monthsCovered": 5
},
{
"month": 1,
"monthsCovered": 5.270833333333334
},
"… 7 more"
]
},
"sentinels": [
{
"field": "monthsToGoal",
"value": 240,
"meaning": "goal not reached within 240 months (yearsToGoal = 20 is the never-sentinel in years)",
"triggered": false
}
],
"assumptions": [
"Implements model spec emergency-fund v1.0.0 (dual-implementation verified)."
],
"facts": [],
"record": {
"sha256": "193846e35e9bde82213608b21a69c33051bbfb6198274d6a263e717b0c5acba9",
"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.