Overview
All API models use Pydantic for validation and serialization. Models support both snake_case (Python) and camelCase (JavaScript) field names.Request Models
SimulationRequest
Top-level request object for Monte Carlo simulations.User’s current financial state (assets, debts, spending)
User-provided information (income, age, risk tolerance)
Financial goal to simulate (target amount, timeline)
Optional simulation parameters. Defaults to medium risk profile if not provided.
FinancialProfile
Current financial snapshot.Total liquid assets (checking, savings, brokerage accounts)
Total credit card debt
Total loan balances (student, auto, mortgage, personal)
Total monthly loan payments across all loans
Average monthly spending
Spending breakdown by category (housing, food, transportation, etc.)
Spending variance (0.05-0.40). Higher values = more unpredictable expenses.
UserInputs
Monthly gross income
Current age
Investment risk tolerance. Affects expected returns:
low: 4% return, 8% volatility (conservative)medium: 7% return, 15% volatility (balanced)high: 10% return, 20% volatility (aggressive)
Goal
Financial goal definition.Target dollar amount. Must be positive.
Timeline in months. Must be positive.
Goal category (e.g., “savings”, “retirement”, “house”, “emergency_fund”)
Original goal text if parsed from natural language
Parser confidence score (0-1) for AI-parsed goals
SimulationParams
Simulation configuration and assumptions.Number of Monte Carlo simulations to run
Monthly income variance (standard deviation)
Monthly expense variance
Monthly probability of emergency expense (0.08 = 8%)
Minimum emergency expense amount
Maximum emergency expense amount
Expected annual investment return (7%)
Investment return volatility (15%)
Annual inflation rate (2.5%)
Inflation variance (± 1%)
Average annual salary raise (3%)
Raise variance
Semi-annual promotion probability (15% every 6 months)
Average promotion raise (8%)
Promotion raise variance
Credit card accounts for account-aware simulation
Loan accounts for account-aware simulation
Enable per-account interest and payment modeling
CreditCardParams
Credit card configuration for account-aware mode.Unique card identifier
Current balance
Annual percentage rate (e.g., 18.99 for 18.99%)
Minimum monthly payment
LoanParams
Loan configuration for account-aware mode.Unique loan identifier
Current principal balance
Annual interest rate (e.g., 4.5 for 4.5%)
Fixed monthly payment amount
Response Models
SimulationResults
Probability of achieving the goal (0.0 to 1.0)
Median final balance (50th percentile)
Distribution percentiles
Mean final balance
Standard deviation
Minimum outcome across all simulations
Maximum outcome across all simulations
Total simulations executed
Parallel workers used
Simulation assumptions for transparency
Percentiles
10th percentile outcome
25th percentile outcome
50th percentile (median) outcome
75th percentile outcome
90th percentile outcome
Assumptions
Simulation assumptions returned for transparency.Expected annual return used
Return volatility used
Inflation rate assumption
Inflation variance
Average annual raise
Raise frequency description (e.g., “Annual (every 12 months)”)
Semi-annual promotion probability
Average promotion raise
Monthly emergency probability
Emergency expense range (e.g., “3,000”)
Income variance used
Expense variance used